-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
The Source
property seems to be the wrong one for mapping client IP to
#33210
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
It seems the azure monitor exporter is not actively maintained... well. |
Component(s)
exporter/azuremonitor
What happened?
Description
AzureMonitor exporter, as documented in readme, is mapping client IP to the
Source
property. However, it does not sound like the right mapping. The value inSource
does not provide value to Application Insights's "Client Ip address", leading "Country or region", "City", etc. not correctly populated.According to https://github.com/microsoft/ApplicationInsights-dotnet/blob/99118c924d3880f3853c0b1c9ebe67289073dbfa/BASE/src/Microsoft.ApplicationInsights/DataContracts/RequestTelemetry.cs#L261
the
Source
is defined as "the source for the request telemetry object. This often is a hashed instrumentation key identifying the caller." It sounds like a totally different thing than client IP.According to https://github.com/microsoft/ApplicationInsights-dotnet/blob/99118c924d3880f3853c0b1c9ebe67289073dbfa/NETCORE/src/Microsoft.ApplicationInsights.AspNetCore/TelemetryInitializers/ClientIpHeaderTelemetryInitializer.cs#L123
client IP is set in Context.Location.Ip. It should be this one in Go: https://github.com/microsoft/ApplicationInsights-Go/blob/9194eea52d6fe5313a2b109056254baca9ab3194/appinsights/contracts/contexttags.go#L237
Steps to Reproduce
As long as the application side sends
http.client_ip
ornet.peer.name
, theSource
property of Application Insights is filled.Expected Result
Application Insights' "Client Ip address" should get the value, so that "Country or region", "City", etc. are correctly populated.
Note that by default, Application Insights's clear out "Client Ip address" after populating "Country or region", "City", etc., for privacy reason. This is also a useful feature
Source
does not provide.So, what is really to be seen is that "Client Ip address" is empty or 0.0.0.0 but "Country or region", "City", "State or province" have correct value inferred from IP.
Actual Result
Application Insights does not see the client IP so "Country or region", "City", "State or province" are not correctly populated, which may be empty or some default value.
Collector version
latest
Environment information
Environment
OS: (e.g., "Ubuntu 20.04")
Compiler(if manually compiled): (e.g., "go 14.2")
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: