Closed madhureddy143 closed 3 hours ago
Pinging code owners:
exporter/elasticsearch: @JaredTan95 @carsonip @lahsivjar
See Adding Labels via Comments if you do not have permissions to add labels yourself.
I see that you are using APM server, which is responsible for receiving otlp and sending to Elasticsearch. You should not use elasticsearchexporter when using APM Server, as it send to Elasticsearch directly, which is also why it "complains that it’s not a valid Elastic server" when you tried to point elasticsearchexporter at APM Server.
Assuming you want to use APM server, there are data points that APM server does not support now, for example, exponential histogram (see issue https://github.com/elastic/apm-server/issues/7614). Can you use a debugexporter to see if your data contain any exponential histograms?
/label -needs-triage
hi @carsonip,
Thank you for looking into this issue. we couldn’t find an Elastic APM category and thought Elasticsearch exporter category was the closest match. As requested, please find below the debug log. Does it provide any clues about the root cause of the issue? We’ve tried several exporters, but nothing seems to work. Could you please suggest if we need to use a different exporter or apply any specific transformation configuration in the OpenTelemetry Collector to enable us to view metrics along with traces and logs in Elastic APM?
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 7340032
Metric #7
Descriptor:
-> Name: process.runtime.jvm.system.cpu.utilization
-> Description: Recent cpu utilization for the whole system
-> Unit: 1
-> DataType: Gauge
NumberDataPoints #0
StartTimestamp: 2024-11-26 21:50:43.379033 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 0.355701
Metric #8
Descriptor:
-> Name: process.runtime.jvm.buffer.count
-> Description: The number of buffers in the pool
-> Unit: {buffers}
-> DataType: Sum
-> IsMonotonic: false
-> AggregationTemporality: Cumulative
NumberDataPoints #0
Data point attributes:
-> pool: Str(mapped)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 0
NumberDataPoints #1
Data point attributes:
-> pool: Str(direct)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 14
Metric #9
Descriptor:
-> Name: process.runtime.jvm.memory.limit
-> Description: Measure of max obtainable memory
-> Unit: By
-> DataType: Sum
-> IsMonotonic: false
-> AggregationTemporality: Cumulative
NumberDataPoints #0
Data point attributes:
-> pool: Str(Metaspace)
-> type: Str(non_heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 536870912
NumberDataPoints #1
Data point attributes:
-> pool: Str(Compressed Class Space)
-> type: Str(non_heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 528482304
NumberDataPoints #2
Data point attributes:
-> pool: Str(CodeHeap 'profiled nmethods')
-> type: Str(non_heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 122912768
NumberDataPoints #3
Data point attributes:
-> pool: Str(G1 Old Gen)
-> type: Str(heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 1073741824
NumberDataPoints #4
Data point attributes:
-> pool: Str(CodeHeap 'non-profiled nmethods')
-> type: Str(non_heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 122912768
NumberDataPoints #5
Data point attributes:
-> pool: Str(CodeHeap 'non-nmethods')
-> type: Str(non_heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 5832704
Metric #10
Descriptor:
-> Name: process.runtime.jvm.buffer.usage
-> Description: Memory that the Java virtual machine is using for this buffer pool
-> Unit: By
-> DataType: Sum
-> IsMonotonic: false
-> AggregationTemporality: Cumulative
NumberDataPoints #0
Data point attributes:
-> pool: Str(mapped)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 0
NumberDataPoints #1
Data point attributes:
-> pool: Str(direct)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 114688
Metric #11
Descriptor:
-> Name: process.runtime.jvm.memory.usage_after_last_gc
-> Description: Measure of memory used after the most recent garbage collection event on this pool
-> Unit: By
-> DataType: Sum
-> IsMonotonic: false
-> AggregationTemporality: Cumulative
NumberDataPoints #0
Data point attributes:
-> pool: Str(G1 Eden Space)
-> type: Str(heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 0
NumberDataPoints #1
Data point attributes:
-> pool: Str(G1 Old Gen)
-> type: Str(heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 0
NumberDataPoints #2
Data point attributes:
-> pool: Str(G1 Survivor Space)
-> type: Str(heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 7340032
Metric #12
Descriptor:
-> Name: process.runtime.jvm.memory.committed
-> Description: Measure of memory committed
-> Unit: By
-> DataType: Sum
-> IsMonotonic: false
-> AggregationTemporality: Cumulative
NumberDataPoints #0
Data point attributes:
-> pool: Str(Metaspace)
-> type: Str(non_heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 320471040
NumberDataPoints #1
Data point attributes:
-> pool: Str(Compressed Class Space)
-> type: Str(non_heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 53346304
NumberDataPoints #2
Data point attributes:
-> pool: Str(CodeHeap 'profiled nmethods')
-> type: Str(non_heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 62455808
NumberDataPoints #3
Data point attributes:
-> pool: Str(G1 Eden Space)
-> type: Str(heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 572522496
NumberDataPoints #4
Data point attributes:
-> pool: Str(G1 Old Gen)
-> type: Str(heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 27131904
NumberDataPoints #6
Data point attributes:
-> pool: Str(CodeHeap 'non-nmethods')
-> type: Str(non_heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 2555904
NumberDataPoints #7
Data point attributes:
-> pool: Str(G1 Survivor Space)
-> type: Str(heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 7340032
Metric #13
Descriptor:
-> Name: process.runtime.jvm.classes.current_loaded
-> Description: Number of classes currently loaded
-> Unit: {class}
-> DataType: Sum
-> IsMonotonic: false
-> AggregationTemporality: Cumulative
NumberDataPoints #0
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 53973
Metric #14
Descriptor:
-> Name: process.runtime.jvm.threads.count
-> Description: Number of executing threads
-> Unit: {thread}
-> DataType: Sum
-> IsMonotonic: false
-> AggregationTemporality: Cumulative
NumberDataPoints #0
Data point attributes:
-> daemon: Bool(false)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 20
NumberDataPoints #1
Data point attributes:
-> daemon: Bool(true)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 21:50:44.879009 +0000 UTC
Value: 173
{"kind": "exporter", "data_type": "metrics", "name": "debug"}
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 22:08:01.379019 +0000 UTC
Value: 0
NumberDataPoints #2
Data point attributes:
-> pool: Str(G1 Survivor Space)
-> type: Str(heap)
StartTimestamp: 2024-11-26 10:04:25.373018 +0000 UTC
Timestamp: 2024-11-26 22:08:01.379019 +0000 UTC
Value: 13631488
Metric #12
Descriptor:
-> Name: process.runtime.jvm.memory.committed
-> Description: Measure of memory committed
-> Unit: By
-> DataType: Sum
-> IsMonotonic: false
-> AggregationTemporality: Cumulative
NumberDataPoints #0
Data point attributes:
-> pool: Str(Metaspace)
-> type: Str(non_heap)
with the latest otel java instrumentation package i am able to send metrics to my apm end point but few errors still persist
package used:- https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/tag/v2.10.0
error :-
pls do suggest how can i fix it.
@madhureddy143 are there any more unsupported data points
logs after updating the package?
According to docs, to emit jvm.system.cpu.utilization
, start your java application with -Dotel.instrumentation.runtime-telemetry.emit-experimental-telemetry=true
. e.g. java ... -Dotel.instrumentation.runtime-telemetry.emit-experimental-telemetry=true ...
@madhureddy143 are there any more
unsupported data points
logs after updating the package?
@carsonip, thank you for the help, after the package update only jvm.system.cpu.utilization is missing. will try ur suggestion below
According to docs, to emit
jvm.system.cpu.utilization
, start your java application with-Dotel.instrumentation.runtime-telemetry.emit-experimental-telemetry=true
. e.g.java ... -Dotel.instrumentation.runtime-telemetry.emit-experimental-telemetry=true ...
@carsonip
i re ran with the flags and i can see the CPU utilization in my Kibana dashboard, thank you for your help.
Component(s)
exporter/elasticsearch
What happened?
Description
We are attempting to use OpenTelemetry Collector with Elastic APM in a Docker Compose-based setup. The installation includes:
The stack is running without any issues.
Current Setup
We are using a model where the OpenTelemetry Java Auto-Instrumentation agent sends logs, metrics, and traces to the OpenTelemetry Collector.
Troubleshooting Steps Taken
Tried Different Exporter Configurations:
otlp
otlp/apm
otlp/elastic
otlphttp
otlp/httpprobf
otlphttp/elasticsearch
otlp/http
ElasticSearch Exporter:
Tried Transformations:
Verified Version Compatibility:
Request for Help
Could you suggest which exporter configuration we should use to ensure that metrics are exported correctly to Elastic APM? If additional transformations or configurations are required, guidance on that would also be appreciated.
Steps to Reproduce
docker compose file
env file for docker compose
application server otel java configuration file
Expected Result
successfully send metrics to elastic APM, which in turn visualized in Kibana
Actual Result
metrics are not visualized in Kibana
Collector version
v0.114.0
Environment information
Environment
os :- ubuntu deploymet mode:- docker image - otel/opentelemetry-collector-contrib:v0.114.0 app type - java app deployed in tomcat [ using otel java auto instrumentation jar file ]
OpenTelemetry Collector configuration
Log output
Additional context
No response