DatadogAttachConfiguration constructor
DatadogAttachConfiguration({})
Implementation
DatadogAttachConfiguration({
this.detectLongTasks = true,
this.longTaskThreshold = 0.1,
this.traceSampleRate = 20.0,
this.reportFlutterPerformance = false,
List<String>? firstPartyHosts,
this.firstPartyHostsWithTracingHeaders = const {},
}) {
// Attempt a union if both configuration options are present
if (firstPartyHosts != null) {
// make map mutable
firstPartyHostsWithTracingHeaders =
Map<String, Set<TracingHeaderType>>.from(
firstPartyHostsWithTracingHeaders);
for (var entry in firstPartyHosts) {
final headerTypes = firstPartyHostsWithTracingHeaders[entry];
if (headerTypes == null) {
firstPartyHostsWithTracingHeaders[entry] = {
TracingHeaderType.datadog,
TracingHeaderType.tracecontext
};
} else {
headerTypes.add(TracingHeaderType.datadog);
headerTypes.add(TracingHeaderType.tracecontext);
}
}
}
}