createHeaders static method

Future<Map<String, String>> createHeaders({
  1. String? method,
  2. required String resourceName,
  3. String? url,
})

Generates headers to inject in DatadogTracingHttpClient.

Implementation

static Future<Map<String, String>> createHeaders({
  String? method,
  required String resourceName,
  String? url,
}) async {
  final result = await channel.invokeMapMethod<String, String>(
    'tracingCreateHeadersForRequest',
    {
      if (method != null) 'method': method,
      'resourceName': resourceName,
      if (url != null) 'url': url,
    },
  );
  return result ?? <String, String>{};
}