Skip to main content

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

NameDescriptionSource
SpanNamesRender span names.source

Functions

NameDescriptionSource
addSpanEventEvent emitted for add span.source
createChildSpanCreate child span.source
createFileLogSubscriberCreate file log subscriber.source
createOpenTelemetryServiceTracerCreate open telemetry service tracer.source
endSpanEnd an active tracing span.source
extractContextContext for extract.source
getActiveContextContext for get active.source
getErrorCollectorReturn error collector.source
getLogBufferReturn log buffer.source
getMetricsStateState for get metrics.source
initAutoInstrumentationInitialize automatic instrumentation wrappers.source
initializeOTLPInitialize OTLP tracing export.source
initMetricsInitialize metrics collection.source
initTracingInitialize tracing for the current runtime.source
injectContextContext for inject.source
instrumentInstrument an async operation.source
instrumentBatchInstrument a batch operation.source
instrumentErrorHandlerHandler for instrument error.source
instrumentFetchCreate a fetch implementation instrumented with observability spans.source
instrumentHttpHandlerHandler for instrument HTTP.source
instrumentReactRenderInstrument a React render operation.source
instrumentSyncInstrument a synchronous operation.source
interceptConsoleCapture console output in the log buffer.source
isAutoInstrumentEnabledCheck whether auto instrumentation is enabled.source
isMetricsEnabledCheck whether metrics collection is enabled.source
isOTLPEnabledCheck whether OTLP export is enabled.source
isTracingEnabledCheck whether tracing is enabled.source
parseCompileErrorError shape for parse compile.source
parseMaxSizeParses max size.source
recordBuildRecord build.source
recordBundleRecord bundle.source
recordCacheGetRecord cache get.source
recordCacheInvalidateRecord cache invalidate.source
recordCacheSetRecord cache set.source
recordCorsRejectionRecord CORS rejection.source
recordDataFetchRecord data fetch.source
recordDataFetchErrorError shape for record data fetch.source
recordHttpRequestRequest payload for record HTTP.source
recordHttpRequestCompleteRecord HTTP request complete.source
recordRenderRecord render.source
recordRenderErrorError shape for record render.source
recordRSCErrorError shape for record rscerror.source
recordRSCRenderRecord RSC render.source
recordRSCRequestRequest payload for record rscrequest.source
recordRSCStreamRecord RSC stream.source
recordSecurityHeadersRecord security headers.source
resetErrorCollectorReset captured runtime errors.source
resetLogBufferReset the in-memory log buffer.source
setCacheSizeSets cache size.source
setSpanAttributesSets span attributes.source
shutdownMetricsShut down metrics collection.source
shutdownOTLPShut down OTLP tracing export.source
shutdownTracingShut down the tracing runtime.source
startSpanStarts span.source
withActiveSpanApplies active span.source
withSpanApplies span.source
withSpanSyncApplies span sync.source

Classes

NameDescriptionSource
ErrorCollectorImplement error collector.source
FileLogSubscriberImplement file log subscriber.source
LogBufferImplement log buffer.source

Types

NameDescriptionSource
AutoInstrumentConfigConfiguration used by auto instrument.source
CreateOpenTelemetryServiceTracerOptionsOptions accepted by create open telemetry service tracer.source
DevErrorError shape for dev.source
ErrorFilterPublic API contract for error filter.source
ErrorSubscriberPublic API contract for error subscriber.source
ErrorTypePublic API contract for error type.source
FileLogConfigConfiguration used by file log.source
LogBufferFilterFilter options for reading buffered log entries.source
LogEntryEntry shape for log.source
LogLevelPublic API contract for log level.source
LogSubscriberPublic API contract for log subscriber.source
MetricsConfigConfiguration used by metrics.source
OpenTelemetryContextApiPublic API contract for open telemetry context API.source
OpenTelemetryServiceTracerPublic API contract for open telemetry service tracer.source
OpenTelemetrySpanPublic API contract for open telemetry span.source
OpenTelemetrySpanContextContext for open telemetry span.source
OpenTelemetryTraceApiPublic API contract for open telemetry trace API.source
OpenTelemetryTracerPublic API contract for open telemetry tracer.source
OTLPConfigConfiguration used by otlpconfig.source
ServiceTracerPublic API contract for service tracer.source
ServiceTracerAttributeInputInput payload for service tracer attribute.source
ServiceTracerAttributesPublic API contract for service tracer attributes.source
ServiceTracerAttributeValuePublic API contract for service tracer attribute value.source
ServiceTracerSpanPublic API contract for service tracer span.source
ServiceTracerSpanContextContext for service tracer span.source
ServiceTracerStartSpanOptionsOptions accepted by service tracer start span.source
SpanOptionsOptions accepted by span.source
TracingConfigConfiguration 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

NameDescriptionSource
endServerSpanEnd an active server tracing span.source
extractContextContext for extract.source
getTraceContextContext for get trace.source
initializeOTLPInitialize OTLP tracing export.source
initializeOTLPWithApisInitialize OTLP tracing with explicit API adapters.source
injectContextContext for inject.source
isOTLPEnabledCheck whether OTLP export is enabled.source
setActiveSpanAttributesSets active span attributes.source
setSpanAttributesSets span attributes.source
shutdownOTLPShut down OTLP tracing export.source
startServerSpanStarts server span.source
withContextContext for with.source
withSpanApplies span.source
withSpanSyncApplies span sync.source

Types

NameDescriptionSource
OTLPConfigConfiguration used by otlpconfig.source
Architecture: