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

Migrate to OTEL-Go v1.14.0 #499

Merged
merged 2 commits into from
Mar 12, 2023
Merged

Migrate to OTEL-Go v1.14.0 #499

merged 2 commits into from
Mar 12, 2023

Conversation

kilianstallz
Copy link

OpenTelemetry-Go did change the sigature for the metric.Reader interface.
They also deprecated the Unit interface in favor of a string.

To keep using otelfiber with the latest otel-go packages we need to replace the Unit struct with string constants.
I also adapted the call signature of the reader interface like it is shown in the libraries tests.

metrics := metricdata.ResourceMetrics{}
err := reader.Collect(context.Background(), &metrics)

dependabot bot and others added 2 commits February 27, 2023 22:46
Bumps [go.opentelemetry.io/otel/metric](https://github.com/open-telemetry/opentelemetry-go) from 0.36.0 to 0.37.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](open-telemetry/opentelemetry-go@metric/v0.36.0...metric/v0.37.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/metric
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@ReneWerner87
Copy link
Member

does this mean that it is a breaking change and we should upgrade the major version of the package ?

@kilianstallz
Copy link
Author

kilianstallz commented Feb 28, 2023

does this mean that it is a breaking change and we should upgrade the major version of the package ?

Depends on how you would consider it.
The usage of Otelfiber would not change, as the Middleware API did not change.
However, the otel-go package did introduce breaking changes to the reader interface.

So I would say it isn't a breaking change to this package. But users need to use otel-go 1.14.0.

You can read the changelog of this release, v1.14.0

Sorry, I should have written a more detailed description to this PR.

@kilianstallz
Copy link
Author

kilianstallz commented Feb 28, 2023

The specific breaking changes from the Otel-go package (v1.14.0) that I adapted are:

  • Change to the reader interface
  • The Unit-Interface has been deprecated and has now been removed

The otelfiber.Middleware interface did not change.

@ReneWerner87
Copy link
Member

The usage of Otelfiber would not change, as the Middleware API did not change.

this is enough to know 👍

@eko eko mentioned this pull request Mar 2, 2023
1 task
@eko
Copy link
Contributor

eko commented Mar 9, 2023

Hi, do we expect anything else on this PR?

@ReneWerner87 ReneWerner87 merged commit 2968cf4 into gofiber:main Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants