Skip to content

feat!: Follow OTEL conventions for http spans and events #710

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

Merged
merged 1 commit into from
Mar 27, 2025

Conversation

spencewenski
Copy link
Member

Update provided HTTP span and events to follow the OTEL semantic conventions more closely. This PR includes some breaking changes to the constructors of some of our custom trace event handlers for the tower trace layer.

Closes #709

Update provided HTTP span and events to follow the OTEL semantic
conventions more closely. This PR includes some breaking changes to the
constructors of some of our custom trace event handlers for the tower
trace layer.
Copy link

codecov bot commented Mar 27, 2025

Codecov Report

Attention: Patch coverage is 30.68182% with 61 lines in your changes missing coverage. Please review.

Project coverage is 59.94%. Comparing base (b1f3a3c) to head (381b673).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/service/http/middleware/tracing/mod.rs 30.68% 61 Missing ⚠️
Files with missing lines Coverage Δ
src/service/http/middleware/tracing/mod.rs 41.87% <30.68%> (-14.73%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b1f3a3c...381b673. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@spencewenski spencewenski merged commit 533d0fc into main Mar 27, 2025
17 of 18 checks passed
@spencewenski spencewenski deleted the trace-http-headers branch March 27, 2025 09:02
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.

Ensure HTTP trace spans follow conventions
1 participant