Documentation Index
Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
veryfront/observability
OpenTelemetry tracing, metrics collection, auto-instrumentation for fetch/HTTP/React, OTLP export, and structured error and log buffering.
Import
import {
addSpanEvent,
createChildSpan,
createFileLogSubscriber,
createOpenTelemetryServiceTracer,
endSpan,
extractContext,
} from "veryfront/observability";
Examples
import { withSpan } from "veryfront/observability";
const result = await withSpan("load-data", async () => {
return await fetch("https://example.com/data");
});
Exports
Components
| Name | Description | Source |
|---|
SpanNames | Render span names. | source |
Functions
| Name | Description | Source |
|---|
addSpanEvent | Event emitted for add span. | source |
createChildSpan | Create child span. | source |
createFileLogSubscriber | Create file log subscriber. | source |
createOpenTelemetryServiceTracer | Create open telemetry service tracer. | source |
endSpan | End an active tracing span. | source |
extractContext | Context for extract. | source |
getActiveContext | Context for get active. | source |
getErrorCollector | Return error collector. | source |
getLogBuffer | Return log buffer. | source |
getMetricsState | State for get metrics. | source |
initAutoInstrumentation | Initialize automatic instrumentation wrappers. | source |
initializeOTLP | Initialize OTLP tracing export. | source |
initMetrics | Initialize metrics collection. | source |
initTracing | Initialize tracing for the current runtime. | source |
injectContext | Context for inject. | source |
instrument | Instrument an async operation. | source |
instrumentBatch | Instrument a batch operation. | source |
instrumentErrorHandler | Handler for instrument error. | source |
instrumentFetch | Create a fetch implementation instrumented with observability spans. | source |
instrumentHttpHandler | Handler for instrument HTTP. | source |
instrumentReactRender | Instrument a React render operation. | source |
instrumentSync | Instrument a synchronous operation. | source |
interceptConsole | Capture console output in the log buffer. | source |
isAutoInstrumentEnabled | Check whether auto instrumentation is enabled. | source |
isMetricsEnabled | Check whether metrics collection is enabled. | source |
isOTLPEnabled | Check whether OTLP export is enabled. | source |
isTracingEnabled | Check whether tracing is enabled. | source |
parseCompileError | Error shape for parse compile. | source |
parseMaxSize | Parses max size. | source |
recordBuild | Record build. | source |
recordBundle | Record bundle. | source |
recordCacheGet | Record cache get. | source |
recordCacheInvalidate | Record cache invalidate. | source |
recordCacheSet | Record cache set. | source |
recordCorsRejection | Record CORS rejection. | source |
recordDataFetch | Record data fetch. | source |
recordDataFetchError | Error shape for record data fetch. | source |
recordHttpRequest | Request payload for record HTTP. | source |
recordHttpRequestComplete | Record HTTP request complete. | source |
recordRender | Record render. | source |
recordRenderError | Error shape for record render. | source |
recordRSCError | Error shape for record rscerror. | source |
recordRSCRender | Record RSC render. | source |
recordRSCRequest | Request payload for record rscrequest. | source |
recordRSCStream | Record RSC stream. | source |
recordSecurityHeaders | Record security headers. | source |
resetErrorCollector | Reset captured runtime errors. | source |
resetLogBuffer | Reset the in-memory log buffer. | source |
setCacheSize | Sets cache size. | source |
setSpanAttributes | Sets span attributes. | source |
shutdownMetrics | Shut down metrics collection. | source |
shutdownOTLP | Shut down OTLP tracing export. | source |
shutdownTracing | Shut down the tracing runtime. | source |
startSpan | Starts span. | source |
withActiveSpan | Applies active span. | source |
withSpan | Applies span. | source |
withSpanSync | Applies span sync. | source |
Classes
| Name | Description | Source |
|---|
ErrorCollector | Implement error collector. | source |
FileLogSubscriber | Implement file log subscriber. | source |
LogBuffer | Implement log buffer. | source |
Types
| Name | Description | Source |
|---|
AutoInstrumentConfig | Configuration used by auto instrument. | source |
CreateOpenTelemetryServiceTracerOptions | Options accepted by create open telemetry service tracer. | source |
DevError | Error shape for dev. | source |
ErrorFilter | Public API contract for error filter. | source |
ErrorSubscriber | Public API contract for error subscriber. | source |
ErrorType | Public API contract for error type. | source |
FileLogConfig | Configuration used by file log. | source |
LogBufferFilter | Filter options for reading buffered log entries. | source |
LogEntry | Entry shape for log. | source |
LogLevel | Public API contract for log level. | source |
LogSubscriber | Public API contract for log subscriber. | source |
MetricsConfig | Configuration used by metrics. | source |
OpenTelemetryContextApi | Public API contract for open telemetry context API. | source |
OpenTelemetryServiceTracer | Public API contract for open telemetry service tracer. | source |
OpenTelemetrySpan | Public API contract for open telemetry span. | source |
OpenTelemetrySpanContext | Context for open telemetry span. | source |
OpenTelemetryTraceApi | Public API contract for open telemetry trace API. | source |
OpenTelemetryTracer | Public API contract for open telemetry tracer. | source |
OTLPConfig | Configuration used by otlpconfig. | source |
ServiceTracer | Public API contract for service tracer. | source |
ServiceTracerAttributeInput | Input payload for service tracer attribute. | source |
ServiceTracerAttributes | Public API contract for service tracer attributes. | source |
ServiceTracerAttributeValue | Public API contract for service tracer attribute value. | source |
ServiceTracerSpan | Public API contract for service tracer span. | source |
ServiceTracerSpanContext | Context for service tracer span. | source |
ServiceTracerStartSpanOptions | Options accepted by service tracer start span. | source |
SpanOptions | Options accepted by span. | source |
TracingConfig | Configuration used by tracing. | source |
Deep imports
These import paths group focused functionality under this module. Each is a separate barrel; import only what you need.
veryfront/observability/otlp-setup
*********************** OpenTelemetry OTLP Setup Thin wrapper that delegates to the ext-observability-opentelemetry extension via the TracingExporter contract. When the extension is not installed, all span operations silently no-op. Reads configuration from environment variables: - OTEL_TRACES_ENABLED: “true” to enable tracing - OTEL_SERVICE_NAME: Service name for traces - OTEL_EXPORTER_OTLP_ENDPOINT: OTLP endpoint - OTEL_EXPORTER_OTLP_HEADERS: Auth headers ************************
import { endServerSpan, extractContext, getTraceContext } from "veryfront/observability/otlp-setup";
Functions
| Name | Description | Source |
|---|
endServerSpan | End an active server tracing span. | source |
extractContext | Context for extract. | source |
getTraceContext | Context for get trace. | source |
initializeOTLP | Initialize OTLP tracing export. | source |
initializeOTLPWithApis | Initialize OTLP tracing with explicit API adapters. | source |
injectContext | Context for inject. | source |
isOTLPEnabled | Check whether OTLP export is enabled. | source |
setActiveSpanAttributes | Sets active span attributes. | source |
setSpanAttributes | Sets span attributes. | source |
shutdownOTLP | Shut down OTLP tracing export. | source |
startServerSpan | Starts server span. | source |
withContext | Context for with. | source |
withSpan | Applies span. | source |
withSpanSync | Applies span sync. | source |
Types
| Name | Description | Source |
|---|
OTLPConfig | Configuration used by otlpconfig. | source |
Architecture: