question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tag HTTP requests with http.url, remote hostname, IP and port

See original GitHub issue

Is 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:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
marcingrzejszczakcommented, Feb 25, 2021

You can use the HttpRequestParser and HttpResponseParser beans where you can set arbitrary tags

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get host name with port from a http or https request
You can use HttpServletRequest.getScheme() to retrieve either "http" or "https". Using it along with HttpServletRequest.getServerName() should be enough to ...
Read more >
How to test a HTTPS URL with a given IP address - Server Fault
Think I found a solution going through the cURL manual: curl https://DOMAIN.EXAMPLE --resolve 'DOMAIN.EXAMPLE:443:192.0.2.17'.
Read more >
HTTP/1.1: Header Field Definitions
The Accept request-header field can be used to specify certain media types which are acceptable for the response. Accept headers can be used...
Read more >
In Introduction to HTTP Basics
HTTP is an asymmetric request-response client-server protocol as ... TCP/IP, you need to know (a) IP address or hostname, (b) Port number.
Read more >
Origin - HTTP - MDN Web Docs
The Origin request header indicates the origin (scheme, hostname, and port) that caused the request. For example, if a user agent needs to ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found