Skip to content

feat: Enable "head sampling" for OTEL traces#703

Merged
spencewenski merged 1 commit intomainfrom
trace-sampler
Mar 25, 2025
Merged

feat: Enable "head sampling" for OTEL traces#703
spencewenski merged 1 commit intomainfrom
trace-sampler

Conversation

@spencewenski
Copy link
Copy Markdown
Member

@spencewenski spencewenski commented Mar 25, 2025

Head sampling can be enabled by setting the [tracing.trace-sampling-ratio] config field to a value in [0.0, 1.0].

[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].
@spencewenski spencewenski merged commit 37de32c into main Mar 25, 2025
19 checks passed
@spencewenski spencewenski deleted the trace-sampler branch March 25, 2025 06:20
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]>
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.

1 participant