-
Notifications
You must be signed in to change notification settings - Fork 897
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
BREAKING: rename http.client_ip
to http.forwarded.for
and introduce http.forwarded.proto
attributes
#3218
Conversation
dda7ddc
to
cac9b12
Compare
24ebd34
to
642eb92
Compare
http.client_ip
to http.forwarded.for
and introduce http.forwarded.proto
attributes
I doubt this is a replacement for http.client_ip. Should these attributes maybe be added in addition? There may be sources of client_ip other than these HTTP headers. (weak opinion, I'm not very sure here) |
since we aren't sure of the use case for |
Yep a quick search show lots of different ones
Node npm package request-ip |
I didn't look up the others, but I'd still suggest that we drop |
one other thought,
and while typically that will come from the |
the problem with If we keep |
Can |
Not really. here we capture individual components -
|
@MSNev I see you still have concerns, could you please share how you see a perfect solution to the problem of recording original caller maybe-IP ? |
Simplistically No, but I'm not going to the extreme and block the PR. My main concerns are that people are / may already using this value and based on the existing comments it is "suggested" that this is the closest (single) field which identifies the actual client ip (as far as can be determined). While the new wording explicitly prohibits setting this value if nothing exists. Meaning there will now be no single location for anyone to "check". There is also an implicit assumption introduced by renaming this to "forward.for", the user is always behind some form of intervening proxy (which will not "always" be the case), which is reinforced by the "SHOULD NOT" set. So this (forces) complications for backend / queries in that now they need to always check this new field AND Additionally, and as with a lot of the existing OpenTelemetry implementations, this reinforces the server side view (receiver) within the API and the semantic conventions, ignoring how any existing usages for "senders" (clients, who "know" their own IP address (public or not) -- eg. in-house private network monitoring), this use case does not map to forward.for unless you squint and say I sent a request me (local instrumentations that wrap "sending" API's and create Span's, Logs' or Events for this). Keeping
So I disagree. My preference would be to keep the
While still adding the In terms of similar prior-art for this scenario ECS does provide the forward-for (which is where I assume this came from, AND the client address / ip (albeit in it's own general So to summarize my preference
|
I hear several concerns, please correct me if I miss something:
Additionally, client_ip is not a good name for something that's not necessarily an IP. So, it's possible that we'll need to
|
I can't really add more in this discussion I think, I'm not deep enough in the topic. Just one remark:
I think client_ip already must not be set if you have no information beyond net.sock.peer.ip. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
one is at least somewhat confident that the address is not that of | ||
the closest proxy. | ||
examples: '83.164.160.102' | ||
This attribute SHOULD be set when a source of information different |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This attribute SHOULD be set when a source of information different | |
This attribute SHOULD be set when the source of information is different |
`http.client_ip` when it's the same as `net.sock.peer.addr` means that | ||
one is at least somewhat confident that the address is not that of | ||
the closest proxy. | ||
This attribute SHOULD be set when a source of information different |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spoke with trask offline around this to highlight the "source" nature of this description.
I would suggest adding or keeping the wording to further highlight the source (vs value) of the obtain information.
eg. I think the following in the existing clearly states that this should be set
is available even if that other source just confirms the same value
while I originally mis-read the updated version to indicate that the value should not be set if it's the same as net.sock.peer.addr
The only other remaining item is the breaking nature of this change, especially now that with merging with ECS that this would likely change yet again. If this change is delayed and included in the bigger set of breaking (ECS merge) changes I think this would be better and then my concerns would be reduced. And for additional reference, today for Node.JS the http instrumentation populates the client_ip (when the X-Forwarded-For is present) and this is the primary way network requests are tracked. Which means that EVERY OTel node user is currently receiving / using this today (even though it's not marked as stable). So breaking this and then forcing an update followed by another update when ECS would be problematic for consumers. |
we discussed in HTTP semconv stability WG and agreed that this change should be bundled with the other HTTP semconv breaking changes and covered by the transition period we are defining in #3362 |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
closing this PR:
|
Fixes #2338
http.client_ip
attribute does not work well with new(ish) forwarded header definition:for
component is a list of nodes, which can be IP addresses, IP:port combinations, or an obfuscated identifiers. This makesclient_ip
not precise as a node is not necessarily an IP.proto
orhost
. Having a descriptive namespace to populate all of them is preferable. Addinghttp.client_proto
andhttp.client_host
could be confusing.Changes
http.client_ip
tohttp.forwarded.for
http.forwarded.proto
Full
forwarded
value can be captured by enabling collection of the corresponding header (http.request.header.forwarded
), same goes forx-forwarded-*
headers.Additional context:
network.forwarded_ip
, but it has similar limitations ashttp.client_ip
see discussions in ECS: [meta] Add support for proxies in ECS elastic/ecs#938http
namespace.Alternative attribute name:
since
for
component inforwarded
header is not a single address, but a list of them, it could be better to call the corresponding attributehttp.forwarded.addr