-
Notifications
You must be signed in to change notification settings - Fork 1.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
Give NoOp create settings a unique name #9637
Conversation
8c0cfe8
to
9ee4477
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9637 +/- ##
=======================================
Coverage 90.98% 90.98%
=======================================
Files 349 349
Lines 18572 18572
=======================================
Hits 16897 16897
Misses 1348 1348
Partials 327 327 ☔ View full report in Codecov by Sentry. |
This breaks a few tests in contrib, but it should be easy to fix those when we bump the dependency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generally looks good to me, but it should have a changelog entry as it may confound test expectations.
Added a changelog. |
I'll need to update contrib first to fix the failing tests. |
**Description:** This should fix failures in open-telemetry/opentelemetry-collector#9637 This unit test was relying on the ID from `exportertest.NewNopCreateSettings` always being the same. This change makes the test use the same create settings when storing the telemetry registry, and when creating the trace exporter to avoid that problem. **Link to tracking Issue:** Blocking open-telemetry/opentelemetry-collector#9637
#31659) Follow-up to #31640 I didn't realize the contrib test stopped after the first failure, so there were a few more failures for open-telemetry/opentelemetry-collector#9637. I verified that this passes the contrib-tests check for the core repo locally, so this should be the rest of them. For the splunkhec exporter, the exporter actually uses `ID.String()`: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/4c5b5e934484ae3084565abbd3746a98e7f27721/exporter/splunkhecexporter/client.go#L71 The filelog receiver was assuming that `NewNopCreateSettings` returned the same ID, so I re-used the create settings in the test. **Link to tracking Issue:** Blocking open-telemetry/opentelemetry-collector#9637 @dmitryax @Aneurysm9 @codeboten
seems like the changelog check is broken?
|
Looks like it resolved :) |
…lemetry#31640) **Description:** This should fix failures in open-telemetry/opentelemetry-collector#9637 This unit test was relying on the ID from `exportertest.NewNopCreateSettings` always being the same. This change makes the test use the same create settings when storing the telemetry registry, and when creating the trace exporter to avoid that problem. **Link to tracking Issue:** Blocking open-telemetry/opentelemetry-collector#9637
open-telemetry#31659) Follow-up to open-telemetry#31640 I didn't realize the contrib test stopped after the first failure, so there were a few more failures for open-telemetry/opentelemetry-collector#9637. I verified that this passes the contrib-tests check for the core repo locally, so this should be the rest of them. For the splunkhec exporter, the exporter actually uses `ID.String()`: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/4c5b5e934484ae3084565abbd3746a98e7f27721/exporter/splunkhecexporter/client.go#L71 The filelog receiver was assuming that `NewNopCreateSettings` returned the same ID, so I re-used the create settings in the test. **Link to tracking Issue:** Blocking open-telemetry/opentelemetry-collector#9637 @dmitryax @Aneurysm9 @codeboten
…lemetry#31640) **Description:** This should fix failures in open-telemetry/opentelemetry-collector#9637 This unit test was relying on the ID from `exportertest.NewNopCreateSettings` always being the same. This change makes the test use the same create settings when storing the telemetry registry, and when creating the trace exporter to avoid that problem. **Link to tracking Issue:** Blocking open-telemetry/opentelemetry-collector#9637
open-telemetry#31659) Follow-up to open-telemetry#31640 I didn't realize the contrib test stopped after the first failure, so there were a few more failures for open-telemetry/opentelemetry-collector#9637. I verified that this passes the contrib-tests check for the core repo locally, so this should be the rest of them. For the splunkhec exporter, the exporter actually uses `ID.String()`: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/4c5b5e934484ae3084565abbd3746a98e7f27721/exporter/splunkhecexporter/client.go#L71 The filelog receiver was assuming that `NewNopCreateSettings` returned the same ID, so I re-used the create settings in the test. **Link to tracking Issue:** Blocking open-telemetry/opentelemetry-collector#9637 @dmitryax @Aneurysm9 @codeboten
Long story, but i'm working on updating the prometheus dependency: open-telemetry/opentelemetry-collector-contrib#30934 As part of that update, we need to adapt to a change that makes the prometheus servers' self-observability metrics independent. See prometheus/prometheus#13507 and prometheus/prometheus#13610 One way to adapt to this change is by adding a label to each receivers' metrics to differentiate one Prometheus receiver from another. I've tried taking that approach in open-telemetry/opentelemetry-collector-contrib#30934, but the current issue is that the NoOp components all have the same name, which causes the self-observability metrics to collide. I can work around this in the prometheus receiver's own tests, but I can't work around the issue in the `generated_component_test.go` tests, since those are generated. This PR makes the ID returned by `NewNopCreateSettings` unique by giving it a unique name. **Link to tracking Issue:** Part of open-telemetry/opentelemetry-collector-contrib#30883 cc @Aneurysm9 --------- Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Description:
Long story, but i'm working on updating the prometheus dependency: open-telemetry/opentelemetry-collector-contrib#30934
As part of that update, we need to adapt to a change that makes the prometheus servers' self-observability metrics independent. See prometheus/prometheus#13507 and prometheus/prometheus#13610
One way to adapt to this change is by adding a label to each receivers' metrics to differentiate one Prometheus receiver from another. I've tried taking that approach in open-telemetry/opentelemetry-collector-contrib#30934, but the current issue is that the NoOp components all have the same name, which causes the self-observability metrics to collide.
I can work around this in the prometheus receiver's own tests, but I can't work around the issue in the
generated_component_test.go
tests, since those are generated.This PR makes the ID returned by
NewNopCreateSettings
unique by giving it a unique name.Link to tracking Issue:
Part of open-telemetry/opentelemetry-collector-contrib#30883
cc @Aneurysm9