-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
influxdbexporter does not support empty tag values from hostmetrics process scraper #21474
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This is a major problem and essentially makes the InfluxDB exporter unusable. |
Thanks for the example config, that should help me reproduce the issue. |
Please assign this issue to me. |
Done, it's yours! |
Since otelcol-contrib v0.75.0, the hostmetrics receiver is emitting metrics with empty string attribute values, such as The InfluxDB line protocol encoder has rejected empty tag values for at least three years. Nevertheless, the InfluxDB exporter can do better by silently dropping these attributes (which is semantically equivalent in InfluxDB). I'll prepare a PR. |
Would you mind opening a bug for the hostmetricsreceiver to look after empty attribute values? |
Thank you very much all for the quick response! |
Closes open-telemetry#22850 InfluxDB does not allow empty tag values in line protocol. This change adds a second test to confirm that the InfluxDB exporter does not emit empty tag values. See open-telemetry#21526 for the original fix to handling empty attribute values. This PR exists because I forgot I had fixed open-telemetry#21474, then tried to fix open-telemetry#22850 and now realize that open-telemetry#22850 and open-telemetry#21474 are dupes. Live and learn.
**Description:** <Describe what has changed.> InfluxDB does not allow empty tag values in line protocol. This change adds a second test to confirm that the InfluxDB exporter does not emit empty tag values. See #21526 for the original fix to handling empty attribute values. This PR exists because I forgot I had fixed #21474, then tried to fix #22850 and now realize that #22850 and #21474 are dupes. Live and learn. **Link to tracking Issue:** Closes #22850 **Testing:** **Documentation:**
Component(s)
exporter/influxdb, receiver/hostmetrics
What happened?
Description
For v0.75.0 and up, I can no-longer combine the process scraper from the hostmetrics receiver with the influxdb exporter.
Trying to do so results in the following error message when converting from OTLP to InfluxDB Line Protocol, whether I use
telegraf-prometheus-v1
ortelegraf-prometheus-v2
as themetrics_schema
:otel_contrib | 2023-05-03T11:53:17.416Z error exporterhelper/queued_retry.go:401 Exporting failed. The error is not retryable. Dropping data. {"kind": "exporter", "data_type": "metrics", "name": "influxdb", "error": "Permanent error: failed to convert OTLP metric to line protocol: failed to write point for sum: Permanent error: failed to encode point: encoding point 68: invalid tag value process.command=\"\"", "dropped_items": 1269}
As mentioned in other issues (e.g. #20435), sometimes the process scraper is not able to collect all the attributes of a given process. However, rather than dropping the affected series, the error causes the influxdbexporter to drop all the collected data.
I've attempted a workaround using the filter and attributes procesor, but haven't been able to get something working.
The issue occurs only on v.075.0 and up: the attached config will work for 0.74.0. Could the issue be related to the changes made to
pkg/ottl
or to the processscraper in the 0.75.0 release?Steps to Reproduce
Run the otel-collector with the attached config
Expected Result
Metrics are exported to InfluxDB
Actual Result
Data is dropped as some metrics cannot be converted to InfluxDB line protocol.
Collector version
0.75.0
Environment information
Environment
Tested with:
Arch: amd64
Version: 0.74.0 and 0.76.1 (DEB)
Arch: amd64
OpenTelemetry Collector configuration
Log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: