1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-04 09:43:23 +02:00
opentelemetry-go/plugin/othttp
Edward Muller d351eb4de2 Http interceptors (#156)
* WIP

* Finish http middleware implementation

This is currently done as httptrace.NewHandler(). This should maybe
be moved to a different package or renamed, but atm this name
seemed the least objectionable to me.

There are a few TODOs sprinkled in the code for questions I didn't
know the answers to.

There is an example provided, which when copied to a main func
locally work against the jaeger all in one.

Real tests need to be added.

* Address feedback

* Tie in propagation, update attributes, more options, revise example, etc.

Dropped the httpConfig type because it seemed redundant an unecessary
abstraction.

* WithRouteTag

* address out of band feedback

* move to othttp package

* Add a very basic test.

I ended up needing to export the Traceparentheader const so that
it was accessible to this test.

* Add file header
2019-10-07 10:25:11 -07:00
..
server_example_test.go Http interceptors (#156) 2019-10-07 10:25:11 -07:00
server_test.go Http interceptors (#156) 2019-10-07 10:25:11 -07:00
server.go Http interceptors (#156) 2019-10-07 10:25:11 -07:00
wrap.go Http interceptors (#156) 2019-10-07 10:25:11 -07:00