open-telemetry / opentelemetry-go-instrumentation

OpenTelemetry Auto Instrumentation using eBPF
https://opentelemetry.io
Apache License 2.0
548 stars 83 forks source link

i am not getting apm metrics for golang apps while doing auto-instrumentation sidecard approach , though traces are working well and good #1201

Open navnitkum opened 1 month ago

navnitkum commented 1 month ago

Describe the bug

A clear and concise description of what the bug is.

Environment

To Reproduce

otel-collector config

apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
  name: otel
  namespace: opentelemetry-operator-system
spec:
  args:
    feature-gates: '-component.UseLocalHostAsDefaultHost'
  config:
    exporters:
      debug: {}
      otlphttp/tempo:
        endpoint: http://<endpoint-to-tempo>:4318
        tls:
          insecure: true
      prometheusremotewrite/victoriametrics:
        endpoint: >-
          http://<endpoint-of-victoriametrics>:8429/api/v1/write
        tls:
          insecure: true
    extensions:
      health_check: {}
    processors: {}
    receivers:
      otlp:
        protocols:
          grpc:
            endpoint: 0.0.0.0:4317
          http:
            endpoint: 0.0.0.0:4318
    service:
      extensions:
        - health_check
      pipelines:
        metrics:
          exporters:
            - prometheusremotewrite/victoriametrics
            - debug
          receivers:
            - otlp
        traces:
          exporters:
            - otlphttp/tempo
            - debug
          receivers:
            - otlp

Steps to reproduce the behavior:

deploy the collector and also the animal app `apiVersion: apps/v1 kind: Deployment metadata: name: animal-bird-app namespace: opentelemetry-operator-system labels: app: animal-bird-app spec: replicas: 1 selector: matchLabels: app: animal-bird-app template: metadata: labels: app: animal-bird-app spec: containers:

2024-10-16T16:51:05.305Z info TracesExporter {"kind": "exporter", "data_type": "traces", "name": "debug", "resource spans": 1, "spans": 5} 2024-10-16T16:56:36.942Z info TracesExporter {"kind": "exporter", "data_type": "traces", "name": "debug", "resource spans": 1, "spans": 2} 2024-10-16T16:56:41.878Z info TracesExporter {"kind": "exporter", "data_type": "traces", "name": "debug", "resource spans": 1, "spans": 3}

A clear and concise description of what you expected to happen. the metrics should also come as the auto-instrumentation behaviour but only traces are coming below is the collector logs

damemi commented 1 month ago

This auto-instrumentation project is currently for traces only, it will not generate metrics for you. Are you instrumenting your app for metrics some other way?

navnitkum commented 1 month ago

no i thought auto-instrumentation could have helped me but was not aware that it doesn't work for metrics any plan for the same in near future?

damemi commented 1 month ago

It's one of our long term goals, but not for the near future unfortunately