Skip to content
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

Since v0.75.0, the hostmetricsreceiver emits metrics with empty string attribute values #21527

Closed
jacobmarble opened this issue May 6, 2023 · 9 comments

Comments

@jacobmarble
Copy link
Contributor

jacobmarble commented May 6, 2023

Since otelcol-contrib v0.75.0, the hostmetrics receiver is emitting metrics with empty string attribute values, such as device = string(""). I've confirmed that this behavior started in v0.75.0.

I'm not certain that empty attribute values are disallowed in the otel spec, but the influxdbexporter has rejected empty attribute values since it has existed.

Originally posted by @jacobmarble in #21474 (comment)

Steps to Reproduce:

otelcontribcol config:

receivers:
  hostmetrics:
    collection_interval: 1s
    scrapers:
      cpu:
      memory:
      filesystem:
      paging:
      process:
        metrics:
          process.cpu.time:
            enabled: false
          process.memory.utilization:
            enabled: true

exporters:
  file:
    path: /tmp/metrics.json

service:
  pipelines:
    metrics:
      receivers: [hostmetrics]
      exporters: [file]

Run for a few seconds, then stop and search the resulting metrics:

$ jq '.. | select(type == "object" and has("key") and has("value") and .value == {"stringValue": ""})' /tmp/metrics.json
{
  "key": "device",
  "value": {
    "stringValue": ""
  }
}
{
  "key": "device",
  "value": {
    "stringValue": ""
...

Where "stringValue": "", the influxdbexporeter fails. (After #21526 is merged, the influxdbexporter will drop the offending attribute and emit a Debug log.)

@jacobmarble
Copy link
Contributor Author

/label receiver/hostmetrics

@atoulme
Copy link
Contributor

atoulme commented May 8, 2023

Do you have a reproduction scenario? That would help to see where the bug is.

@jacobmarble
Copy link
Contributor Author

Do you have a reproduction scenario? That would help to see where the bug is.

Of course! Updated the original comment.

@atoulme atoulme added bug Something isn't working receiver/hostmetrics and removed receiver/hostmetrics labels May 12, 2023
@github-actions
Copy link
Contributor

Pinging code owners for receiver/hostmetrics: @dmitryax. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions
Copy link
Contributor

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 @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Jul 11, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Sep 9, 2023

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2023
@atoulme atoulme reopened this Sep 9, 2023
@atoulme atoulme removed the Stale label Sep 9, 2023
Copy link
Contributor

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 @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Nov 10, 2023
Copy link
Contributor

github-actions bot commented Jan 9, 2024

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2024
@evilr00t
Copy link

evilr00t commented Aug 6, 2024

hostmetrics with the process exporter still sends out empty labels, Thanos ain't happy about it - would suggest to re-open?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants