Custom instrumentation example doesn't compile
Core or SDK?
Platform/SDK
Which part? Which one?
native
Description
Code in https://docs.sentry.io/platforms/native/performance/instrumentation/custom-instrumentation/ doesn't work - sentry_transaction_start takes two parameters. Also sentry_transaction_context_new has a trailing comma that won't compile, I assume this is a mistake.
Suggested Solution
Fix example to explain where the second parameter of sentry_transaction_start comes from.
I found some example code with:
sentry_transaction_t* tx = sentry_transaction_start(tx_ctx, sentry_value_new_null());
Routing to @getsentry/owners-native for triage. ⏲️
Quoting from the documentation of sentry_transaction_start:
The second parameter is a custom Sampling Context to be used with a Traces
Sampler to make a more informed sampling decision. The SDK does not currently
support a custom Traces Sampler and this parameter is ignored for the time
being but needs to be provided.
So passing in sentry_value_new_null here is definitely sensible. Thanks for reporting this, I'll update the documentation.