You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "pg-yang (via GitHub)" <gi...@apache.org> on 2023/01/21 08:31:37 UTC

[GitHub] [skywalking] pg-yang commented on a diff in pull request #10300: Add aws-firehose-receiver to support collecting AWS CloudWatch metric(OpenTelemetry format)

pg-yang commented on code in PR #10300:
URL: https://github.com/apache/skywalking/pull/10300#discussion_r1083262460


##########
oap-server/server-receiver-plugin/otel-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/otel/OtelMetricReceiverProvider.java:
##########
@@ -72,12 +82,10 @@ public void start() throws ServiceNotProvidedException, ModuleStartException {
             .provider()
             .getService(GRPCHandlerRegister.class);
         final MeterSystem meterSystem = getManager().find(CoreModule.NAME).provider().getService(MeterSystem.class);
-        final List<Handler> handlers =
-            Handler.all().stream()
-                .filter(h -> config.getEnabledHandlers().contains(h.type()))
-                .collect(toList());
-        for (Handler h : handlers) {
-            h.active(config, meterSystem, grpcHandlerRegister);
+        for (Handler handler : this.handlers) {
+            if (config.getEnabledHandlers().contains(handler.type())) {
+                handler.active(config, meterSystem, grpcHandlerRegister);
+            }

Review Comment:
   Sorry, I want to export `OpenTelemetryMetricHandler` as a service `OpenTelemetryMetricHandlerExporter`.
   How about I put `Handler.all()` to prepare stage, and ` handler.active` to start
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org