-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more request header information to GRPC handler spans (#341)
- Adds the following fields to a GRPC handler span: - request.header.x_forwarded_for - request.header.x_forwarded_proto - request.remote_addr request.remote_addr is retrieved from the GRPC peer which may not be the origin client IP when a proxy is in the middle. The field name used is the equivalent from HTTP instrumentation. - Refactored the existing if-chain to a loop of headers to check and add to span if present. The list of request headers to put on the span is captured in a package variable. It's the closest to a constant map we've got before getting into Go shenanigans. Co-authored-by: Kent Quirk <kentquirk@gmail.com>
- Loading branch information
Showing
2 changed files
with
44 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters