generated from honeycombio/.github
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add config option to set additional attributes on all events (#259
) ## Which problem is this PR solving? When deploying the agent in multiple clusters, telemetry from each cluster get mixed together and there is no easy way to separate it. There are other use cases of setting per-cluster values too, eg SHA, cloud provider, etc. This PR adds a configuration option to set a collection of key-value pairs that will be set on all events. For example; cluster-name=dev would add the field cluster-name with a value of dev. - Closes #54 ## Short description of the changes - Add new look up env func that returns a map[string]string created from a env var that holds a string of comma separated key value pairs - Adds AgentAttributes to config and populate from `ADDITIONAL_ATTRIBUTES` env var using new env look up func - Add the map of attributes to libhoney fields during libhoney init - Update config tests to verify expected behaviour ## How to verify that this has the expected result When additional attributes are provided, they are added to all events.
- Loading branch information
1 parent
d455fd5
commit e9e82a9
Showing
5 changed files
with
29 additions
and
0 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
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
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