Description
I'm seeing the warning, Tracing feature is enabled, but no 'Tracer' is registered. The Tracing integration with Logging will not work.
when debugging an iOS application with the logging verbosity set to verbose. We are not seeing this warning on Android.
I found a reference to this warning in a react native ticket which may offer a little more insight: https://github.com/datadog/dd-sdk-reactnative/issues/135?ref=https://coder.social
What is the cause of this warning and how can it be resolved? Any help is greatly appreciated. Thank you for all of your help so far!
flutter: [DATADOG SDK] 🐶 → 11:41:51.800 ⚠️ Tracing feature is enabled, but no `Tracer` is registered. The Tracing integration with Logging will not work.
flutter: [DATADOG SDK] 🐶 → 11:42:13.822 NTP time synchronization completed.
Server time will be used for signing events (0.024s difference with device time).
flutter: [DATADOG SDK] 🐶 → 11:42:17.204 💡 (tracing) No upload. Batch to upload: NO, System conditions: ✅
flutter: [DATADOG SDK] 🐶 → 11:42:17.208 ⏳ (RUM) Uploading batch...
flutter: [DATADOG SDK] 🐶 → 11:42:17.209 ⏳ (logging) Uploading batch...
flutter: [DATADOG SDK] 🐶 → 11:42:17.363 → (RUM) accepted, won't be retransmitted: [response code: 202 (accepted), request ID: 0C937F77-FEE4-4C05-B993-6F49F486CFE7]
flutter: [DATADOG SDK] 🐶 → 11:42:17.374 → (logging) accepted, won't be retransmitted: [response code: 202 (accepted), request ID: CCB6AE3A-3974-4810-A4E5-9C5694250C5B]
flutter: [DATADOG SDK] 🐶 → 11:42:41.202 💡 (RUM) No upload. Batch to upload: NO, System conditions: ✅
Our DataDog initialization use case is the following:
class InitializeDatadog extends CommandUseCase<void> {
static final _protocolRegex = RegExp('http(s)*:\\/\\/');
final DatadogConfig _datadogConfig;
final ProxyConfig _proxyConfig;
final List<String> _firstPartyHosts;
InitializeDatadog(
this._datadogConfig,
this._proxyConfig,
this._firstPartyHosts,
);
@override
Future<void> invoke() async {
if (!kReleaseMode) {
DatadogSdk.instance.sdkVerbosity = Verbosity.verbose;
}
final hostsWithoutProtocol = _firstPartyHosts.map((host) => host.replaceAll(_protocolRegex, '')).toList();
final datadogConfig = DdSdkConfiguration(
clientToken: _datadogConfig.clientToken,
env: _datadogConfig.environment,
serviceName: _datadogConfig.serviceName,
site: DatadogSite.us1,
trackingConsent: TrackingConsent.granted,
nativeCrashReportEnabled: true,
firstPartyHosts: hostsWithoutProtocol,
loggingConfiguration: LoggingConfiguration(
sendLogsToDatadog: true,
sendNetworkInfo: true,
),
rumConfiguration: RumConfiguration(applicationId: _datadogConfig.rumApplicationId),
);
// Only enable HTTP tracking when the proxy is disabled as doing so will override the HTTP overrides in place by our
// proxy.
if (!_proxyConfig.isProxyEnabled) {
datadogConfig.enableHttpTracking();
}
await DatadogSdk.instance.initialize(datadogConfig);
}
}
We're also using the DatadogNavigationObserver
within our MaterialApp
configuration and our InitializeDataDog
use case is invoked before the MaterialApp
widget is built.
return MaterialApp(
debugShowCheckedModeBanner: false,
localizationsDelegates: const [
S.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
],
theme: themeLight(context),
darkTheme: themeDark(context),
themeMode: themeMode,
supportedLocales: S.delegate.supportedLocales,
navigatorKey: widget._navigatorKey,
initialRoute: widget._isUserAuthenticated ? Routes.dashboard : Routes.onBoarding,
onGenerateInitialRoutes: (initialRoute) => _onGenerateInitialRoutes(initialRoute, isUserPinSet),
navigatorObservers: [
DatadogNavigationObserver(datadogSdk: DatadogSdk.instance),
],
routes: Routes.routeMap,
);
Describe what you expected:
I'm not expecting to avoid seeing a warning that tracing will not work.
Additional context
- Dart/Flutter version: Flutter 3.3.7
- Android/iOS OS version: iOS
- Device Model: iPhone 13 simulator
- Datadog SDK version: 1.1.1
- Versions of any other relevant dependencies:
datadog_tracking_http_client: ^1.1.0