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

Update opentelemetry collector to v0.40.0 #1142

Merged

Conversation

tete17
Copy link
Contributor

@tete17 tete17 commented Nov 28, 2021

What this PR does:
This PR updates the opentelemetry-collector dependency to 0.40.0

We can consider it a sibling of this PR grafana/helm-charts#855. The reason is the old version still had the wrong default port number for otel http endpoint. By upgrading the dependency we make sure to always use the port 4318 and avoid future confusion.

The changes are fairly minor, most of my work was going through the changelog and see the renaming of symbols they did. The biggest hurdles were the change they did in config parsing and the fact that the metrics for collectors are now hidden due under an internal package, see open-telemetry/opentelemetry-collector#3253.

Both changes are mostly reflected in the file modules/distributor/receiver/shim.go. That can be a good point of focus for anyone willing to review this change. Ignoring the vendor folder it shouldn't be that big.

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@CLAassistant
Copy link

CLAassistant commented Nov 28, 2021

CLA assistant check
All committers have signed the CLA.

@zalegrala
Copy link
Contributor

Relates to #1102

Copy link
Member

@mapno mapno left a comment

Choose a reason for hiding this comment

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

Hi, thanks for the contribution! Overall the upgrade looks good.

Left a comment about the registered metrics.

modules/distributor/receiver/shim.go Show resolved Hide resolved
Signed-off-by: Miguel Sacristán Izcue <miguel_tete17@hotmail.com>
@tete17 tete17 force-pushed the Update-opentelemetry-collector-dependency branch from 7f6e9f7 to a748f53 Compare December 2, 2021 22:11
Copy link
Member

@mapno mapno left a comment

Choose a reason for hiding this comment

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

All looks good, many thanks for the contribution!

@mapno
Copy link
Member

mapno commented Dec 3, 2021

Hey @tete17, it seems that the CI failed at two checks vendor-check and lint.

  1. For vendor-check: Can you run go mod tidy? There is a tiny diff in the modules.
  2. For Lint: consumererror.Combine(errs) appears to be deprecated. You can replace it with go.uber.org/multierr.Combine(errs...)

Thanks again!

Signed-off-by: Miguel Sacristán Izcue <miguel_tete17@hotmail.com>
@tete17
Copy link
Contributor Author

tete17 commented Dec 3, 2021

Hey @mapno sorry for the silly mistakes the vendor issue must have slipped me with the rebase and the deprecated function I saw in the first ci run and did nothing my bad.

Should be fixed now 😄

@tete17
Copy link
Contributor Author

tete17 commented Dec 5, 2021

I tried running the e2e tests locally and found no error. Are they run against what would be the result of the merge or the branch of the MR?

Could it be just a fluke? can we run them again?

Copy link
Member

@joe-elliott joe-elliott left a comment

Choose a reason for hiding this comment

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

Awesome improvement! I was privately dreading this upgrade. Thanks!

@joe-elliott joe-elliott merged commit 493fe58 into grafana:main Dec 6, 2021
@tete17 tete17 deleted the Update-opentelemetry-collector-dependency branch December 6, 2021 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants