open-telemetry / opentelemetry-dotnet

The OpenTelemetry .NET Client
https://opentelemetry.io
Apache License 2.0
3.18k stars 753 forks source link

[question] How to handle token refresh in gRPC logs exporter for OpenTelemetry? #5820

Open jan-nemo opened 2 weeks ago

jan-nemo commented 2 weeks ago

What is the question?

We are integrating OpenTelemetry into our product to export logs via the OpenTelemetry gRPC protocol. Our target service uses OpenID Connect (Client Credentials Flow) for authentication, requiring a valid access token in the metadata of each request.

The issue we're facing is that when the access token expires, we are unable to update it in the metadata for subsequent requests. This is causing failures once the token becomes invalid.

Could you please provide guidance on how to handle refreshing the access token and updating it in the gRPC metadata for the logs exporter?

Thank you!

Additional context

No response