Skip to content

feat: Set HTTP request span name as {method} {route} - #748

Merged
spencewenski merged 1 commit into
mainfrom
http-span-name
Apr 29, 2025
Merged

feat: Set HTTP request span name as {method} {route}#748
spencewenski merged 1 commit into
mainfrom
http-span-name

Conversation

@spencewenski

@spencewenski spencewenski commented Apr 29, 2025

Copy link
Copy Markdown
Member

The OTEL semantic conventions specify that an HTTP request span should be named {method} {target} if the method and target (route) are available. The tracing-opentelemtry crate allows setting a dynamic span name using the otel.name field, which allows us to use the method/route in the span name.

This PR also sets the http span kind as SERVER

The OTEL semantic conventions specify that an HTTP request span should
be named `{method} {target}` if the method and target (route) if that
information is available. The `tracing-opentelemtry` crate allows
setting a dynamic span name using the `otel.name` field, which allows us
to use the method/route in the span name.

This PR also sets the http span kind as `SERVER`
@codecov

codecov Bot commented Apr 29, 2025

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 58.83%. Comparing base (9eddc1b) to head (b0b71c9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/service/http/middleware/tracing/mod.rs 0.00% 5 Missing ⚠️
Files with missing lines Coverage Δ
src/service/http/middleware/tracing/mod.rs 38.09% <0.00%> (-0.93%) ⬇️

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 9eddc1b...b0b71c9. 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 14d659b into main Apr 29, 2025
@spencewenski
spencewenski deleted the http-span-name branch April 29, 2025 07:28
@github-actions github-actions Bot mentioned this pull request Apr 29, 2025
spencewenski added a commit that referenced this pull request Apr 29, 2025
## 🤖 New release

* `roadster`: 0.7.3 -> 0.7.4 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

##
[0.7.4](roadster-v0.7.3...roadster-v0.7.4)
- 2025-04-29

### Added

- Set HTTP request span name as `{method} {route}`
([#748](#748))

### Other

- Update README.md
([#743](#743))
</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 <3319370+spencewenski@users.noreply.github.com>
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