-
@ApiStatus.Internal() public final class InternalSentrySdk
Sentry SDK internal API methods meant for being used by the Sentry Hybrid SDKs.
-
-
Method Summary
Modifier and Type Method Description static IScope
getCurrentScope()
static Map<String, Object>
serializeScope(@NotNull() Context context, @NotNull() SentryAndroidOptions options, @Nullable() IScope scope)
Serializes the provided scope. static SentryId
captureEnvelope(@NotNull() Array<byte> envelopeData, boolean maybeStartNewSession)
Captures the provided envelope. static Map<String, Object>
getAppStartMeasurement()
static void
setTrace(@NotNull() String traceId, @NotNull() String spanId, @Nullable() Double sampleRate, @Nullable() Double sampleRand)
Allows a Hybrid SDK to set the trace on the native layer -
-
Method Detail
-
getCurrentScope
@Nullable() static IScope getCurrentScope()
-
serializeScope
@NotNull() static Map<String, Object> serializeScope(@NotNull() Context context, @NotNull() SentryAndroidOptions options, @Nullable() IScope scope)
Serializes the provided scope. Specific data may be back-filled (e.g. device context) if thescope itself does not provide it.
- Parameters:
context
- Android contextoptions
- Sentry Optionsscope
- the scope
-
captureEnvelope
@Nullable() static SentryId captureEnvelope(@NotNull() Array<byte> envelopeData, boolean maybeStartNewSession)
Captures the provided envelope. Compared to captureEvent thismethod - will not enrich events with additional data (e.g. scope)- will not execute beforeSend: it's up to the caller to take care of this- will not perform any sampling: it's up to the caller to take care of this- will enrich the envelope with a Session update if applicable
- Parameters:
envelopeData
- the serialized envelope data
-
getAppStartMeasurement
static Map<String, Object> getAppStartMeasurement()
-
setTrace
static void setTrace(@NotNull() String traceId, @NotNull() String spanId, @Nullable() Double sampleRate, @Nullable() Double sampleRand)
Allows a Hybrid SDK to set the trace on the native layer
- Parameters:
traceId
- the trace IDspanId
- the trace origin's span IDsampleRate
- the sample rate used by the origin of the tracesampleRand
- the random value used to sample with by the origin of the trace
-
-
-
-