getsentry / sentry-docs

Sentry's documentation (and tools to build it)
https://docs.sentry.io
Other
332 stars 1.46k forks source link

Add Profile to Transaction #11114

Open thinkocapo opened 2 months ago

thinkocapo commented 2 months ago

Core or SDK?

Core Sentry product

Which part? Which one?

Add Profile to Custom Transaction

Description

Need it for Android but probably a good idea for all SDK's.

We have Android's documentation for Custom Instrumentation we have:

Image

Overall Approach:

  1. start a custom transaction [docs say transaction, not span]
  2. [profile will start being recorded for this transaction? :point_up:]
  3. [must create a 'profile' obj, do profile.start() and attach it to the transaction obj? How?]
  4. end the custom transaction [and this will auto-finish the open profile?]

Suggested Solution

Overall Approach:

  1. start a custom transaction [docs say transaction, not span]
  2. profile starts being recorded (assuming they have SDK Profiling enabled)
  3. end the custom transaction and this ends the profile

Can open the Trace/Transaction in Sentry and then view the profile. It should cover the same duration of the parent span (the transaction).

getsantry[bot] commented 2 months ago

Assigning to @getsentry/support for routing ⏲️