getsentry / team-sdks

A meta repository for tracking work across all SDK teams.
0 stars 0 forks source link

Project: Metrics Normalization #80

Closed cleptric closed 2 months ago

cleptric commented 3 months ago

Description

SDKs that support metrics today, already perform normalization on certain parts of a metric. We updated these rulesets and extended the allowed characters for tag values. The specification can be found on develop, https://develop.sentry.dev/sdk/metrics/#normalization.

A quick TL;DR: How to Implement

Update or add the replacement regexes for metric units, metric keys and tag keys and check if the correct replacement characters are applied. Remove the prior replacement regex and implement the replacement map for tag values.

Get inspired by the PHP SDK PR or the Relay PR.

Why should we be doing this?

We want to future-proof our metrics pipeline by allowing us to set certain exceptions about the payloads we receive from the SDKs and be compatible with our new Snuba MQL query dialect.

Why now?

This is a joint effort between SDKs, Ingest and Telemetry. Given the importance of the Metrics product at Sentry and the small scope of this task, we'll prioritize this. Implementation should be finished by Friday, April 12th.

Stakeholder(s)

@jan-auer @cleptric

Team(s)

Web Backend, Web Frontend, Mobile

Implementation Status

### Web Backend SDKs
- [ ] https://github.com/getsentry/sentry-python/issues/2937
- [ ] https://github.com/getsentry/sentry-php/issues/1731
- [ ] https://github.com/getsentry/sentry-ruby/issues/2289
- [ ] https://github.com/getsentry/sentry-dotnet/issues/3261
- [x] Unity will be handled by https://github.com/getsentry/sentry-dotnet/issues/3261
### Web Frontend SDKs
- [ ] https://github.com/getsentry/sentry-javascript/issues/11433
### Mobile SDKs
- [ ] https://github.com/getsentry/sentry-java/issues/3323
- [x] Android: should get it via https://github.com/getsentry/sentry-java/issues/3323
- [x] React Native: should get it via https://github.com/getsentry/sentry-javascript/issues/11433
- [ ] https://github.com/getsentry/sentry-dart/issues/1965
- [ ] https://github.com/getsentry/sentry-cocoa/issues/3829
krystofwoldrich commented 2 months ago

RN SDK https://github.com/getsentry/sentry-react-native/releases/tag/5.22.0 includes https://github.com/getsentry/sentry-javascript/issues/11433