Skip to content
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

feat: add sample_rand / fix sample_rate in baggage #4751

Merged
merged 18 commits into from
Jan 31, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
better docs
philprime committed Jan 31, 2025

Verified

This commit was signed with the committer’s verified signature.
patroza Patrick Roza
commit 4a7545b51065e7d79ece9a223ebebc0b4deca3cf
4 changes: 2 additions & 2 deletions Sources/Sentry/Public/SentryTraceContext.h
Original file line number Diff line number Diff line change
@@ -48,12 +48,12 @@ NS_SWIFT_NAME(TraceContext)
@property (nullable, nonatomic, readonly) NSString *userSegment;

/**
* Sample rate used for this trace.
* Serialized sample rate used for this trace.
*/
@property (nullable, nonatomic, readonly) NSString *sampleRate;

/**
* Random value used to determine if the trace is sampled.
* Serialized random value used to determine if the trace is sampled.
*/
@property (nullable, nonatomic, readonly) NSString *sampleRand;


Unchanged files with check annotations Beta

if (context.transactionContext.parentSampled != kSentrySampleDecisionUndecided) {
return
[[SentrySamplerDecision alloc] initWithDecision:context.transactionContext.parentSampled
forSampleRate:context.transactionContext.sampleRate
withSampleRand:context.transactionContext.sampleRand];

Check warning on line 82 in Sources/Sentry/SentrySampling.m

Codecov / codecov/patch

Sources/Sentry/SentrySampling.m#L81-L82

Added lines #L81 - L82 were not covered by tests
}
return _sentry_calcSampleFromNumericalRate(options.tracesSampleRate);
func startTracer() throws {
let sut = fixture.getSut()
timer = try XCTUnwrap(Dynamic(sut).deadlineTimer.asObject as? Timer)

Check failure on line 306 in Tests/SentryTests/Transaction/SentryTracerTests.swift

GitHub Actions / Unit iOS - Xcode 15.4 - OS 17.2 Sentry

testCancelDeadlineTimer_TracerDeallocated, XCTUnwrap failed: expected non-nil value of type "NSTimer"
weakSut = sut
// The TestHub keeps a reference to the tracer in capturedEventsWithScopes.