@opentelemetry/instrumentation-xml-http-request
Version:
OpenTelemetry instrumentation for XMLHttpRequest http client in web browsers
14 lines • 660 B
TypeScript
import { URLLike } from '@opentelemetry/sdk-trace-web';
/**
* Helper function to determine payload content length for XHR requests
* @param body
* @returns content length
*/
export declare function getXHRBodyLength(body: Document | XMLHttpRequestBodyInit): number | undefined;
/**
* Normalize an HTTP request method string per `http.request.method` spec
* https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md#http-client-span
*/
export declare function normalizeHttpRequestMethod(method: string): string;
export declare function serverPortFromUrl(url: URLLike): number | undefined;
//# sourceMappingURL=utils.d.ts.map