Verification of otelcol.receiver.otlp using grpc protocol

Hi there,
I have deployed Alloy using helm chart and want to use it as receiver of OpenTelemetry data using otelcol.receiver.otlp, process it in batch (otelcol.processor.batch) and send out to another otelcol.exporter.otlp.
My otelcol.receiver.otlp component config looks like following:

otelcol.receiver.otlp "default" {
  grpc {
    endpoint = "0.0.0.0:4317"
    transport = "tcp"
  }
  http {
    endpoint = "0.0.0.0:4318"
    
  }
  output {
    metrics = [otelcol.processor.batch.default.input] 
    logs = [otelcol.processor.batch.default.input]
    traces = [otelcol.processor.batch.default.input]
  }
}otelcol.receiver.otlp "default" {
  grpc {
    endpoint = "0.0.0.0:4317"
  }
  http {
    endpoint = "0.0.0.0:4318"
    
  }
  output {
    metrics = [otelcol.processor.batch.default.input] 
    logs = [otelcol.processor.batch.default.input]
    traces = [otelcol.processor.batch.default.input]
  }
}

How can I verify if alloy is able to consume data which are sent to it’s endpoint at potr 4317?
My container is reachable, the port is exposed and open but I cant see any data incoming in livedebugging or console output or anywhere else.

When I run the container this is what I can see in log of container :

ts=2025-06-27T07:32:27.993551677Z level=debug msg="finished node evaluation" controller_path=/ controller_id="" node_id=otelcol.processor.batch.default duration=14.143539786s
ts=2025-06-27T07:32:28.819917898Z level=debug msg="finished node evaluation" controller_path=/ controller_id="" node_id=otelcol.receiver.otlp.default duration=12.916192053s
ts=2025-06-27T07:32:28.786143316Z level=info msg="now listening for http traffic" service=http addr=0.0.0.0:12345
ts=2025-06-27T07:32:29.014336083Z level=info msg="peers changed" service=cluster peers_count=1 min_cluster_size=0 peers=lux-alloy-latest-5dc98d495d-26r76
ts=2025-06-27T07:32:29.243244346Z level=info msg="Starting GRPC server" component_path=/ component_id=otelcol.receiver.otlp.default endpoint=0.0.0.0:4317
ts=2025-06-27T07:32:30.108853604Z level=info msg="Starting HTTP server" component_path=/ component_id=otelcol.receiver.otlp.default endpoint=0.0.0.0:4318

Assuming that GRPC server in started - I wanted to use grpcurl to verify if grpc server is working but I got error that reflection api is not configured.

So, how can I verify if GRPC server is working (able to receive otlp data over grpc port) and whether the otelcol.receiver.otlp is working?

Many thanks for any help - it would be very much appreciated

I am sure there are others with better and more mature practices than I do. But what I do is I have a simple python script that can be executed and just outputs bogus metrics to a specified endpoint. Unfortunately I can’t share my script with you, since I only use it for prometheus, loki, and tracing. But you can look at GitHub - open-telemetry/opentelemetry-python: OpenTelemetry Python API and SDK, there are some example there.

So, just to leave here something maybe usefull - this is how I was able to verify that alloy it’s able to receive / consume test data… otel-cli was the one :slight_smile:

otel-cli span --name “some_label_test-span” --endpoint “alloy.svc.cluster.local:4317” --insecure --verbose --protocol grpc

When I hit the command above, I got it visible in live debugging mode of the otelcol.receiver.otlp

1 Like