Skip to content
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

(DOCS) Document Custom Performance Metrics #5257

Closed
7 tasks
smeubank opened this issue Jul 6, 2022 · 5 comments · Fixed by #5285
Closed
7 tasks

(DOCS) Document Custom Performance Metrics #5257

smeubank opened this issue Jul 6, 2022 · 5 comments · Fixed by #5285

Comments

@smeubank
Copy link
Member

smeubank commented Jul 6, 2022

Intro:

Developers wishing to collect custom performance metrics,
will need some documentation explaining how to use it and some example implementation,
so that they can send these metrics to Sentry and visualize them in product

Checklist:

  • start with JS browser setMeasurements
  • intro
    • what is it, and what is it not?
    • differentiate between built-in measurements and custom measurements
  • how does it work - high level - set (singular, plural, types etc) and attach to transaction
    • public setMeasurement(name: string, value: number, unit: MeasurementUnit = ''): void { this._measurements[name] = { value, unit };
  • how to use it
  • example snippets
  • ensure we cover the boundaries in which they can collect custom metrics
  • ideally reference product docs for DnD features where developers could visualize these docs

Related:

follow up

  • needs developer docs
  • platforms where it is not supported?
@getsentry-release
Copy link
Contributor

Routing to @getsentry/team-web-sdk-frontend for triage. ⏲️

@AbhiPrasad
Copy link
Member

As per https://develop.sentry.dev/sdk/event-payloads/transaction/

Do we need to differentiate between built-in measurements and custom measurements? Do we mention the limit we have on custom measurements?

Optional. An object containing standard/custom measurements with keys signifying the name of the measurement.

https://github.com/getsentry/sentry/blob/a8c960a933d2ded5225841573d8fc426a482ca9c/static/app/utils/discover/fields.tsx#L654-L676

Units: https://getsentry.github.io/relay/relay_metrics/enum.MetricUnit.html

@smeubank
Copy link
Member Author

smeubank commented Jul 6, 2022

Do we need to differentiate between built-in measurements and custom measurements?

Yes, the difference should be explained. I will update checklist item 2

Do we mention the limit we have on custom measurements?

Yes we can mention it, but this limit is not set in the SDK if memory serves well. So I would lean towards stating something along the lines of "there is a server side limit, initially set to X (i think it's 20 or 5?)" and not really a need to get more detailed than that

@smeubank
Copy link
Member Author

where do we think these belong in docs? Under enriching events?

https://docs.sentry.io/platforms/javascript/enriching-events/

@AbhiPrasad
Copy link
Member

These are part of performance monitoring, so I would say https://docs.sentry.io/platforms/javascript/performance/ or similar. Think it should be under the instrumentation section: https://docs.sentry.io/platforms/javascript/performance/instrumentation/

@AbhiPrasad AbhiPrasad self-assigned this Jul 12, 2022
@smeubank smeubank linked a pull request Jul 18, 2022 that will close this issue
@github-actions github-actions bot locked and limited conversation to collaborators Aug 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants