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

Add option to specify propagators for httptrace and grpctrace plugins #499

Closed
rghetia opened this issue Feb 27, 2020 · 4 comments · Fixed by #784
Closed

Add option to specify propagators for httptrace and grpctrace plugins #499

rghetia opened this issue Feb 27, 2020 · 4 comments · Fixed by #784
Assignees

Comments

@rghetia
Copy link
Contributor

rghetia commented Feb 27, 2020

ochttp allows specifying propagators. Similar option should be added to httptrace and grpctrace

@krnowak
Copy link
Member

krnowak commented Mar 10, 2020

After having a look, I'm not sure how to solve it. grpctrace and httptrace (not the clienttrace part) are basically free functions Inject and Extract. So there is no receiver object that could hold configurable propagators. So I see three options:

  1. Leave it mostly alone, document that those plugins are using global propagators. Troublesome if we want to use both plugins with in the process, each with different propagators.
  2. Add plugin-specific global propagators.
  3. Add a propagator parameter to the free function. Maybe to avoid the hassle of updating the callsites, we could add it as propagators ...propagation.Propagators parameter, so grpctrace.Inject(ctx, metadata) will still use the global propagators, but grpctrace.Inject(ctx, metadata, myprops) will use the provided one.

After looking a bit more at both of the plugins, I propose another option:

  1. Nuke them. Value added by grpctrace is mostly in wrapping *metadata.MD into a thing that implements the HTTPSupplierinterface. Maybe this could be exported. httptrace has kinda no value - the Extract function has an extra return value (attributes) that currently only contain request URL. Other than that, both plugins are basically unpacking stuff from context. I'm not sure how useful is this.

@paivagustavo
Copy link
Member

paivagustavo commented Mar 11, 2020

I'm big +1 to creating a new http plugin similar to ochttp, with the current one we cannot assign the status of the request neither metrics. If needed I can work on it, this has been an issue for me for a while and I didn't have the time to look at it.

I think I've missed the othttp plugin 🤦‍♂, just ignore me.

@rghetia rghetia modified the milestones: Alpha v0.3 (Beta), Alpha v0.4 Mar 12, 2020
@Aneurysm9
Copy link
Member

  1. Nuke them.

The httptrace.ClientTrace implementation is useful, though it could perhaps be moved to the contrib repo. Otherwise +1.

The existing plugins are used in the examples, so rewriting the examples to use the propagation package directly would be in order.

@krnowak
Copy link
Member

krnowak commented Mar 16, 2020

  1. Nuke them.

The httptrace.ClientTrace implementation is useful, though it could perhaps be moved to the contrib repo. Otherwise +1.

It's useful, that's for sure, so it would stay. I mostly meant the httptrace.go part.

The existing plugins are used in the examples, so rewriting the examples to use the propagation package directly would be in order.

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

Successfully merging a pull request may close this issue.

4 participants