openzipkin-attic / sleuth-webmvc-example

See how much time Spring Boot services spend on an http request.
Apache License 2.0
175 stars 107 forks source link

HTTP header in MDC test #34

Closed meltsufin closed 4 years ago

meltsufin commented 4 years ago

Run FrontEnd and then use curl to invoke:

curl http://localhost:8081/ -H 'req-id: blah'

Output:

{traceId=5e7cfe9e7c937391754fae51e18d98ed, spanId=754fae51e18d98ed, spanExportable=true, req-id=blah, X-Span-Export=true, X-B3-SpanId=754fae51e18d98ed, X-B3-TraceId=5e7cfe9e7c937391754fae51e18d98ed}
meltsufin commented 4 years ago

Sorry, didn't mean to create the PR here.

codefromthecrypt commented 4 years ago

actually you could make a PR if you want to use "user-name" like we have in the brave example https://github.com/openzipkin/brave-webmvc-example/blob/master/webmvc4/src/main/java/brave/webmvc/TracingConfiguration.java#L53

codefromthecrypt commented 4 years ago

https://github.com/openzipkin/brave-webmvc-example/blob/master/webmvc4/src/main/java/brave/webmvc/Backend.java#L15-L21

codefromthecrypt commented 4 years ago

just forgot to update here is all..