-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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] Kubernetes node name resolution via the downward API #11033
Comments
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This should use the downward API to inject both the k8s pod name and the node name into the
... but preferably adjusted to follow OpenTelemetry semantic conventions for resource environment variables. The current code at Lines 39 to 57 in 2c29c26
hostname within a pod returns the pod name, which as the comments say isn't always guaranteed.
|
Is your feature request related to a problem? Please describe.
The Datadog exporter needs to query the Kubernetes node name for resolving the hostname (see #10911). The exporter currently relies on the assumption that the pod name can be retrieved by calling
os.Hostname
, which is not necessarily true if, e.g., the hostname has been modified via fields likesetHostnameAsFQDN
. In these cases, the Kubernetes source provider will fail.Describe the solution you'd like
The Datadog exporter Kubernetes source provider supports getting the node name via the downward API or directly from the known environment variables documented in open-telemetry/oteps#195.
Describe alternatives you've considered
There are no alternatives to support these setups, really.
Additional context
Originally mentioned in #10911 (comment)
The text was updated successfully, but these errors were encountered: