OpenTelemetry Trace Collector (lib/trace.ts)

NemoClaw · analytics, tracing, telemetry, observability, span, logging

Collects, sanitizes, and writes OpenTelemetry trace data, providing span creation and event logging utilities.

// Source: https://github.com/mperkins0155/NemoClaw | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

import crypto from "node:crypto";
import fs from "node:fs";
import os from "node:os";
import path from "node:path";
import { redactForLog, redactFull, redactUrl } from "./security/redact";

type TraceStatusCode = "OK" | "ERROR" | "UNSET";
type TraceAttribute = string | number | boolean | null | string[] | number[] | boolean[];
type TraceAttributes = Record<string, TraceAttribute>;

export interface TraceEvent {
  name: string;
  time_unix_nano: 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key