setConfig method
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);
}