Skip to main content
function Exporters.add
def Exporters.add(
*,
url: None | str = None,
file: None | str = None,
protocol: None | str = None,
format: None | str = None,
headers: dict[str, str] = ,
signals: list[str] = [],
resource_attributes: dict[str, str] = 
) -> None
Register an exporter. The runtime builds the corresponding sink after phase 3 and replays any buffered spans/logs into it. Exactly one of url (OTLP exporter) or file (local file/stderr/stdout exporter) must be provided. Args (OTLP shape): url: OTLP collector URL protocol: “grpc” (default) or “http/protobuf” headers: optional dict[str,str] for auth/tenant routing Args (file shape): file: filesystem path, or “stderr” / “stdout” format: “compact” (default, one human-readable line per record) or “jsonl” (one JSON object per line, machine-parseable) Common args: signals: optional list, subset of [“traces”, “logs”, “metrics”]; default is all three resource_attributes: optional dict[str,str] merged into the exporter’s Resource