-
-
Notifications
You must be signed in to change notification settings - Fork 53
Add traces sampling function support for Windows and Linux #1057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
plugin-dev/Source/Sentry/Private/GenericPlatform/GenericPlatformSentrySubsystem.cpp
Outdated
Show resolved
Hide resolved
| if (settings->EnableTracing && settings->SamplingType == ESentryTracesSamplingType::TracesSampler) | ||
| { | ||
| UE_LOG(LogSentrySdk, Warning, TEXT("The Native SDK doesn't currently support sampling functions")); | ||
| sentry_options_set_traces_sampler(options, HandleTraceSampling); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make HandleTraceSampling non-static and forward "this" here. We could get rid of the static pointer to the class then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike other Native SDK callbacks sentry_options_set_traces_sampler doesn’t provide a user_data parameter which normally acts as a closure allowing access to the subsystem implementation within the handler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plugin-dev/Source/Sentry/Private/GenericPlatform/GenericPlatformSentrySubsystem.h
Show resolved
Hide resolved
This PR updates `Sampling` section for Unreal SDK docs: - Removed notice that trace sampling function is not supported on Windows and Linux - Updated custom trace sampler example Related to: - getsentry/sentry-unreal#1057
This PR adds Unreal Engine SDK migration guide for the upcoming `1.0.0` plugin release. Related to: - getsentry/sentry-unreal#928 - getsentry/sentry-unreal#971 - getsentry/sentry-unreal#1051 - getsentry/sentry-unreal#1018 - getsentry/sentry-unreal#886 - getsentry/sentry-unreal#745 - getsentry/sentry-unreal#436 - getsentry/sentry-unreal#589 - getsentry/sentry-unreal#1057 - getsentry/sentry-unreal#669 --------- Co-authored-by: Bruno Garcia <[email protected]>
* Rework creating transaction with options * Add trace sampler support for Windows/Linux * Format code * Move global ref under platform define * Clean up * Update changelog * Update package snapshot * Reset global static pointer on subsystem close * Remove static global subsystem pointer * Format code * Add engine null check * Format code * Add tests * Update packeage snapshot * Format code --------- Co-authored-by: Sentry Github Bot <[email protected]>
This PR introduces traces sampling function support for platforms where the Unreal plugin relies on
sentry-native(enabled by getsentry/sentry-native#1108)Key changes:
FSentryTransactionOptionsstruct to hold custom sampling context (intended to be extended in future)USentrySubsystem::StartTransactionWithContextAndOptionsnow acceptsFSentryTransactionOptionsinstead ofTMap<FString, FString>FSentryVariantinstead ofFStringRelated docs update: