Skip to content

Commit

Permalink
Move buffer pool metrics out of the experimental block (open-telemetr…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Rzeszutek authored and LironKS committed Dec 4, 2022
1 parent f68d08d commit 60cf4a1
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import com.google.auto.service.AutoService;
import io.opentelemetry.api.GlobalOpenTelemetry;
import io.opentelemetry.api.OpenTelemetry;
import io.opentelemetry.instrumentation.runtimemetrics.BufferPools;
import io.opentelemetry.instrumentation.runtimemetrics.Classes;
import io.opentelemetry.instrumentation.runtimemetrics.Cpu;
Expand All @@ -30,15 +31,17 @@ public void afterAgent(AutoConfiguredOpenTelemetrySdk autoConfiguredSdk) {
return;
}

Classes.registerObservers(GlobalOpenTelemetry.get());
Cpu.registerObservers(GlobalOpenTelemetry.get());
MemoryPools.registerObservers(GlobalOpenTelemetry.get());
Threads.registerObservers(GlobalOpenTelemetry.get());
OpenTelemetry openTelemetry = GlobalOpenTelemetry.get();

BufferPools.registerObservers(openTelemetry);
Classes.registerObservers(openTelemetry);
Cpu.registerObservers(openTelemetry);
MemoryPools.registerObservers(openTelemetry);
Threads.registerObservers(openTelemetry);

if (config.getBoolean(
"otel.instrumentation.runtime-metrics.experimental-metrics.enabled", false)) {
GarbageCollector.registerObservers(GlobalOpenTelemetry.get());
BufferPools.registerObservers(GlobalOpenTelemetry.get());
GarbageCollector.registerObservers(openTelemetry);
}
}
}

0 comments on commit 60cf4a1

Please sign in to comment.