@dash0/sdk-web
Version:
Dash0's Web SDK to collect telemetry from end-users' web browsers
14 lines (13 loc) • 650 B
TypeScript
import { AttrPrefix } from "../utils/otel";
import { URL_DOMAIN, URL_FRAGMENT, URL_FULL, URL_PATH, URL_QUERY, URL_SCHEME } from "../semantic-conventions";
import { KeyValue } from "../types/otlp";
export type UrlAttributeRecord = {
[URL_FULL]: string;
[URL_PATH]?: string | undefined;
[URL_DOMAIN]?: string | undefined;
[URL_SCHEME]?: string | undefined;
[URL_FRAGMENT]?: string | undefined;
[URL_QUERY]?: string | undefined;
};
export type UrlAttributeScrubber = (attr: UrlAttributeRecord) => UrlAttributeRecord;
export declare function addUrlAttributes(attributes: KeyValue[], url: string | URL, prefix?: AttrPrefix): void;