Skip to content

Commit bc17a98

Browse files
feat(native): docs on extending performance API with explicit timings (#12041)
* add docs on explicit timed API * rephrasing
1 parent 50575e3 commit bc17a98

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/platforms/native/common/tracing/instrumentation/custom-instrumentation.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,21 @@ To capture transactions and spans customized to your organization's needs, you m
1919

2020
<PlatformContent includePath="performance/add-spans-example" />
2121

22+
## Custom Timestamps
23+
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.
24+
- `sentry_transaction_start_ts`
25+
- `sentry_transaction_finish_ts`
26+
- `sentry_transaction_start_child_ts`
27+
- `sentry_transaction_start_child_ts_n`
28+
- `sentry_span_start_child_ts`
29+
- `sentry_span_start_child_ts_n`
30+
- `sentry_span_finish_ts`
31+
32+
They only differ from their non-timestamped counterparts by taking an additional timestamp parameter, which is the unix epoch offset in microseconds.
33+
34+
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.
35+
36+
2237
<PlatformContent includePath="performance/concurrency" />
2338

2439
<PlatformContent includePath="performance/connect-errors-spans" />

0 commit comments

Comments
 (0)