Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 this issue Oct 16, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@navnitkum
Copy link

Describe the bug

A clear and concise description of what the bug is.

Environment

  • OS: linux/amd64
  • Go Version: [e.g. 1.23]

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: - name: autoinstrumentation-go image: otel/autoinstrumentation-go imagePullPolicy: IfNotPresent env: - name: OTEL_METRICS_EXPORTER value: otlp - name: OTEL_GO_AUTO_TARGET_EXE value: /otel-go-testing-final - name: OTEL_EXPORTER_OTLP_ENDPOINT value: "http://apm-collector.opentelemetry-operator-system.svc.cluster.local:4318" - name: OTEL_SERVICE_NAME value: "animal-bird-app" securityContext: privileged: true runAsUser: 0 - name: animal-bird-app image: asia-southeast2-docker.pkg.dev/lip-prod-sre-3a7f/apm-golang/otel-go-testing-final:v1 # Replace with your image repository if you're using a container registry ports: - containerPort: 8080

Expected behavior

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

@navnitkum navnitkum added the bug Something isn't working label Oct 16, 2024
@damemi
Copy link
Contributor

damemi commented Oct 16, 2024

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
Copy link
Author

navnitkum commented Oct 16, 2024

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
Copy link
Contributor

damemi commented Oct 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants