Skip to content

Commit

Permalink
Fix instrumentation scope names
Browse files Browse the repository at this point in the history
  • Loading branch information
dragosvictor committed Feb 5, 2024
1 parent fa444c7 commit d84655b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@

public class PulsarBrokerOpenTelemetry implements Closeable {

private static final String INSTRUMENTATION_SCOPE_NAME = "org.apache.pulsar.broker";
private final OpenTelemetryService openTelemetryService;

@Getter
private final Meter meter;

public PulsarBrokerOpenTelemetry(ServiceConfiguration config) {
openTelemetryService = OpenTelemetryService.builder().clusterName(config.getClusterName()).build();
meter = openTelemetryService.getMeter("pulsar.broker");
meter = openTelemetryService.getMeter(INSTRUMENTATION_SCOPE_NAME);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

public class PulsarWorkerOpenTelemetry implements Closeable {

private static final String INSTRUMENTATION_SCOPE_NAME = "org.apache.pulsar.function_worker";
private final OpenTelemetryService openTelemetryService;

@Getter
Expand All @@ -34,7 +35,7 @@ public class PulsarWorkerOpenTelemetry implements Closeable {
public PulsarWorkerOpenTelemetry(WorkerConfig workerConfig) {
openTelemetryService =
OpenTelemetryService.builder().clusterName(workerConfig.getPulsarFunctionsCluster()).build();
meter = openTelemetryService.getMeter("pulsar.worker");
meter = openTelemetryService.getMeter(INSTRUMENTATION_SCOPE_NAME);
}

public void close() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

public class PulsarProxyOpenTelemetry implements Closeable {

private static final String INSTRUMENTATION_SCOPE_NAME = "org.apache.pulsar.proxy";
private final OpenTelemetryService openTelemetryService;

@Getter
Expand All @@ -34,7 +35,7 @@ public class PulsarProxyOpenTelemetry implements Closeable {
public PulsarProxyOpenTelemetry(ProxyService proxyService) {
openTelemetryService =
OpenTelemetryService.builder().clusterName(proxyService.getConfiguration().getClusterName()).build();
meter = openTelemetryService.getMeter("pulsar.proxy");
meter = openTelemetryService.getMeter(INSTRUMENTATION_SCOPE_NAME);
}

@Override
Expand Down

0 comments on commit d84655b

Please sign in to comment.