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; /** * Applies the url attribute scrubber to a url that is reported as plain text, e.g. inside a log body or a status * message, rather than as url attributes. Only the scrubbed `url.full` value is used. */ export declare function scrubUrl(url: string): string; /** * Error messages and stack traces of inline scripts contain the page url, which can hold sensitive query parameters. * Only urls equal to a page url or the given request url are replaced, so unrelated script urls stay untouched. * Urls that match ignoreUrls are redacted entirely. */ export declare function scrubPageUrls(text: string, requestUrl?: string): string;