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

Consider having a map and request header Carrier in SDK #2243

Closed
rakyll opened this issue Sep 16, 2021 · 2 comments · Fixed by #2334
Closed

Consider having a map and request header Carrier in SDK #2243

rakyll opened this issue Sep 16, 2021 · 2 comments · Fixed by #2334
Labels
enhancement New feature or request

Comments

@rakyll
Copy link
Contributor

rakyll commented Sep 16, 2021

The propagation package is a highly generic package and it requires users to implement common cases from scratch by implementing the interfaces. Two of these interfaces are implementation with the builtin map type and a carrier that works with a request object.

It's be useful to provide two Carrier implementations out of the box from the SDK or somewhere else:

func NewMapCarrier(m map[string][]byte) propagation.Carrier
func NewHeaderCarrier(h http.Header) propagation.Carrier
@rakyll rakyll added the enhancement New feature or request label Sep 16, 2021
@Aneurysm9
Copy link
Member

We do provide a HeaderCarrier, but having a carrier implementation for map[string][]byte could be a nice addition.

@tobert
Copy link

tobert commented Sep 22, 2021

this would be so nice, I've written this a few times now for various projects and it feels weird to write & test a string map wrapper each time when it's the same every time and a lot of folks doing interesting things with trace propagation need it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants