Tag HTTP requests with http.url, remote hostname, IP and port
See original GitHub issueIs your feature request related to a problem? Please describe.
I noticed that HTTP requests (for instance those made through WebClient
) are not tagged with http.url
and the remote address by default. This makes it hard to understand what peer the service is communicating with (especially if the peer is not instrumented). Similarly, WebFlux requests are not tagged with the remote address unless the X-Forwarded-For
header is present.
Describe the solution you’d like
HTTP requests should be tagged with http.url
and the remote address (hostname, IP, port) by default.
Describe alternatives you’ve considered
If there are concerns around the data size associated with spans and/or the cardinality of these tags, then perhaps we could make this opt-in by setting spring.sleuth.web.extra-tags=true
or something similar, rather than enabling by default.
Additional context
I would be happy to put in a pull request, but wanted to get some opinions first. Should this be done by default, or in an opt-in manner, or not at all? If by default, then should the new tags be added by brave-instrumentation-http
by default (so that it applies to everything that uses brave), or just by the Sleuth Http{Client/Server}Parser
?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:7 (5 by maintainers)
You can use the
HttpRequestParser
andHttpResponseParser
beans where you can set arbitrary tagsThanks! Following your tip, I found the relevant documentation here: