setConfig method
配置 trace
sampleRate
采样率
traceType
链路类型
enableLinkRUMData
是否与 RUM 数据关联
enableNativeAutoTrace
是否开启原生网络网络自动追踪 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;
internalConfig.traceHeader = enableAutoTrace;
await channel.invokeMethod(methodTraceConfig, map);
}