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

Upgrade to opentelemetry-rust 0.27 #93

Merged
merged 2 commits into from
Jan 14, 2025
Merged

Conversation

divergentdave
Copy link
Contributor

This upgrades all opentelemetry-rust crates to the 0.27 release. (I'm skipping a couple versions because the 0.25 and 0.26 releases temporarily removed Prometheus exporter support) I updated the schema URL to reflect that opentelemetry-semantic-conventions 0.27.0 is based on version 1.29.0 of the semantic conventions, and confirmed that none of the spans, metrics, or attributes we use were affected by any intervening changes. Note that newer versions of opentelemetry-semantic-conventions put items behind a "semconv_experimental" feature flag if they represent something with "experimental" stability in the specification. This affects both the http.server.request.body.size and http.server.response.body.size metrics.

I also fixed a Clippy lint introduced by yesterday's 1.84 toolchain release.

This replaces #87, #90, #91, and #92.

@divergentdave
Copy link
Contributor Author

The opentelemetry-rust 0.27 release also introduced the ability to set histogram boundaries when constructing histogram instruments themselves, and moved the "views" feature, which allowed globally-scoped changes to how histograms are aggregated, behind a Cargo feature. With that in mind, we should probably set the boundaries on the http.server.request.body.size and http.server.response.body.size histograms to something more natural. The default boundaries range from 0 to 10,000, and have a lot of factors of five. I think it would make sense to make this configurable as well, since different users will likely have different expected ranges of request and response body sizes. This would require introducing a separate builder for Metrics though, as impl From<&Meter> for Metrics creates histogram instruments first, before any of the existing with_ methods can be called.

@jbr
Copy link
Contributor

jbr commented Jan 14, 2025

Thank you!

@jbr jbr merged commit 582459b into trillium-rs:main Jan 14, 2025
7 checks passed
@divergentdave divergentdave deleted the otel-0.27 branch January 14, 2025 20:30
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.

2 participants