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

Need to design a context that doesn't always flow to callees #1655

Open
heaths opened this issue Apr 30, 2024 · 1 comment
Open

Need to design a context that doesn't always flow to callees #1655

heaths opened this issue Apr 30, 2024 · 1 comment
Labels
design-discussion An area of design currently under discussion and open to team and community feedback.

Comments

@heaths
Copy link
Member

heaths commented Apr 30, 2024

We need a way to start over with a new Context - optionally keeping telemetry spans - when calling into other crates' methods like azure_identity. We don't want, for example, Retry options for Key Vault clients to pass through to DefaultAzureCredential. See Go for more context and solution concept ideas.

@heaths heaths added the design-discussion An area of design currently under discussion and open to team and community feedback. label Apr 30, 2024
@heaths
Copy link
Member Author

heaths commented Apr 30, 2024

One idea might be to define a trait that anything added to the Context's HashMap has to implement that says whether it's durable. A client or token credential can specify whether non-durable context should be dropped when crossing boundaries. This would allow spans through.

To actually trace, like Go and some other languages, a non-durable context object could be the trace listener (tracer) such that a user can specify tracing for one client but not another.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-discussion An area of design currently under discussion and open to team and community feedback.
Projects
None yet
Development

No branches or pull requests

1 participant