Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix semconv naming for 'jvm.buffer.memory.used' metric #13374

Merged
merged 3 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ default, and the telemetry each produces:

| JfrFeature | Default Enabled | Metrics |
|---------------------------|-----------------|-------------------------------------------------------------------------------------------------------------------|
| BUFFER_METRICS | `false` | `jvm.buffer.count`, `jvm.buffer.memory.limit`, `jvm.buffer.memory.usage` |
| BUFFER_METRICS | `false` | `jvm.buffer.count`, `jvm.buffer.memory.limit`, `jvm.buffer.memory.used` |
| CLASS_LOAD_METRICS | `false` | `jvm.class.count`, `jvm.class.loaded`, `jvm.class.unloaded` |
| CONTEXT_SWITCH_METRICS | `true` | `jvm.cpu.context_switch` |
| CPU_COUNT_METRICS | `true` | `jvm.cpu.limit` |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* any time.
*/
public final class DirectBufferStatisticsHandler implements RecordedEventHandler {
private static final String METRIC_NAME_USAGE = "jvm.buffer.memory.usage";
private static final String METRIC_NAME_USAGE = "jvm.buffer.memory.used";
private static final String METRIC_NAME_LIMIT = "jvm.buffer.memory.limit";
private static final String METRIC_NAME_COUNT = "jvm.buffer.count";
private static final String METRIC_DESCRIPTION_USAGE = "Measure of memory used by buffers.";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void shouldHaveJfrLoadedClassesCountEvents() {
}))),
metric ->
metric
.hasName("jvm.buffer.memory.usage")
.hasName("jvm.buffer.memory.used")
.hasDescription("Measure of memory used by buffers.")
.hasUnit(BYTES)
.hasLongSumSatisfying(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static List<AutoCloseable> registerObservers(
Meter meter = JmxRuntimeMetricsUtil.getMeter(openTelemetry);
observables.add(
meter
.upDownCounterBuilder("jvm.buffer.memory.usage")
.upDownCounterBuilder("jvm.buffer.memory.used")
.setDescription("Measure of memory used by buffers.")
.setUnit("By")
.buildWithCallback(callback(bufferBeans, BufferPoolMXBean::getMemoryUsed)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ void registerObservers() {

testing.waitAndAssertMetrics(
"io.opentelemetry.runtime-telemetry-java8",
"jvm.buffer.memory.usage",
"jvm.buffer.memory.used",
metrics ->
metrics.anySatisfy(
metricData ->
Expand Down
Loading