update config dependency#11611
Conversation
6f225b7 to
47f403a
Compare
|
Looking forward to seeing this get merged! |
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
Not stale? @codeboten |
47f403a to
2a0e6f8
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11611 +/- ##
==========================================
- Coverage 91.75% 91.62% -0.14%
==========================================
Files 464 465 +1
Lines 24763 24775 +12
==========================================
- Hits 22722 22699 -23
- Misses 1656 1687 +31
- Partials 385 389 +4 ☔ View full report in Codecov by Sentry. |
|
Could use some feedback from @open-telemetry/collector-approvers on this latest commit to the PR to update the config support from v0.2.0 to v0.3.0. tl;dr there's a backwards incompatible change in how headers are passed in and I wanted to support users transitioningi wanted to support both the 0.3.0 and the 0.2.0 schema, which resulted in some migration code. I still have a few tests to add, and this change will need a PR in go-contrib to be merged before it can be completely done. Anyways, i could use your input: df83265 This is waiting on open-telemetry/opentelemetry-go-contrib#6412 |
|
The approach to handle the backward incompatible change looks good to me 👍 |
| // compatibility attempts | ||
| return err | ||
| } | ||
| // TODO: add a warning log to tell users to migrate their config |
There was a problem hiding this comment.
I guess it might be complicated to pass a logger here, but it's pretty important. I think we should come up with a solution by the time we release this change
There was a problem hiding this comment.
The way we do this on the Datadog exporter is to have a private field that is written to during unmarshaling and then a method to log warnings.
I don't love it, but I haven't been able to come up with anything better
There was a problem hiding this comment.
I appreciate your efforts to not break our current users. And explicitly about this:
Anyways, i could use your input: df83265
I like your approach. We don't have a schema version anywhere, so trying to fallback to the previous version before failing is a good approach. It doesn't scale nicely, but I also don't see a good way to determine the version other than requiring users to provide a schema version (which is bad UX for this specific place of the config, IMO).
service/service.go
Outdated
| return pcommonRes | ||
| } | ||
|
|
||
| func disableHighCardinalityMetrics() []config.View { |
There was a problem hiding this comment.
looks OK for now, but if we expect this list to grow before we remove the gate, it might make sense to externalize this somehow?
| // compatibility attempts | ||
| return err | ||
| } | ||
| // TODO: add a warning log to tell users to migrate their config |
There was a problem hiding this comment.
The way we do this on the Datadog exporter is to have a private field that is written to during unmarshaling and then a method to log warnings.
I don't love it, but I haven't been able to come up with anything better
service/service.go
Outdated
| return pcommonRes | ||
| } | ||
|
|
||
| func disableHighCardinalityMetrics() []config.View { |
3bcf5f1 to
b0021fb
Compare
41beb42 to
e30a736
Compare
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
d314b4d to
d742afd
Compare
|
Attempting to fix the integration test that's failing in contrib: open-telemetry/opentelemetry-collector-contrib#37425 Unclear to me whether this change is making that test flakier or not as this issue exists: open-telemetry/opentelemetry-collector-contrib#34836 |
|
Another attempt at fixing the contrib test open-telemetry/opentelemetry-collector-contrib#37431 |
mx-psi
left a comment
There was a problem hiding this comment.
The new place for views looks reasonable
mx-psi
left a comment
There was a problem hiding this comment.
I am fine with copy-pasting the scope name, it seems unlikely to change
|
The contrib exporter-1 test is still consistently failing https://github.com/open-telemetry/opentelemetry-collector/actions/runs/12932562549/job/36070135348?pr=11611, @songy23 do you have any thoughts on what's causing it to fail? i can't repro locally |
|
Datadog relies on the internal meter to report some component specific metrics. Those metrics are then exposed with the internal Prometheus server. If anything changes the metric names / attributes from internal meter and/or Prometheus, it will break the Datadog integrations. |
Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
|
Thanks for your help @songy23, bug has been fixed |
This PR does a couple of things that I couldn't quite split up so I put together a PR w/ individual commits to help reviewers get through it. This PR does the following: 1. update `go.opentelemetry.io/contrib/config` package to latest. this brings in breaking changes. in order to prevent those breaking changes from impacting end users, i've also added a layer of config unmarshaling 2. updates the collector to instantiate the meter provider (and exporters) via the config package. this allows us to remove all the code in `otelinit`. the reason for including this change was that unmarshaling the config was causing circular dependencies i didn't want to address by moving code that could be deleted around. Replacement for open-telemetry#11458. Fixes open-telemetry#12021 --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
| "otelcol_process_runtime_heap_alloc_bytes": false, | ||
| "otelcol_process_runtime_total_alloc_bytes": false, | ||
| "otelcol_process_uptime": false, | ||
| "promhttp_metric_handler_errors_total": false, |
There was a problem hiding this comment.
@codeboten, is this metric expected to be added? I'm not sure if it provides any value to the collector internal metrics...
There was a problem hiding this comment.
it's added by the prometheus server that is started via the SDK. we might be able to drop it via a view
There was a problem hiding this comment.
ok, that sounds good. Let me create an issue
This PR does a couple of things that I couldn't quite split up so I put together a PR w/ individual commits to help reviewers get through it. This PR does the following:
go.opentelemetry.io/contrib/configpackage to latest. this brings in breaking changes. in order to prevent those breaking changes from impacting end users, i've also added a layer of config unmarshalingotelinit. the reason for including this change was that unmarshaling the config was causing circular dependencies i didn't want to address by moving code that could be deleted around.Replacement for #11458.
Fixes #12021