-
Notifications
You must be signed in to change notification settings - Fork 384
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
Adding Context implemenations for HeaderMap and MetadataMap #115
Conversation
Nice start, other than the few lint errors seems like it would be nice to still be able to pass a static str to a carrier as well. Maybe have the methods take |
Well, the trait itself does still take a |
Yeah seems fine as it's not intended to be used in production as a carrier. Also for the feature names, are you thinking that there would be other http/tonic features besides context? or would |
The feature names can't be the same as the dependency names, so that's why I put the |
The crate name for optional dependencies is the feature name by default, so you can simply remove them from the feature list and it will be |
Oh, you learn something new every day. I'll fix that. |
Done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks! Just have to sign the cla
OK done. Do I need to make another commit to make it run the check again? |
Pushing a new change will re-trigger. It looks like some other CI tasks failed though. |
Looks like there is an issue with the nightly builds |
@jtescher @MikeGoldsmith I'm not able to merge because the base branch is protected. Can you merge this please? |
@iredelmeier any way we can make the nightly checks optional? or get admin to merge anyway? |
@jtescher making the checks either optional or skipping them if a necessary component isn't available seems reasonable to me. (Giving admins permission to merge could also be viable but might be too slow. I don't think "maintainers" count as "admins" for that purpose, although I could be wrong.) The lint script currently does what I mean above re: only actually running clippy if it's available - see here. |
@iredelmeier Updated the config in #120 but the previous checks are still marked as required in the protected branch config I believe (which I do not have access to). |
Moving the discussion over there :) |
@swilcox3 looks like rustfmt on nightly works again, just one lint left 🎉 |
To make it easier to use opentelemetry from
hyper
andtonic
, I added implementations for api::context::propagation::Carrier for HeaderMap and MetadataMap under feature flagshttp_context
andtonic_context
respectively.cargo test --all
passes,cargo clippy --all
passes. Output in Jaeger of grpc example is the same. Output ofcargo bench
: