Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jan-nemo opened this issue Sep 9, 2024 · 2 comments
Labels
pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package question Further information is requested

Comments

@jan-nemo
Copy link

jan-nemo commented Sep 9, 2024

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

@jan-nemo jan-nemo added needs-triage New issues which have not been classified or triaged by a community member question Further information is requested labels Sep 9, 2024
@jpkrohling
Copy link
Member

We discussed this (in generic terms) during today's GC triage meeting and think it might be a good candidate for the spec. We already have a similar behavior as part of the Collector, and it could be helpful to standardize the behavior. For instance, we might want to provide a config option to refresh the token before it expires.

@jan-nemo
Copy link
Author

We discussed this (in generic terms) during today's GC triage meeting and think it might be a good candidate for the spec. We already have a similar behavior as part of the Collector, and it could be helpful to standardize the behavior. For instance, we might want to provide a config option to refresh the token before it expires.

Sounds great! Is there any chance this could be implemented in the near future in the .NET SDK? I’m curious because we’re planning to go to production with OpenTelemetry .NET SDK for logging, and it would be perfect for us to use gRPC instead of HTTP protobuf with a custom HttpClient.

@TimothyMothra TimothyMothra added pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package and removed needs-triage New issues which have not been classified or triaged by a community member labels Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:OpenTelemetry.Exporter.OpenTelemetryProtocol Issues related to OpenTelemetry.Exporter.OpenTelemetryProtocol NuGet package question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants