Validate the collector config

Check the collector pipeline before a restart. Catches broken receivers, processors and exporters

otelcol validate --config=/etc/otelcol/config.yaml

tool
opentelemetry3 commands
tags
opentelemetryotelcitroubleshooting

More opentelemetry commands

  • export OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4317 OTEL_RESOURCE_ATTRIBUTES=service.name=api,deployment.environment=prod

    Set the endpoint and resource attributes for auto-instrumentation without code changes. 4317 is gRPC, 4318 is HTTP

  • curl -s -XPOST http://collector:4318/v1/traces -H 'Content-Type: application/json' -d @trace.json -w '%{http_code}'

    Smoke-test the OTLP HTTP receiver with a sample payload. Note: use port 4318, not 4317

all 3 opentelemetry commands