opentelemetry-go icon indicating copy to clipboard operation
opentelemetry-go copied to clipboard

rpc error: code = Unimplemented desc = unknown service

Open william-lbn opened this issue 3 years ago • 2 comments
trafficstars

follow OpenTelemetry Collector Traces Example,but I am using binary.

The operation is as follows:

git clone [email protected]:open-telemetry/opentelemetry-go-contrib.git
make otelcontribcol

cd  ~/opentelemetry-collector/bin

./otelcontribcol --config /root/opentelemetry-config/demo-config.yaml

demo-config.yaml is

receivers:
  otlp:
    protocols:
      grpc:
        endpoint: "0.0.0.0:4317"

processors:

exporters:
  prometheusremotewrite:
    endpoint: "http://192.168.1.20:30566/api/v1/write"

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: []
      exporters: [prometheusremotewrite]

git clone [email protected]:open-telemetry/opentelemetry-go.git

cd  ~/opentelemetry-go/example/otel-collector

go run main.go 
2022/05/10 01:46:15 Waiting for connection...
2022/05/10 01:46:15 Doing really hard work (1 / 10)
2022/05/10 01:46:16 Doing really hard work (2 / 10)
2022/05/10 01:46:17 Doing really hard work (3 / 10)
2022/05/10 01:46:18 Doing really hard work (4 / 10)
2022/05/10 01:46:19 Doing really hard work (5 / 10)
2022/05/10 01:46:20 Doing really hard work (6 / 10)
2022/05/10 01:46:20 rpc error: code = Unimplemented desc = unknown service opentelemetry.proto.collector.trace.v1.TraceService
2022/05/10 01:46:21 Doing really hard work (7 / 10)
2022/05/10 01:46:22 Doing really hard work (8 / 10)
2022/05/10 01:46:23 Doing really hard work (9 / 10)
2022/05/10 01:46:24 Doing really hard work (10 / 10)
2022/05/10 01:46:25 Done!
2022/05/10 01:46:25 rpc error: code = Unimplemented desc = unknown service opentelemetry.proto.collector.trace.v1.TraceService
2022/05/10 01:46:25 rpc error: code = Unimplemented desc = unknown service opentelemetry.proto.collector.trace.v1.TraceService

tutorial use image: otel/opentelemetry-collector:0.6.0 image

I don't know version of the binary.

william-lbn avatar May 10 '22 02:05 william-lbn

Could anyone do me a favor? thanks.

william-lbn avatar May 10 '22 02:05 william-lbn

  1. Your collector configuration is suited for metrics - not traces. The example is made for traces.
  2. I do not believe otel/opentelemetry-collector:0.6.0 was supporting metrics - however, I have not checked it. Try using something newer.

pellared avatar May 10 '22 09:05 pellared

@william-lbn can you confirm this is still an issue for you?

MrAlias avatar Oct 20 '22 22:10 MrAlias

Closing as this looks stale. Please re-open if this was an error.

MrAlias avatar Feb 17 '23 19:02 MrAlias

failed to upload metrics: rpc error: code = Unimplemented desc = unknown service opentelemetry.proto.collector.metrics.v1.MetricsService I am getting this error while using grpc endpoint to send metric data to otel collector I am using otel collector otelcol: image: otel/opentelemetry-collector-contrib:0.76.1

Razihmad avatar Oct 25 '23 05:10 Razihmad

Not sure if this helps, I was also facing this issue, and turned out that I haven't configured the service.pipelines.metrics. So after I've added the following, it no longer complained:

apiVersion: opentelemetry.io/v1alpha1
kind: OpenTelemetryCollector
metadata:
  name: sidecar
  namespace: apps
spec:
  mode: sidecar
  config: |
    receivers:
      otlp:
        protocols:
          grpc:
            endpoint: 127.0.0.1:4317
          http:
            endpoint: 127.0.0.1:4318
    # For sure need to make sure the "batch" processor is configured:
    processors:
      batch:
    exporters:
      # For sure need to add the following 1 line to make sure "debug" exporter is configured:
      debug: {}
      logging:
      otlp:
        endpoint: jaeger-operator-jaeger-collector.jaeger.svc:4317  # with ../jaeger-operator/ helm-chart
        tls:
          insecure: true
      # For sure need to add the following 4 lines to make sure exporter for prometheus is configured:
      prometheus:
        endpoint: "0.0.0.0:8889"
        const_labels:
          otel: "1"
    service:
      telemetry:
        logs:
          level: "debug"
      pipelines:
        traces:
          receivers: [otlp]
          processors: []
          exporters: [logging, otlp]
        # ADDED THE FOLLOWING LINES:
        metrics:
          receivers: [otlp]
          processors: [batch]
          exporters: [debug, prometheus]

The docker image I'm using is:

ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:0.89.0

It's the otc-container being injected by the opentelemetry-operator helm chart. Installation instructions here: https://operatorhub.io/operator/opentelemetry-operator

minixxie avatar Dec 05 '23 04:12 minixxie