opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

update config dependency

Open codeboten opened this issue 1 year ago • 6 comments

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 https://github.com/open-telemetry/opentelemetry-collector/pull/11458.

codeboten avatar Nov 05 '24 21:11 codeboten

Looking forward to seeing this get merged!

mjnowen avatar Nov 12 '24 09:11 mjnowen

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Nov 27 '24 03:11 github-actions[bot]

Not stale? @codeboten

mjnowen avatar Nov 27 '24 09:11 mjnowen

Codecov Report

Attention: Patch coverage is 82.05805% with 68 lines in your changes missing coverage. Please review.

Project coverage is 91.62%. Comparing base (2447a81) to head (f2cddc3). Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
service/service.go 72.38% 34 Missing and 3 partials :warning:
service/telemetry/internal/migration/v0.3.0.go 54.54% 12 Missing and 3 partials :warning:
service/telemetry/internal/migration/v0.2.0.go 93.67% 8 Missing and 2 partials :warning:
component/componenttest/configtest.go 0.00% 2 Missing and 1 partial :warning:
service/telemetry/metrics.go 60.00% 1 Missing and 1 partial :warning:
service/telemetry/config.go 92.30% 1 Missing :warning:
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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Dec 09 '24 19:12 codecov[bot]

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 transitioning

i 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: https://github.com/open-telemetry/opentelemetry-collector/pull/11611/commits/df832652441ac889705c3e77e04426a4e01b2122

This is waiting on https://github.com/open-telemetry/opentelemetry-go-contrib/pull/6412

codeboten avatar Dec 10 '24 00:12 codeboten

The approach to handle the backward incompatible change looks good to me 👍

dmitryax avatar Dec 10 '24 01:12 dmitryax

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Jan 01 '25 03:01 github-actions[bot]

Attempting to fix the integration test that's failing in contrib: https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/37425

Unclear to me whether this change is making that test flakier or not as this issue exists: https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/34836

codeboten avatar Jan 22 '25 23:01 codeboten

Another attempt at fixing the contrib test https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/37431

codeboten avatar Jan 23 '25 06:01 codeboten

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

codeboten avatar Jan 23 '25 16:01 codeboten

i can't repro locally was finally able to repro locally... will continue debugging the issue

codeboten avatar Jan 23 '25 17:01 codeboten

do you have any thoughts on what's causing it to fail?

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.

songy23 avatar Jan 23 '25 17:01 songy23

Thanks for your help @songy23, bug has been fixed

codeboten avatar Jan 24 '25 01:01 codeboten