Skip to content

Span Specifications #659

Open
Open

Description

@Lms24

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:

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).

Activity

  1. linear-code commented on Sep 30, 2026

    @linear-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions