Skip to content

Commit

Permalink
swap RemoteAddr for x-forwarded-for
Browse files Browse the repository at this point in the history
  • Loading branch information
mkobetic committed Nov 4, 2022
1 parent b3dd1d3 commit 2589ba8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/api/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (ti *TelemetryInterceptor) execute(ctx context.Context, fullMethod string)
clientName, _, clientVersion := parseVersionHeaderValue(md.Get(clientVersionMetadataKey))
appName, _, appVersion := parseVersionHeaderValue(md.Get(appVersionMetadataKey))
ti.log.Info("api request",
zap.Strings("client_addr", md.Get("RemoteAddr")),
zap.Strings("x-forwarded-for", md.Get("x-forwarded-for")),
zap.String("service", serviceName),
zap.String("method", methodName),
zap.String("client", clientName),
Expand Down

0 comments on commit 2589ba8

Please sign in to comment.