setValuesFromScope method

  1. @internal
dynamic setValuesFromScope(
  1. Scope scope,
  2. SentryOptions options
)

Implementation

@internal
setValuesFromScope(Scope scope, SentryOptions options) {
  final propagationContext = scope.propagationContext;
  setTraceId(propagationContext.traceId.toString());
  setPublicKey(options.parsedDsn.publicKey);
  if (options.release != null) {
    setRelease(options.release!);
  }
  if (options.environment != null) {
    setEnvironment(options.environment!);
  }
  if (scope.user?.id != null) {
    setUserId(scope.user!.id!);
  }
  // ignore: deprecated_member_use_from_same_package
  if (scope.user?.segment != null) {
    // ignore: deprecated_member_use_from_same_package
    setUserSegment(scope.user!.segment!);
  }
  if (scope.replayId != null && scope.replayId != SentryId.empty()) {
    setReplayId(scope.replayId.toString());
  }
}