Skip to content

Replace CloudTelemetryAuthInterceptor with a tonic connector #5223

@coryan

Description

@coryan

We use CloudTelemetryAuthInterceptor as an interceptor to inject the authentication headers. The interceptors are synchronous, our credentials are async. We periodically refresh the credentials in a background thread and use a tokio::sync::watch to bridge the sync/async gap.

We could use a custom connector to create the Channel:

https://docs.rs/tonic/latest/tonic/transport/struct.Endpoint.html#method.connect_with_connector

https://docs.rs/tonic/latest/tonic/transport/struct.Channel.html#method.new

In that custom connector we can add an async layer that injects the auth headers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p3Desirable enhancement or fix. May not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions