setConfig method

Future<void> setConfig({
  1. double? sampleRate,
  2. TraceType? traceType,
  3. bool? enableLinkRUMData,
  4. bool? enableNativeAutoTrace,
  5. bool enableAutoTrace = false,
})

Configure trace sampleRate Sampling rate traceType Trace type enableLinkRUMData Whether to link with RUM data enableNativeAutoTrace Whether to enable native network automatic tracing iOS NSURLSession, Android OKhttp

Implementation

Future<void> setConfig(
    {double? sampleRate,
    TraceType? traceType,
    bool? enableLinkRUMData,
    bool? enableNativeAutoTrace,
    bool enableAutoTrace = false}) async {
  var map = Map<String, dynamic>();
  map["sampleRate"] = sampleRate;
  map["traceType"] = traceType?.index;
  map["enableLinkRUMData"] = enableLinkRUMData;
  map["enableNativeAutoTrace"] = enableNativeAutoTrace;
  FTHttpOverrideConfig.global.traceHeader = enableAutoTrace;
  await channel.invokeMethod(methodTraceConfig, map);
}