open-telemetry / opentelemetry-rust

The Rust OpenTelemetry implementation
https://opentelemetry.io
Apache License 2.0
1.87k stars 437 forks source link

[Bug]: otlp example does not work without configuration update #1998

Open krlohnes opened 3 months ago

krlohnes commented 3 months ago

What happened?

I tried to run basic-otlp example and it simply didn't work.

I update the first section of otel-collector-config.yml to the following

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

and it started working.

API Version

0.24.0

SDK Version

0.24.1

What Exporter(s) are you seeing the problem on?

OTLP

Relevant log output

OpenTelemetry log error occurred. Exporter otlp encountered the following errors: the grpc server returns error (The operation was cancelled): , detailed error message: operation was canceled
cijothomas commented 3 months ago

Need a similar fix like https://github.com/open-telemetry/opentelemetry-rust/pull/1982/files to this example too. @krlohnes Would you mind sending a PR to fix?

lalitb commented 3 months ago

Also, we need similar fix in integration tests - https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry-otlp/tests/integration_test/otel-collector-config.yaml