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());
  if (options.dsn != null) {
    setPublicKey(Dsn.parse(options.dsn!).publicKey);
  }
  if (options.release != null) {
    setRelease(options.release!);
  }
  if (options.environment != null) {
    setEnvironment(options.environment!);
  }
  if (scope.user?.id != null) {
    setUserId(scope.user!.id!);
  }
  if (scope.user?.segment != null) {
    setUserSegment(scope.user!.segment!);
  }
}