Skip to content

JS SDK Simplified Performance APIΒ #8724

Closed
getsentry/sentry-docs
#7707
@AbhiPrasad

Description

@AbhiPrasad

ref getsentry/team-sdks#3

See our project board to track this initiative across all SDKs

πŸ‘©β€πŸ’» User Stories

  • As a developer, I want the SDK to offer an easy-to-use API to manually instrument code paths and propagate context where manual instrumentation is impossible, to avoid observability gaps.
  • As Sentry, we want to make this switch without requiring changes to downstream services.

RFC

https://github.com/getsentry/rfcs/blob/main/text/0101-revamping-the-sdk-performance-api.md

### Tasks
- [ ] https://github.com/getsentry/sentry-javascript/pull/8725
- [ ] https://github.com/getsentry/sentry-javascript/pull/8791
- [ ] https://github.com/getsentry/sentry-javascript/pull/8803
- [ ] https://github.com/getsentry/sentry-docs/pull/7707

Explanation of Process

  1. Add span.setName method (span.name is alias for span.description, description should still be serialized and sent with the span payload for now).
  2. Follow the RFC and add top level span creation methods (we recommend Sentry.startActiveSpan and Sentry.startSpan). SDK authors can also add their own methods as appropriate for their SDK, the key is having top level methods that create spans. These span creator methods should require name as a required key in the span context passed in. The important requirement of all span creator methods is that they only reference and operate on spans.
  3. Add top level method for Sentry.setMeasurement
  4. Update performance docs to use new APIs.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions