grpc-go
grpc-go copied to clipboard
O11Y: Added support for custom tags
This PR adds support for custom tags in Observability for Metrics, Tracing, and Logging. Custom tags are defined in the configuration and attached to emitted Logs, Traces, and Metrics. Currently there is no way to test this E2E, so the best we can do is verify the config passed into the Tracing and Metrics exporter has the correct custom tags present. Also, since this added a new field to the configuration, we decided it would be better if we got rid of the implementation detail of representation the configuration with a proto file, which I switched to an internal struct.
This PR does the following:
- Deletes support for the previous way you set custom tags, by setting Environment Variables with "GRPC_OBSERVABILITY_" as a prefix
- Rewrote the testing injection logic for Metrics and Tracing, previously pass in exporter, now global function you overwrite
- Adds new custom tags field in configuration and attaches them to any emitted Metrics, Traces, or Logs.
- Switch proto representation of configuration to an internal go struct
RELEASE NOTES:
- O11y: Add support for custom tags