DatadogRum class
- Available extensions
Properties
- contextInjectionSetting → TraceContextInjection
-
Available on DatadogRum, provided by the DatadogRumInternal extension
no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- logger → InternalLogger
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- traceSampleRate → double
-
The sample rate for tracing resources.
final
Methods
-
addAction(
RumActionType type, String name, [Map< String, Object?> attributes = const {}]) → void - Register the occurrence of a User Action.
-
addAttribute(
String key, Object? value) → void -
Adds a custom attribute with
keyandvalueto all future events sent by the RUM monitor. Note thatvaluemust be supported by StandardMessageCodec. Passing avalueof null is the same as calling removeAttribute -
addError(
Object error, RumErrorSource source, {StackTrace? stackTrace, String? errorType, Map< String, Object?> attributes = const {}}) → void -
Notifies that the Exception or Error
erroroccurred in currently presented View, with an origin ofsource. You can optionally set additionalattributesfor this error, anerrorTypeand astackTrace -
addErrorInfo(
String message, RumErrorSource source, {StackTrace? stackTrace, String? errorType, Map< String, Object?> attributes = const {}}) → void -
Notifies that an error occurred in currently presented View, with the
supplied
messageand with an origin ofsource. You can optionally supply astackTrace,errorType, and send additionalattributesfor this error -
addFeatureFlagEvaluation(
String name, Object value) → void -
Adds the result of evaluating a feature flag with a given
nameandvalueto the view. Feature flag evaluations are local to the active view and are cleared when the view is stopped -
addTiming(
String name) → void -
Adds a specific timing named
namein the currently presented View. The timing duration will be computed as the number of nanoseconds between the time the View was started and the time the timing was added. -
addViewAttribute(
String key, Object? value) → void -
Adds a custom attribute with
keyandvalueto the current view. Note thatvaluemust be supported by StandardMessageCodec. Passing avalueof null is the same as calling removeViewAttribute -
addViewAttributes(
Map< String, Object?> attributes) → void -
Adds a collection of custom
attributesto the current view. Note that values in this map must be supported by StandardMessageCodec. -
addViewLoadingTime(
{bool override = false}) → void -
Adds view loading time to current RUM view based on the time elapsed since
the view was started. If this method is called multiple times, only the
first timing is used, unless
overwriteis set totrue. Ifoverwriteistrue, the new load timing overwrites any previous value. -
failFeatureOperation(
String name, RumFeatureOperationFailureReason failureReason, {String? operationKey, Map< String, Object?> attributes = const {}}) → void -
Finishes a feature operation with the given
namewith a failure status and the givenfailureReason. -
getCurrentSessionId(
) → Future< String?> - Get the current active session ID. The session ID will be null if no session is active or if the session has been sampled out.
-
handleFlutterError(
FlutterErrorDetails details) → void - Send a Flutter error to RUM. This is used in conjunction with FlutterError.onError by doing the following during initialization
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeAttribute(
String key) → void -
Removes the custom attribute
keyfrom all future events sent by the RUM monitor. Events created prior to this call will not lose this attribute. -
removeViewAttribute(
String key) → void -
Removes the custom attribute
keyfrom the current view. Events created prior to this call will not lose this attribute. -
removeViewAttributes(
List< String> keys) → void -
Removes all custom attributes with the supplied
keysfrom the current view. Events created prior to this call will not lose this attribute. -
shouldSampleTrace(
String? sessionId, TracingId traceId) → bool - Uses the configured DatadogRumConfiguration.traceSampleRate to determine if a sample should be traced.
-
startAction(
RumActionType type, String name, [Map< String, Object?> attributes = const {}]) → void -
Notifies that a User Action of
typehas started, namedname. This is used to track long running user actions (e.g. "scroll"). Such an User Action must be stopped with stopAction, and will be stopped automatically if it lasts for more than 10 seconds. You can optionally provide customattributes. -
startFeatureOperation(
String name, {String? operationKey, Map< String, Object?> attributes = const {}}) → void -
Starts a feature operation with the given
name. -
startResource(
String key, RumHttpMethod httpMethod, String url, [Map< String, Object?> attributes = const {}]) → void -
Notifies that the a Resource identified by
keystarted being loaded from givenurlusing the specifiedhttpMethod. The supplied customattributeswill be attached to this Resource. -
startView(
String key, [String? name, Map< String, Object?> attributes = const {}]) → void -
Notifies that the View identified by
keystarts being presented to the user. This view will show asnamein the RUM explorer, and defaults tokeyif it is not provided. You can also attach customattributes, who's values must be supported by StandardMessageCodec. -
stopAction(
RumActionType type, String name, [Map< String, Object?> attributes = const {}]) → void -
Notifies that the User Action of
type, namednamehas stopped. This is used to stop tracking long running user actions (e.g. "scroll"), started with startAction. -
stopResource(
String key, int? statusCode, RumResourceType kind, [int? size, Map< String, Object?> attributes = const {}]) → void -
Notifies that the Resource identified by
keystopped being loaded successfully and supplies additional information about the Resource loaded, including itskind, thestatusCodeof the response, thesizeof the Resource, and any other customattributesto attach to the resource. -
stopResourceWithError(
String key, Exception error, [Map< String, Object?> attributes = const {}]) → void -
Notifies that the Resource identified by
keystopped being loaded with an Exception specified byerror. You can optionally supply customattributesto attach to this Resource. -
stopResourceWithErrorInfo(
String key, String message, String type, [Map< String, Object?> attributes = const {}]) → void -
Notifies that the Resource identified by
keystopped being loaded with the suppliedmessage. You can optionally supply customattributesto attach to this Resource. -
stopSession(
) → void - Stops the current session. A new session will start in response to a call to startView, addAction, or startAction. If the session is started because of a call to addAction or startAction, the last know view is restarted in the new session.
-
stopView(
String key, [Map< String, Object?> attributes = const {}]) → void -
Notifies that the View identified by
keystops being presented to the user. You can also attach customattributes, who's values must be supported by StandardMessageCodec. -
succeedFeatureOperation(
String name, {String? operationKey, Map< String, Object?> attributes = const {}}) → void -
Finishes a feature operation with the given
namewith a successful status. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
enable(
DatadogSdk core, DatadogRumConfiguration configuration) → Future< DatadogRum?>