otel: update breaking changing apis #323
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR updates the OTEL dependencies, which have breaking APIs, and other deps.
Note: This PR will be a draft until open-telemetry/opentelemetry-go#3229 gets fixed in the next OTEL version. This is blocking becauseotelsql
relies on OTEL deduping re-registering metrics; if that invariant doesn't hold, it causes a panic. We'll wait until there's a new OTEL version, and see how everything works.After the problem above was fixed, there were two other breaking changes:
service_name
and other satellite attributes aren't automatically added to metrics. This is now fixed with ametrics.BaseAttrs
that should be used in otherbaseAttrs
slices.UpDownCounter
instead ofGauge
. That package has more logic than what we need, so I did a direct implementation of the metrics that interest us and removed the dependency,.I also added an
Uptime
tile:Memory metrics now show both
api
andhealthbot
series.Context
We were notified by dependabot that new dependency versions were available.
Implementation overview
The OTEL breaking changes were a bit annoying since there's no documentation on how to fix them.
I had to do some GH search and code reading to figure out how to fix this properly.
Implementation details and review orientation
I slightly modified the bucket numbers to have extra buckets between the 10ms and 100ms range.