feat: Enable "head sampling" for OTEL traces#703
Merged
spencewenski merged 1 commit intomainfrom Mar 25, 2025
Merged
Conversation
[Head sampling](https://opentelemetry.io/docs/concepts/sampling/#head-sampling) can be enabled by setting the `[tracing.trace-sampling-ratio]` config field to a value in [0.0, 1.0].
This was referenced Mar 27, 2025
spencewenski
added a commit
that referenced
this pull request
Mar 28, 2025
## 🤖 New release
* `roadster`: 0.7.0-beta.3 -> 0.7.0-beta.4 (⚠ API breaking changes)
### ⚠ `roadster` breaking changes
```text
--- failure derive_trait_impl_removed: built-in derived trait no longer implemented ---
Description:
A public type has stopped deriving one or more traits. This can break downstream code that depends on those types implementing those traits.
ref: https://doc.rust-lang.org/reference/attributes/derive.html#derive
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/derive_trait_impl_removed.ron
Failed in:
type CustomOnRequest no longer derives Copy, in /tmp/.tmpdSSYMj/roadster/src/service/http/middleware/tracing/mod.rs:154
--- failure method_parameter_count_changed: pub method parameter count changed ---
Description:
A publicly-visible method now takes a different number of parameters.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#fn-change-arity
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/method_parameter_count_changed.ron
Failed in:
roadster::service::http::middleware::tracing::CustomOnResponse::new now takes 1 parameters instead of 0, in /tmp/.tmpdSSYMj/roadster/src/service/http/middleware/tracing/mod.rs:210
--- failure struct_marked_non_exhaustive: struct marked #[non_exhaustive] ---
Description:
A public struct has been marked #[non_exhaustive], which will prevent it from being constructed using a struct literal outside of its crate. It previously had no private fields, so a struct literal could be used to construct it outside its crate.
ref: https://doc.rust-lang.org/cargo/reference/semver.html#attr-adding-non-exhaustive
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/struct_marked_non_exhaustive.ron
Failed in:
struct CustomOnRequest in /tmp/.tmpdSSYMj/roadster/src/service/http/middleware/tracing/mod.rs:154
--- failure unit_struct_changed_kind: unit struct changed kind ---
Description:
A public unit struct has been changed to a normal (curly-braces) struct, which cannot be constructed using the same struct literal syntax.
ref: rust-lang/cargo#10871
impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.40.0/src/lints/unit_struct_changed_kind.ron
Failed in:
struct CustomOnRequest in /tmp/.tmpdSSYMj/roadster/src/service/http/middleware/tracing/mod.rs:154
```
<details><summary><i><b>Changelog</b></i></summary><p>
<blockquote>
##
[0.7.0-beta.4](roadster-v0.7.0-beta.3...roadster-v0.7.0-beta.4)
- 2025-03-28
### Added
- [**breaking**] Follow OTEL conventions for http spans and events
([#710](#710))
- Allow providing trace env filter directives in app config
([#706](#706))
- Enable "head sampling" for OTEL traces
([#703](#703))
### Other
- Mark tracing middleware structs non-exhaustive
([#713](#713))
- Fix a copy/paste error in a comment
([#711](#711))
- Update dependencies
([#708](#708))
- Write CLI chapter
([#707](#707))
- Update tracing.md
([#704](#704))
</blockquote>
</p></details>
---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Spencer Ferris <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Head sampling can be enabled by setting the
[tracing.trace-sampling-ratio]config field to a value in [0.0, 1.0].