-
Notifications
You must be signed in to change notification settings - Fork 94
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
ref(metrics): Use MRI for metrics extraction [INGEST-939] #1215
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not merge until we have the naming layer in sentry in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is totally fine, but I would like to see the PR for sentry done in parallel. I feel like there's some nasty surprises waiting there (particularly around the testharness)
Introduces Metric Resource Identifiers (MRI) for metrics extraction from sessions and transactions.
Background
MRIs follow three core principles:
Schema
MRIs have the format
<type>:<ns>/<name>@<unit>
, comprising the following components:c
), set (s
), distribution (d
), gauge (g
), and evaluated (e
) for derived numeric metrics.Note that the
/
character could cause troubles when not properly escaped in URL path parameters. Ingestion will mostly place the MRIs in query strings and POST bodies, where this should not be an issue. The user-facing APIs do not expose MRIs.Namespaces
Namespaces allow to identify the product entity that the metric got extracted from, and/or identify the use case that the metric belongs to. These namespaces cannot be defined freely, instead they are defined by Sentry. Over time, there should be more namespaces.
Some namespaces can be considered internal. These would not be allowed on the public ingestion endpoints, and would not be exposed via the user-facing Metrics API by default. Relay obtains a form of ACL (access control list) that determines which namespaces can be ingested.
The initial namespaces are:
transactions
errors
issues
sessions
alerts
custom
Next Steps