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

Grafana Alloy unable to send traces to Grafana Tempo on same network - unknown service opentelemetry.proto.collector.trace.v1.TraceService. #2782

Open
henryobiaraije opened this issue Feb 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@henryobiaraije
Copy link

henryobiaraije commented Feb 20, 2025

What's wrong?

From the docker alloy container, I get this error

2025-02-20 16:09:29 ts=2025-02-20T15:09:29.962010795Z level=error msg="Exporting failed. Dropping data." component_path=/ component_id=otelcol.exporter.otlp.tempo error="not retryable error: Permanent error: rpc error: code = Unimplemented desc = unknown service opentelemetry.proto.collector.trace.v1.TraceService" dropped_items=18

Image

Image

And I am successfully sending traces from my nextjs app to alloy. It looks like alloy is having issues sending the traces to tempo.

Image

Steps to reproduce

docker-compose.yaml

networks:
  loki:

services:
  loki:
    image: grafana/loki:latest
    ports:
      - "3100:3100"
    volumes:
      - ./loki/local-config.yaml:/etc/loki/local-config.yaml
    command: -config.file=/etc/loki/local-config.yaml
    networks:
      - loki

  tempo:
    image: grafana/tempo:latest
    command: [ "-config.file=/etc/tempo.yaml" ]
    volumes:
      - ./tempo/tempo.yaml:/etc/tempo.yaml 
    networks:
      - loki
    # Add these resource limits
    deploy:
      resources:
        limits:
          memory: 8G
        reservations:
          memory: 5G

  alloy:
    image: grafana/alloy:latest
    volumes:
      - ./alloy/config.alloy:/etc/alloy/config.alloy
    ports:
      - "12345:12345"
      - "4317:4317"
      - "4318:4318"
    networks:
      - loki
    command:
      - run
      - --server.http.listen-addr=0.0.0.0:12345
      - --storage.path=/var/lib/alloy/data
      - /etc/alloy/config.alloy
    depends_on:
      - tempo

  promtail:
    environment:
      - GRAFANA_TOKEN={{GRAFANA_TOKEN}}
    image: grafana/promtail:latest
    volumes:
      - ./promtail/promtail-config.yml:/etc/promtail/promtail-config.yml
      - ${LOGS_LOCATION}:/var/log/
    command: -config.file=/etc/promtail/promtail-config.yml
    networks:
      - loki

  grafana:
    environment:
      - GF_PATHS_PROVISIONING=/etc/grafana/provisioning
      - GF_AUTH_ANONYMOUS_ENABLED=true
      - GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
      - GF_SERVER_HTTP_TIMEOUT=1200
      # Add these environment variables
      - GF_DATAPROXY_TIMEOUT=1200
      - GF_DATAPROXY_KEEP_ALIVE_SECONDS=120
      # Add these new environment variables
      - GF_SERVER_MAX_REQUEST_SIZE=512
      - GF_SERVER_MAX_BODY_SIZE=512
      # Add these environment variables to increase message size limits
      - GF_DATAPROXY_MAX_RESPONSE_BYTES=499919430400
      - GF_DATAPROXY_RESPONSE_LIMIT=499919430400
    volumes:
      - ./grafana/grafana.ini:/etc/grafana/grafana.ini
    command:
      - -config=/etc/grafana/grafana.ini
    entrypoint:
      - sh
      - -euc
      - |
        mkdir -p /etc/grafana/provisioning/datasources
        cat <<EOF > /etc/grafana/provisioning/datasources/ds.yaml
        apiVersion: 1
        datasources:
        - name: Loki
          type: loki
          access: proxy 
          orgId: 1
          url: http://loki:3100
          basicAuth: false
          isDefault: true
          version: 1
          editable: false
          jsonData:
            timeout: 120
            maxLines: 1000
            maxDataPoints: 1000
            tlsSkipVerify: true
        - name: Tempo
          type: tempo
          access: proxy
          orgId: 1
          url: http://tempo:3200
          basicAuth: false
          version: 1
          editable: false
        EOF
        /run.sh
    image: grafana/grafana:latest
    ports:
      - "3101:3000"
    networks:
      - loki

Then allloy config

livedebugging {
  enabled = true
}

otelcol.receiver.otlp "default" {
  http {
    endpoint = "0.0.0.0:4318"
  }
  grpc {
    endpoint = "0.0.0.0:4317"
  }

  output {
    // logs = [otelcol.exporter.loki.default.input]
    traces = [otelcol.processor.batch.default.input]
  }
}

otelcol.processor.batch "default" {
  output {
    // metrics = [otelcol.exporter.otlp.production.input]
    // logs    = [otelcol.exporter.otlp.production.input]
    traces  = [otelcol.exporter.otlp.tempo.input]
  }
}

otelcol.exporter.loki "default" {
  forward_to = [loki.write.local.receiver]
}

otelcol.exporter.otlp "tempo" {
    client {
        endpoint = "tempo:9095"
        tls {
            insecure             = true
            insecure_skip_verify = true
        }
    }
}

loki.write "local" {
  endpoint {
    url = "loki:3100"
  }
}

Then tempo config


server:
  http_listen_port: 3200
  grpc_listen_port: 9095
  grpc_server_max_recv_msg_size: 104857600  # 100MB
  grpc_server_max_send_msg_size: 104857600  # 100MB

distributor:
  receivers:
    otlp:
      protocols:
        grpc:
        http:

storage:
  trace:
    backend: local
    local:
      path: /tmp/tempo/blocks

System information

On windows docker

Software version

No response

Configuration


Logs

2025-02-20 16:09:29 ts=2025-02-20T15:09:29.962010795Z level=error msg="Exporting failed. Dropping data." component_path=/ component_id=otelcol.exporter.otlp.tempo error="not retryable error: Permanent error: rpc error: code = Unimplemented desc = unknown service opentelemetry.proto.collector.trace.v1.TraceService" dropped_items=18
@henryobiaraije henryobiaraije added the bug Something isn't working label Feb 20, 2025
@henryobiaraije henryobiaraije changed the title Grafana Alloy unable to send traces to Grafana Tempo on same network. Grafana Alloy unable to send traces to Grafana Tempo on same network - unknown service opentelemetry.proto.collector.trace.v1.TraceService. Feb 21, 2025
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

1 participant