Skip to content

Commit

Permalink
removed some more stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Rzeszutek committed Dec 1, 2022
1 parent d5cbb17 commit a7b287c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 327 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
import com.splunk.opentelemetry.instrumentation.jvmmetrics.micrometer.MicrometerGcMemoryMetrics;
import com.splunk.opentelemetry.instrumentation.jvmmetrics.otel.OtelAllocatedMemoryMetrics;
import com.splunk.opentelemetry.instrumentation.jvmmetrics.otel.OtelGcMemoryMetrics;
import com.splunk.opentelemetry.instrumentation.jvmmetrics.otel.OtelJvmGcMetrics;
import com.splunk.opentelemetry.instrumentation.jvmmetrics.otel.OtelJvmHeapPressureMetrics;
import com.splunk.opentelemetry.instrumentation.jvmmetrics.otel.OtelJvmThreadMetrics;
import io.micrometer.core.instrument.Metrics;
import io.micrometer.core.instrument.binder.jvm.ClassLoaderMetrics;
Expand Down Expand Up @@ -59,8 +57,25 @@ public void afterAgent(AutoConfiguredOpenTelemetrySdk autoConfiguredOpenTelemetr
new JvmThreadMetrics().bindTo(Metrics.globalRegistry);
}
if (useOtelMetrics(metricsImplementation)) {
new OtelJvmGcMetrics().install();
new OtelJvmHeapPressureMetrics().install();
// gc metrics were removed:
// runtime.jvm.gc.concurrent.phase.time is replaced by OTel
// process.runtime.jvm.gc.duration{gc=<concurrent gcs>}
// runtime.jvm.gc.pause is replaced by OTel
// process.runtime.jvm.gc.duration{gc!=<concurrent gcs>}
// runtime.jvm.gc.max.data.size is replaced by OTel
// process.runtime.jvm.memory.limit{pool=<long lived pools>}
// runtime.jvm.gc.live.data.size is replaced by OTel
// process.runtime.jvm.memory.usage_after_last_gc{pool=<long lived pools>}
// runtime.jvm.gc.memory.allocated is replaced by memory profiling metric
// process.runtime.jvm.memory.allocated
// runtime.jvm.gc.memory.promoted is removed with no direct replacement

// heap pressure metrics were removed:
// runtime.jvm.memory.usage.after.gc is replaced by OTel
// process.runtime.jvm.memory.usage_after_last_gc{pool=<long lived pools>,type=heap} /
// process.runtime.jvm.memory.limit{pool=<long lived pools>,type=heap}
// runtime.jvm.gc.overhead is something that should to done in a dashboard, not here

new OtelJvmThreadMetrics().install();
}

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ void shouldRegisterOtelJvmMeters() {
}
System.gc();

// GC metrics
assertOtelMetricPresent("runtime.jvm.gc.memory.allocated");
// GC pressure metrics
assertOtelMetricPresent("runtime.jvm.gc.overhead");
// thread metrics
assertOtelMetricPresent("runtime.jvm.threads.states");
// allocated memory metrics
Expand Down

0 comments on commit a7b287c

Please sign in to comment.