You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wu-sheng (via GitHub)" <gi...@apache.org> on 2023/01/21 09:09:35 UTC
[GitHub] [skywalking] wu-sheng commented on a diff in pull request #10300: Add aws-firehose-receiver to support collecting AWS CloudWatch metric(OpenTelemetry format)
wu-sheng commented on code in PR #10300:
URL: https://github.com/apache/skywalking/pull/10300#discussion_r1083265889
##########
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:
I think you should move part of `OpenTelemetryMetricHandler` logic out of it for reuse, rather than export a handler.
Hanlder could stay for RPC relative logic only.
--
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