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

[resourcedetectionprocessor]: add host.id to system detector #18618

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

sumo-drosiek
Copy link
Member

Description:

Add host.id detection to system detector

Link to tracking Issue: #18533

Testing:

Unit Tests

Documentation: N/A

@runforesight
Copy link

runforesight bot commented Feb 14, 2023

Foresight Summary

    
Major Impacts

TestConsumeMetadata ❌ failed 1 times in 5 runs (20% fail rate).
TestConsumeMetadata/Test_property_updates ❌ failed 1 times in 5 runs (20% fail rate).
build-and-test-windows duration(5 seconds) has decreased 40 minutes 56 seconds compared to main branch avg(41 minutes 1 second).
View More Details

⭕  build-and-test-windows workflow has finished in 5 seconds (40 minutes 56 seconds less than main branch avg.) and finished at 16th Feb, 2023.


Job Failed Steps Tests
windows-unittest-matrix -     🔗  N/A See Details
windows-unittest -     🔗  N/A See Details

✅  telemetrygen workflow has finished in 59 seconds (2 minutes 9 seconds less than main branch avg.) and finished at 16th Feb, 2023.


Job Failed Steps Tests
build-dev -     🔗  N/A See Details
publish-latest -     🔗  N/A See Details
publish-stable -     🔗  N/A See Details

✅  check-links workflow has finished in 1 minute 25 seconds (1 minute 10 seconds less than main branch avg.) and finished at 16th Feb, 2023.


Job Failed Steps Tests
changed files -     🔗  N/A See Details
check-links -     🔗  N/A See Details

✅  changelog workflow has finished in 2 minutes 1 second (1 minute 11 seconds less than main branch avg.) and finished at 16th Feb, 2023.


Job Failed Steps Tests
changelog -     🔗  N/A See Details

✅  prometheus-compliance-tests workflow has finished in 12 minutes 22 seconds (⚠️ 3 minutes 32 seconds more than main branch avg.) and finished at 16th Feb, 2023.


Job Failed Steps Tests
prometheus-compliance-tests -     🔗  ✅ 21  ❌ 0  ⏭ 0    🔗 See Details

✅  e2e-tests workflow has finished in 13 minutes 55 seconds (2 minutes 20 seconds less than main branch avg.) and finished at 16th Feb, 2023.


Job Failed Steps Tests
kubernetes-test -     🔗  N/A See Details

✅  load-tests workflow has finished in 18 minutes 11 seconds and finished at 16th Feb, 2023.


Job Failed Steps Tests
loadtest (TestTraceAttributesProcessor) -     🔗  ✅ 3  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestIdleMode) -     🔗  ✅ 1  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestMetric10kDPS|TestMetricsFromFile) -     🔗  ✅ 6  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestTraceNoBackend10kSPS|TestTrace1kSPSWithAttrs) -     🔗  ✅ 8  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestTraceBallast1kSPSWithAttrs|TestTraceBallast1kSPSAddAttrs) -     🔗  ✅ 10  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestMetricResourceProcessor|TestTrace10kSPS) -     🔗  ✅ 12  ❌ 0  ⏭ 0    🔗 See Details
loadtest (TestBallastMemory|TestLog10kDPS) -     🔗  ✅ 18  ❌ 0  ⏭ 0    🔗 See Details
setup-environment -     🔗  N/A See Details

 build-and-test workflow has finished in 22 seconds (1 hour 5 minutes 39 seconds less than main branch avg.) and finished at 16th Feb, 2023.


Job Failed Steps Tests
unittest-matrix (1.20, exporter) N/A  ✅ 2455  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.20, other) N/A  ✅ 4687  ❌ 0  ⏭ 0    🔗 See Details
unittest-matrix (1.19, other) N/A  ✅ 4687  ❌ 0  ⏭ 0    🔗 See Details

🔎 See details on Foresight

*You can configure Foresight comments in your organization settings page.

@github-actions github-actions bot added cmd/configschema configschema command cmd/otelcontribcol otelcontribcol command exporter/datadog Datadog components internal/metadataproviders processor/resourcedetection Resource detection processor labels Feb 14, 2023
@sumo-drosiek sumo-drosiek changed the title [resourcedetectionprocessor]: dd host.id to system detector [resourcedetectionprocessor]: add host.id to system detector Feb 14, 2023
@sumo-drosiek
Copy link
Member Author

rebasing due to conflicts with main

@sumo-drosiek
Copy link
Member Author

seems that lint is failing due to internal issues?

make[2]: Entering directory '/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/cmd/oteltestbedcol'
level=error msg="Timeout exceeded: try increasing it by passing --timeout option"
make[2]: *** [../../Makefile.Common:166: lint] Error 4
make[2]: Leaving directory '/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/cmd/configschema'
make[1]: *** [Makefile:167: cmd/configschema] Error 2
make[1]: *** Waiting for unfinished jobs....
running /home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/.tools/misspell -error
Check License finished successfully
/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/.tools/golangci-lint run --allow-parallel-runners --build-tags integration
make[2]: Leaving directory '/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib/cmd/oteltestbedcol'
make[1]: Leaving directory '/home/runner/work/opentelemetry-collector-contrib/opentelemetry-collector-contrib'
make: *** [Makefile:105: golint] Error 2

@mx-psi
Copy link
Member

mx-psi commented Feb 15, 2023

@sumo-drosiek can you open an issue to report it? I will re-run the tests to see if it's a flake, but still we should look into it

@sumo-drosiek
Copy link
Member Author

@sumo-drosiek can you open an issue to report it? I will re-run the tests to see if it's a flake, but still we should look into it

Sure, here is the issue: #18684

Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
@sumo-drosiek
Copy link
Member Author

After another rebase signalfx exporter is failing 🙄

2023-02-16T08:04:32.9347047Z FAIL
2023-02-16T08:04:32.9347520Z FAIL	github.com/open-telemetry/opentelemetry-collector-contrib/exporter/signalfxexporter	8.604s

@mx-psi mx-psi merged commit 203d712 into open-telemetry:main Feb 16, 2023
@@ -495,6 +495,7 @@ require (
github.com/openzipkin/zipkin-go v0.4.1 // indirect
github.com/outcaste-io/ristretto v0.2.0 // indirect
github.com/ovh/go-ovh v1.3.0 // indirect
github.com/panta/machineid v1.0.2 // indirect
Copy link
Member

@dmitryax dmitryax Feb 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to bring a fork dependency with 8 stars on github if we can get this info from gopsutil?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sumo-drosiek if you agree with my concern, can you please follow up with an issue or PR?

Copy link
Member Author

@sumo-drosiek sumo-drosiek Feb 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/panta/machineid (8 stars) is fork of https://github.com/denisbrodbeck/machineid (715 stars, but seems to be not maintained: denisbrodbeck/machineid#5 (comment))

I will change it to gopsutil and we can eventually look for another solution in case it won't be sufficient.

I wasn't aware of gopsutil 😅

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened new PR: #18740

@rayrapetyan
Copy link

Trying to redefine host.id with:

processors:
  resource:
    attributes:
      - key: host.id
        from_attribute: host.name
        action: upsert

but it doesn't work (host.id in Prometheus is still equal to /etc/machine-id). Moreover, every time I restart otel-collector-contrib container (this happens quite often), it gets a new host.id assigned and I'm getting tons of duplicates in Prometheus.
What's the best way to avoid this behavior?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmd/configschema configschema command cmd/otelcontribcol otelcontribcol command exporter/datadog Datadog components internal/metadataproviders processor/resourcedetection Resource detection processor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants