@lesto/observability
v0.2.0
Published
Lesto's in-house distributed-tracing core — OpenTelemetry-shaped, with no OpenTelemetry dependency.
Downloads
125
Readme
@lesto/observability
Lesto's in-house distributed-tracing core — OpenTelemetry-shaped, with no OpenTelemetry dependency.
Part of Lesto, the batteries-included, agent-native fullstack framework.
bun add @lesto/observabilityimport { Tracer, InMemoryExporter } from "@lesto/observability";
const tracer = new Tracer({ exporter: new InMemoryExporter() });
const root = tracer.startSpan("handle_request");
const child = tracer.startSpan("query_db", { parent: root });
child.setAttribute("rows", 12).setStatus("ok").end();
root.end();
await tracer.withSpan("charge_card", async (span) => {
span.setAttribute("amount_cents", 4200);
return charge();
});OpenTelemetry-shaped, with no OpenTelemetry dependency. Swap InMemoryExporter for
OtlpHttpExporter and flush() ships spans to a real collector over OTLP/HTTP. v1
is traces only — no metrics or logs pipeline (deliberate scope, not a gap).
