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

[exporter/prometheusremotewriteexporter] does not compile on Go v1.21 #29112

Closed
acromc opened this issue Nov 11, 2023 · 3 comments
Closed

[exporter/prometheusremotewriteexporter] does not compile on Go v1.21 #29112

acromc opened this issue Nov 11, 2023 · 3 comments
Labels
bug Something isn't working exporter/prometheusremotewrite needs triage New item requiring triage

Comments

@acromc
Copy link

acromc commented Nov 11, 2023

Component(s)

No response

What happened?

Description

Building custom collector that imports exporter/prometheusremotewriteexporter fails on Go 1.21

Steps to Reproduce

Import exporter/prometheusremotewriteexporter v0.88 while building on Go 1.21.x

Expected Result

Successful compilation

Actual Result

Compilation fails with this error

../go/pkg/mod/github.com/prometheus/prometheus@v0.47.2/model/labels/labels.go:365:23: type func(a Label, b Label) bool of func(a, b Label) bool {…} does not match inferred type func(a Label, b Label) int for func(a E, b E) int

I opened an issue in the prometheus repo here and it looks like it was fixed in the version v0.48.0. I guess you need to upgrade the dependency version in order to compile on Go 1.21.

Collector version

v0.88

Environment information

Environment

Exporter v0.88
Go v1.21.x

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@acromc acromc added bug Something isn't working needs triage New item requiring triage labels Nov 11, 2023
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

Hello @gr0l0rg, it looks like the relevant Prometheus releases are labeled as Pre-release. The latest official published release is v2.47.2.

The collector runs dependency updates every Wednesday for this component. So once the relevant Prometheus releases are no longer considered Pre-release, we'll include them in the collector.

I'm going to close this issue since there isn't any action item here, but feel free to let us know if anything doesn't make sense!

@Aneurysm9
Copy link
Member

In addition to what @crobert-1 has said about picking up the newer Prometheus library versions when they are released, I'll also note that the collector contrib v0.88.0 release was built with Go 1.21.3. If you encounter recurrence of this failure after the Prometheus dependency is updated please provide a minimal reproduction so that we can further investigate the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working exporter/prometheusremotewrite needs triage New item requiring triage
Projects
None yet
Development

No branches or pull requests

3 participants