UNPKG

@dash0/sdk-web

Version:

Dash0's Web SDK to collect telemetry from end-users' web browsers

17 lines (16 loc) 613 B
import { addAttribute, removeAttribute } from "../utils/otel"; import { vars } from "../vars"; /** * Adds a signal attribute to be transmitted with every signal. * Note: if you need to ensure attributes are included with signals transmitted on initial page load, you should use * the "additionalSignalAttributes" property of the init call instead */ export function addSignalAttribute(name, value) { addAttribute(vars.signalAttributes, name, value); } /** * Removes a previously added signal attribute */ export function removeSignalAttribute(name) { removeAttribute(vars.signalAttributes, name); }