File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
platform-includes/performance/enable-manual-instrumentation Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -17,16 +17,24 @@ sentry_transaction_context_t *tx_ctx = sentry_transaction_context_new(
1717sentry_transaction_t *tx = sentry_transaction_start(tx_ctx, sentry_value_new_null());
1818
1919// Transactions can have child spans (and those spans can have child spans as well)
20- sentry_span_t *span = sentry_transaction_start_child(
20+ sentry_span_t *child_span = sentry_transaction_start_child(
2121 tx,
2222 " child operation" ,
2323 " child description"
2424);
2525
26+ // Starting a child of a span requires the function `sentry_span_start_child` instead
27+ sentry_span_t *grandchild_span = sentry_span_start_child(
28+ child_span,
29+ " grandchild operation" ,
30+ " grandchild description"
31+ );
32+
2633// ...
27- // (Perform the operation represented by the span /transaction)
34+ // (Perform the operation represented by the spans /transaction)
2835// ...
2936
30- sentry_span_finish (span); // Mark the span as finished
37+ sentry_span_finish (grandchild_span); // Mark the spans as finished
38+ sentry_span_finish(child_span);
3139sentry_transaction_finish(tx); // Mark the transaction as finished and send it to Sentry
3240```
You can’t perform that action at this time.
0 commit comments