-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[exporter/datadog] Fix host alias field in metadata payload & fix GCP host alias. #9748
[exporter/datadog] Fix host alias field in metadata payload & fix GCP host alias. #9748
Conversation
// Add host id as a host alias to preserve backwards compatibility | ||
// The Datadog Agent does not do this | ||
hostInfo.HostAliases = append(hostInfo.HostAliases, hostID.StringVal()) | ||
if cloudAccount, ok := attrs.Get(conventions.AttributeCloudAccountID); ok { | ||
alias := fmt.Sprintf("%s.%s", hostID.StringVal(), cloudAccount.StringVal()) | ||
hostInfo.HostAliases = append(hostInfo.HostAliases, alias) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note for future git history spelunkers: this is not a breaking change since we were not sending host aliases at all to the backend.
🤔 Could you do an empty commit? Github Actions is not running for some reason on your last commit (or alternatively, fix the conflict with the changelog) |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
… host alias. (open-telemetry#9748) * [exporter/datadog] Fix host_alias json field * Update GCP host alias computation * Add release note * Fix tests * Fix GCP host alias resolution
Description:
Fixes the metadata payload field name used to send host aliases to the Datadog backend (the correct field is
host_aliases
, nothost-aliases
, see this datadog-agent code for comparison).Also fixes the GCP host alias resolution to match what is done in the datadog-agent. Since we weren't sending this host alias correctly at all before, we consider this not to be a breaking change.
Link to tracking Issue: #9122
Testing: Amended the unit test for the GCP host alias. Manually checked that host aliases are now properly seen in the Datadog backend when the
Meta.HostAliases
field is not empty.Documentation: n/a