diff --git a/docs/platforms/native/common/tracing/instrumentation/custom-instrumentation.mdx b/docs/platforms/native/common/tracing/instrumentation/custom-instrumentation.mdx index d20aa278a1dc3..15cfe5aa9f1df 100644 --- a/docs/platforms/native/common/tracing/instrumentation/custom-instrumentation.mdx +++ b/docs/platforms/native/common/tracing/instrumentation/custom-instrumentation.mdx @@ -19,6 +19,21 @@ To capture transactions and spans customized to your organization's needs, you m +## Custom Timestamps +Sometimes you want to measure timings in code that cannot call Native SDK functions directly (like GPU shaders). For these cases, the following explicitly timed functions can be used. +- `sentry_transaction_start_ts` +- `sentry_transaction_finish_ts` +- `sentry_transaction_start_child_ts` +- `sentry_transaction_start_child_ts_n` +- `sentry_span_start_child_ts` +- `sentry_span_start_child_ts_n` +- `sentry_span_finish_ts` + +They only differ from their non-timestamped counterparts by taking an additional timestamp parameter, which is the unix epoch offset in microseconds. + +When using these functions, you should ensure that the provided timestamps are consistent. It is recommended to use the normal interface with automatic timestamping, and to only use the explicitly timed interface when absolutely necessary. + +