Skip to content

jvm_thread_state attribute is not reported #11980

@andrewj2048

Description

@andrewj2048

Describe the bug

Here is one sample output from the otel metric exporter. Attribute jvm_thread_state is not included in the jvm_thread_count

[2024-08-09 15:21:14.616 +1000]: [otel.javaagent 2024-08-09 15:21:14:612 +1000] [PeriodicMetricReader-1] INFO io.opentelemetry.exporter.logging.LoggingMetricExporter - metric: ImmutableMetricData{resource=Resource{schemaUrl=https://opentelemetry.io/schemas/1.24.0, attributes={deployment.environment="", host.arch="amd64", host.name="", os.description="Linux 3.10.0-1062.18.1.el7.x86_64", os.type="linux", process.command_line="/usr/lib/jvm/jdk8u222-b10/jre/bin/java -javaagent:/opt/signoz/opentelemetry-javaagent.jar.2 -Dotel.metrics.exporter=console -Dotel.exporter.otlp.endpoint=http://0.0.0.0:4318 -Dotel.resource.attributes=service.name=,deployment.environment= -Xms1024m -Xmx4096m org.apache.catalina.startup.Bootstrap start", process.executable.path="/usr/lib/jvm/jdk8u222-b10/jre/bin/java", process.pid=26134, process.runtime.description="AdoptOpenJDK OpenJDK 64-Bit Server VM 25.222-b10", process.runtime.name="OpenJDK Runtime Environment", process.runtime.version="1.8.0_222-b10", service.instance.id="", service.name="", telemetry.distro.name="opentelemetry-java-instrumentation", telemetry.distro.version="2.6.0", telemetry.sdk.language="java", telemetry.sdk.name="opentelemetry", telemetry.sdk.version="1.40.0"}}, instrumentationScopeInfo=InstrumentationScopeInfo{name=io.opentelemetry.runtime-telemetry-java8, version=2.6.0-alpha, schemaUrl=null, attributes={}}, name=jvm.thread.count, description=Number of executing platform threads., unit={thread}, type=LONG_SUM, data=ImmutableSumData{points=[ImmutableLongPointData{startEpochNanos=1723180814559000000, epochNanos=1723180874582000000, attributes={jvm.thread.daemon=false}, value=1, exemplars=[]}, ImmutableLongPointData{startEpochNanos=1723180814559000000, epochNanos=1723180874582000000, attributes={jvm.thread.daemon=true}, value=24, exemplars=[]}], monotonic=false, aggregationTemporality=CUMULATIVE}}

Steps to reproduce

Instrument with java agent default config

Expected behavior

jvm_thread_count will contain both jvm_thread_daemon and jvm_thread_state

Actual behavior

Only jvm_thread_daemon found in the exporter output

Javaagent or library instrumentation version

2.6.0-alpha

Environment

JDK: OpenJDK 8u222 (1.8.0_222-b10)
OS: Linux 3.10.0-1062.18.1.el7.x86_64

Additional context

No response

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