Overview
Theeffect/unstable/observability modules provide lightweight observability integrations for:
- OTLP (OpenTelemetry Protocol) tracing and logging
- Prometheus metrics
- Custom metric exporters
- Telemetry resource configuration
OTLP setup
Configure OTLP tracing and logging:Configuring the OTLP exporter
Tracing
Effect automatically generates spans when usingEffect.fn:
Logging with OTLP
Logs are automatically exported when usingOtlpLogger:
Prometheus metrics
Expose Prometheus metrics endpoint:Custom metrics
Resource attributes
Configure resource attributes for telemetry:Log level filtering
Configure log levels for production:Batch configuration
Configure batching for better performance:Complete example
Using with @effect/opentelemetry
For more advanced OpenTelemetry features, use@effect/opentelemetry:
See also
- HTTP Server - Add observability to HTTP servers