Skip to content

Instrument name "jvm.memory.pools.CodeHeap-'non-profiled-nmethods'.used" is invalid #15931

@thiagohora

Description

@thiagohora

Describe the bug

WARN io.opentelemetry.sdk.metrics.SdkMeter - Instrument name "jvm.memory.pools.CodeHeap-'non-profiled-nmethods'.used" is invalid, returning noop instrument. Instrument names must consist of 255 or fewer characters including alphanumeric, _, ., -, /, and start with a letter

Steps to reproduce

Using otel instrumentation with Dropwizard 5.0

Expected behavior

No error

Actual behavior


2026-01-19 10:42:49.234 | [otel.javaagent 2026-01-19 09:42:49:234 +0000] [main] WARN io.opentelemetry.sdk.metrics.SdkMeter - Instrument name "jvm.memory.pools.CodeHeap-'profiled-nmethods'.committed" is invalid, returning noop instrument. Instrument names must consist of 255 or fewer characters including alphanumeric, _, ., -, /, and start with a letter. |  
-- | -- | --
  |   | 2026-01-19 10:42:49.234 | at com.comet.opik.OpikApplication.main(OpikApplication.java:67) |  
  |   | 2026-01-19 10:42:49.234 | at io.dropwizard.core.Application.run(Application.java:90) |  
  |   | 2026-01-19 10:42:49.234 | at io.dropwizard.core.setup.Bootstrap.registerMetrics(Bootstrap.java:90) |  
  |   | 2026-01-19 10:42:49.234 | at com.codahale.metrics.MetricRegistry.register(MetricRegistry.java:162) |  
  |   | 2026-01-19 10:42:49.234 | at com.codahale.metrics.MetricRegistry.registerAll(MetricRegistry.java:600) |  
  |   | 2026-01-19 10:42:49.234 | at com.codahale.metrics.MetricRegistry.register(MetricRegistry.java:166) |  
  |   | 2026-01-19 10:42:49.234 | at com.codahale.metrics.MetricRegistry.onMetricAdded(MetricRegistry.java:546) |  
  |   | 2026-01-19 10:42:49.234 | at com.codahale.metrics.MetricRegistry.notifyListenerOfAddedMetric(MetricRegistry.java:552) |  
  |   | 2026-01-19 10:42:49.234 | at io.opentelemetry.javaagent.instrumentation.dropwizardmetrics.DropwizardMetricsAdapter.onGaugeAdded(DropwizardMetricsAdapter.java:59) |  
  |   | 2026-01-19 10:42:49.234 | at io.opentelemetry.sdk.metrics.SdkMeter.gaugeBuilder(SdkMeter.java:204) |  
  |   | 2026-01-19 10:42:49.234 | at io.opentelemetry.sdk.metrics.SdkMeter.checkValidInstrumentName(SdkMeter.java:340) |  
  |   | 2026-01-19 10:42:49.234 | java.lang.AssertionError |  
  |   | 2026-01-19

Javaagent or library instrumentation version

2.23.0

Environment

JDK: 21
OS: Amazon Linux release 2023.9

Additional context

No response

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageNew issue that requires triage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions