getsentry / team-webplatform-meta

0 stars 0 forks source link

RFC about semantic conventions #107

Closed AbhiPrasad closed 1 year ago

AbhiPrasad commented 1 year ago

We've been relying on a variety of sources of truth for conventions on data attached to Sentry events.

For errors/transactions we have:

For spans we have:

For breadcrumbs we have:

For crons we have nothing atm.

For metrics (DDM) we have:

Let's write an RFC that accomplishes the following:

  1. Establishes attributes field for spans/breadcrumbs/crons/metrics that is the top level key value store for arbitrary data about a sentry signal (we can alias to data for backwards compat). Attributes will be flattened and rely on keys for separation (http.X vs. db.Y).
  2. Defines attributes to follow conventions that are superset of OTEL's semantic conventions
  3. Formalizes attribute conventions via some format that will be consumed by Relay/Kafka/Backend/Frontend (we can make this rust/python/js library that we publish, or just a plain json schema)

Goals:

  1. There is a clear mapping between what exists today vs. attributes we want for our spans/metrics/breadcrumbs in the future
  2. Everything is backwards compatible - an old SDK sending data should still keep working with modern Sentry (exceptions can apply)