toBaggage method
Implementation
SentryBaggage toBaggage({
SdkLogCallback? log,
}) {
final baggage = SentryBaggage({}, log: log);
baggage.setTraceId(traceId.toString());
baggage.setPublicKey(publicKey);
if (release != null) {
baggage.setRelease(release!);
}
if (environment != null) {
baggage.setEnvironment(environment!);
}
if (userId != null) {
baggage.setUserId(userId!);
}
if (transaction != null) {
baggage.setTransaction(transaction!);
}
if (sampleRate != null) {
baggage.setSampleRate(sampleRate!);
}
if (sampleRand != null) {
baggage.setSampleRand(sampleRand!);
}
if (sampled != null) {
baggage.setSampled(sampled!);
}
if (replayId != null) {
baggage.setReplayId(replayId.toString());
}
return baggage;
}