Skip to content

Commit

Permalink
tag is regionName (full) rather than region (abbrev)
Browse files Browse the repository at this point in the history
status not included in tags
  • Loading branch information
andracc committed Sep 26, 2024
1 parent 8098773 commit 5bd7d56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Backend/Otel/LocationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public LocationProvider(IHttpContextAccessor contextAccessor, IMemoryCache memor
{
var ipAddress = context.GetServerVariable("HTTP_X_FORWARDED_FOR") ?? context.Connection.RemoteIpAddress?.ToString();
var ipAddressWithoutPort = ipAddress?.Split(':')[0];
ipAddressWithoutPort = "100.0.0.0";

LocationApi? location = await _memoryCache.GetOrCreateAsync(
"location_" + ipAddressWithoutPort,
Expand Down
2 changes: 1 addition & 1 deletion Backend/Otel/OtelKernel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public override async void OnEnd(Activity data)
};

data?.AddTag("country", location.Country);
data?.AddTag("region", location.Region);
data?.AddTag("regionName", location.Region);
data?.AddTag("city", location.City);
}

Expand Down

0 comments on commit 5bd7d56

Please sign in to comment.