AppticsApiTracker class
Main entry point for Apptics API call tracking.
Provides manual tracking, automatic tracking via HttpOverrides, and serves as the central hub that AppticsDioInterceptor and AppticsHttpClient funnel data through.
Constructors
Properties
-
excludedUrlPatterns
↔ Set<
String> -
URL patterns to exclude from tracking. If a URL contains any of these
strings, the API call will not be tracked.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAutoTrackingEnabled → bool
-
Whether automatic tracking is currently enabled.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
disableAutoTracking(
) → void - Disables automatic HTTP tracking and restores the previous HttpOverrides, if any.
-
enableAutoTracking(
) → void -
Enables automatic tracking of all HTTP calls made via
dart:io's HttpClient by setting a global HttpOverrides. -
endApiTracking(
{required String? trackId, int? statusCode, String? errorMessage}) → Future< void> - Closes a tracking span previously opened by startApiTracking.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startApiTracking(
{required String url, required String method}) → Future< String?> -
Starts tracking an API call. Returns a Future resolving to the
trackIdissued by the native SDK, or null if tracking could not be started (URL excluded, native error, or framework unavailable). -
toString(
) → String -
A string representation of this object.
inherited
-
trackApiCall(
{required String url, required String method, int? statusCode, String? errorMessage}) → Future< void> - Convenience for manual tracking when timing isn't available.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → AppticsApiTracker
-
no setter