Span Specifications
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Domain
- backend-api-design, documentation
Research direction
Review the existing attribute database, span description and naming rules, span ops, and the metrics precedent in issue #649. The work is done when the desired span-specification model and its ownership or location are agreed, including how conventions validation and develop documentation should relate to it.
Written by the indexing model from the issue text.
Description
Today, we collect a few building blocks for spans, but we're missing overall recipes or specifications, what data exactly spans should carry.
Span specifications today either don't exist or live in develop docs. Sometimes they're rather implicit, like the specs we wrote for prebuilt dashboards (formerly known as Insight Modules). The reason this is coming up because we often talk about which attributes a span should hold and how this currently differs across SDKs. There's a lot of implicit/shared knowledge today that isn't written down properly.
Today, we have:
- a database of attributes (mostly without hints on which spans/telemetry they belong, which IMHO is correct)
- rules for span descriptions and names
- span ops
All of these are already fine but ideally we can define a schema that describes how spans with a certain op should carry data:
A span specification should include:
- a list of span ops for which the specification applies
- a description of the span
- additional context if necessary (i.e. when to (not) start a span)
- requirement level (span should always be started by default, recommended to be started by default, as opt-in)
- a list of attributes the span should carry
- attribute key (canonical)
- requirement level
- notes (e.g. "MUST be gated by
dataCollection.httpHeaders", "MUST hold the outgoing request URL, not the current window location", etc.)
- a list of links the span should include
- (less important than attributes but might be neat in some cases)
- a version and changelog to record spec changes
Benefits:
- Today, our develop docs specs are outdated. They reference attributes we deprecated in conventions ([example](https://develop.sentry.dev/sdk/telemetry/traces/modules/requests/, which calls for
http.query, which is deprecated in favour ofurl.query). We can test against this in conventions, by checking if referenced attributes in a span spec are 1. entered in conventions, 2. deprecated or still up to date - Conventions are easily machine-readable. We can easily generate LLM specific versions of these specs, or just point llms to the respective models.
- There's (soon to be) precedence for metrics via #649
Drawbacks:
- Develop docs loose a bit of content (though as I said, they're outdated already)
- Requires work (duh)
Alternatives:
- We do nothing. Technically also fine BUT we don't have reliable specs today which IMHO is a larger issue than we think.
- Specs live in develop docs in dedicated, new pages. Probably requires more work than having them in conventions, especially if we want testing to be brought over as well. If we care about specs being accessible via develop, we can inject conventions pages into develop docs (cheap via iframes, or more sophisticated at build time).
- Dominant language
- TypeScript
- Stars
- 16
- Forks
- 7
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 63
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-conventions
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
getsentry/sentry-conventions#732 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 61/100
getsentry/sentry-conventions#731 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
getsentry/sentry-conventions#730 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
getsentry/sentry-conventions#709 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
getsentry/sentry-conventions#523 · 1 comment ·
Maintainers usually reply within 1 day
All issues in getsentry/sentry-conventions
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 73/100
openclaw/openclaw#182077 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
aikido high security
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dequelabs/axe-linter-action#161 ·
-
[Feature Request] Update the DimCode agent icon to the 45:32 brand markPossibly taken @eric8810 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
lyswhut/lx-music-desktop#3026 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
abhigyanpatwari/GitNexus#3704 ·
Maintainers usually reply within 1 day