Newapp-sdk
@revenexx/app-sdk@0.4.0
Minor Changes
80cbf31: Add opt-in OpenTelemetry tracing for App functions.
- New
@revenexx/app-sdk/instrumentpreload: start it viaNODE_OPTIONS=--require @revenexx/app-sdk/instrument. Lean (undici/fetch only, OTLP/proto), fullyOTEL_*-env driven, and a no-op when no OTLP endpoint is set. - The router (
createApp) now wraps each invocation in a SERVER span with W3C trace-context extraction, so a forwardedtraceparentcontinues the caller's trace and outbound PostgREST fetches show up as child CLIENT spans.
Set
OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_EXPORTER_OTLP_HEADERS,OTEL_SERVICE_NAMEandOTEL_RESOURCE_ATTRIBUTESas function variables to enable it; leave them unset for zero overhead.- New