-
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
datadog: Exporter logs meaningless errors when run in (default) os-less container images, has excessively noisy runtime logs, does not wrap gohai package logger in otel logger #29741
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue seems to be about fixing the log message. More broadly - should this gohai package be included? Or should this feature be removed? Just wondering if there is a fix outside of this logging incorrectly. Sorry if this is being addressed in another ticket. |
Together with other vendors we are working on improving OpenTelemetry semantic conventions related to system and infra monitoring and making sure the resource detection processor and host metrics receiver can fetch this information. This will eventually allow us to remove the gohai detection, once we are closer to feature parity with gohai for bare-metal runs. While I agree gohai is not very useful in containerized runs with a For the specifics on the work we are doing you can see for example #30306, #29588, #24542, #24450, #22940 and more generally the work on the System Semantic Conventions Working Group (see board). Datadog specific docs on how to best leverage these attributes is not yet available, but it's also on our roadmap to improve this. |
Good to know. The It appears that The other listed errors should IMO be demoted to "debug" level. |
This will be fixed by #31703 by reducing the logs to debug level. We can keep track of the non-wrapped pid log in DataDog/datadog-agent/issues/21487 and #31193 I also wanted to mention on this issue as well that Datadog-specific docs I mentioned here #29741 (comment) are now available: https://docs.datadoghq.com/opentelemetry/schema_semantics/host_metadata/ |
**Description:** Demote gohai logs to debug level **Link to tracking Issue:** Fixes #29741
) **Description:** Demote gohai logs to debug level **Link to tracking Issue:** Fixes open-telemetry#29741
) **Description:** Demote gohai logs to debug level **Link to tracking Issue:** Fixes open-telemetry#29741
Component(s)
exporter/datadog
What happened?
Description
The datadog exporter produces a variety of useless, confusing and meaningless errors when run with the default os-less container images for the OpenTelemetry collector.
These are emitted by the exporter itself, or by the "gohai" packages within the datadog agent that the exporter calls. They are emitted at
info
level (default) despite effectively being meaningless noise. One of them ignores the configured log level and log formatter too.They should be caught and suppressed by the exporter, as they are expected, they are not actionable, and they are effectively meaningless.
These errors (with irrelevant fields trimmed for brevity) include:
and this error emitted by the
gohai
libs that ignores the opentelemetry logger's configured log level and format, so it's emitted as a non-json line when json logging is on, and it's emitted in >= info log level even though it's marked "debug":This message has no business being a warning - it should be debug level:
These messages are less clearly spurious, but could possible also do with being downgraded to
debug
since they're just runtime noise:Steps to Reproduce
Run the datadog exporter demo configuration on a docker or k8s container. Basically run the tutorial for the datadog opentelemetry exporter. Use the image
otel/opentelemetry-collector-contrib:0.90.1
.Expected Result
At
info
level, I expect minimal, meaningful log output.None of these mentioned message should be logged.
Any genuine errors or informational messages from the
gohai
package should be wrapped via a log adapter so that they respect the otel collector's logging configuration instead of writing a different log format and ignoring the log level.Actual Result
The excessively noisy logs, ignored log levels, and incorrectly formatted logs reported above.
Collector version
0.90.1
Environment information
Environment
Run in any k8s environment or as a Docker container, using the default configs, with the container image
otel/opentelemetry-collector-contrib:0.90.1
. Read-only bind-mount the host/proc
to/host/proc
in your container definition.OpenTelemetry Collector configuration
Log output
Additional context
See also
Some of the errors are from the datadog exporter:
opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/gohai/gohai.go
Line 35 in 95cb733
opentelemetry-collector-contrib/exporter/datadogexporter/internal/hostmetadata/internal/gohai/gohai.go
Line 54 in 95cb733
because the exporter incorrectly assumes it's in a "rich" full-os container with a shell, external commands etc.
The
[Debug] Error
one comes from https://github.com/DataDog/datadog-agent/blob/45c774dba115b395c1b09a94fcd428f49d6d440a/pkg/gohai/processes/gops/process_info.go#L60The text was updated successfully, but these errors were encountered: