Sample Configuration
Configuration
Whether OpenTelemetry tracing export is enabled. Defaults to
false. Can also be set via OTEL_ENABLED environment variable.Service name reported in traces and metrics. Defaults to
"iii". Can also be set via OTEL_SERVICE_NAME.Service version reported in traces (
service.version OTEL attribute). Can also be set via SERVICE_VERSION.Trace exporter type. Options:
memory— store traces in memory, queryable viaengine::traces::listotlp— export to an OTLP collector via gRPCboth— export via OTLP and keep in memory (enables log triggers alongside OTLP export)
otlp. Can also be set via OTEL_EXPORTER_TYPE.OTLP collector endpoint. Used when
exporter is otlp or both. Defaults to "http://localhost:4317". Can also be set via OTEL_EXPORTER_OTLP_ENDPOINT.Global trace sampling ratio from
0.0 (sample nothing) to 1.0 (sample everything). Defaults to 1.0. Can also be set via OTEL_TRACES_SAMPLER_ARG.Maximum number of spans to keep in memory when using
memory or both exporter. Defaults to 1000. Can also be set via OTEL_MEMORY_MAX_SPANS.Whether metrics collection is enabled. Defaults to
false. Can also be set via OTEL_METRICS_ENABLED.Metrics exporter type:
memory (queryable via API) or otlp. Defaults to memory. Can also be set via OTEL_METRICS_EXPORTER.How long to retain metrics in memory in seconds. Defaults to
3600 (1 hour). Can also be set via OTEL_METRICS_RETENTION_SECONDS.Maximum number of metric data points to keep in memory. Defaults to
10000. Can also be set via OTEL_METRICS_MAX_COUNT.Whether structured log storage is enabled. When not set, log storage is always initialized by the module.
Logs exporter type:
memory, otlp, or both. Defaults to memory. Can also be set via OTEL_LOGS_EXPORTER.Minimum log level for the engine itself. Options:
trace, debug, info, warn, error. Defaults to info.Functions
Logging
Logs API
Query stored log entries.
Parameters
Parameters
Traces API
List stored trace spans.
Parameters
Parameters
Metrics API
List collected metrics with aggregated statistics.
Parameters
Parameters
Returns
Returns
Built-in engine counters:
invocations (total, success, error, deferred, by_function), workers (spawns, deaths, active), and performance (avg_duration_ms, p50_duration_ms, p95_duration_ms, p99_duration_ms, min_duration_ms, max_duration_ms).Time-bucketed aggregations, present only when
aggregate_interval is provided alongside a time range.List metric rollup aggregations (1-minute, 5-minute, 1-hour windows).
Parameters
Parameters
Returns
Returns
Baggage API
Sampling API
Health API
Alerts API
Trigger Type
This module adds a new Trigger Type:log.
Register a function to react to log entries as they are produced.