Reputation: 49
I'm monitoring Java apps with Opentelemetry and exported data to Elastic APM. This integration works well, however we are missing some critical information about metrics.
We want to collect information about the host system and jvm metrics.
Openetelemetry collector is running as sidecar in k8s and its conf is below:
apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
name: app-sidecar
spec:
mode: sidecar
config: |
receivers:
otlp:
protocols:
http:
grpc:
exporters:
logging:
otlp:
endpoint: http://endpoint:8200
headers:
Authorization: Bearer token
tls:
insecure: true
service:
pipelines:
traces:
receivers: [otlp]
exporters: [logging, otlp]
metrics:
receivers: [otlp]
exporters: [logging, otlp]
logs:
receivers: [otlp]
exporters: [logging, otlp]
Upvotes: 0
Views: 1873
Reputation: 28716
Start your Java app with java agent opentelemetry-javaagent.jar (OTEL java autoinstrumentation). Configure it to export metrics (it provides by default JVM metrics), for example OTEL_METRICS_EXPORTER=otlp, OTEL_EXPORTER_OTLP_ENDPOINT=<your side car otel collector otlp grpc endpoint>"
- check doc for right doc/syntax.
Upvotes: 1