Embucket provides comprehensive observability through OpenTelemetry integration, structured logging, and distributed tracing. This guide covers how to configure and use these features.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/embucket/embucket/llms.txt
Use this file to discover all available pages before exploring further.
OpenTelemetry Integration
Embucket uses OpenTelemetry for distributed tracing and telemetry export. All configuration is done via environment variables and CLI flags.Exporter Protocol
Choose between gRPC and HTTP protocols for telemetry export:crates/embucketd/src/cli.rs:122-127
The exporter automatically reads the
OTEL_EXPORTER_OTLP_ENDPOINT environment variable for the collector endpoint.Span Processor Configuration
Embucket supports two span processor modes:- Batch Span Processor (Default)
- Experimental Async Runtime
Standard batching processor for production use:Reference:
crates/embucketd/src/main.rs:234-238Resource Configuration
Embucket exports telemetry with the service name “Em”: Reference:crates/embucketd/src/main.rs:230
Tracing Configuration
Tracing Levels
Control the verbosity of tracing output:off- No tracinginfo- Informational messages (default)debug- Debug-level detailstrace- Verbose trace logging
crates/embucketd/src/cli.rs:130-136
The
TRACING_LEVEL sets the default for OpenTelemetry traces. It can be overridden by the RUST_LOG environment variable for console output.Trace Filtering
Embucket automatically disables tracing for noisy targets:h2- HTTP/2 library tracesaws_smithy_runtime- AWS SDK runtime traces
crates/embucketd/src/main.rs:57
Query Execution Tracing
Embucket instruments query execution with detailed spans:spawn_query_task- Top-level query executionspawn_query_sub_task- Query planning and executionquery_alloc- Memory allocation tracking per queryabort_cancelled_query- Query cancellationquery_timeout_received_do_abort- Timeout handling
crates/executor/src/service.rs:587-642
Session and Service Tracing
All major operations are instrumented:- Session creation and deletion
- Query submission and execution
- Catalog operations
- Metadata fetches
crates/executor/src/service.rs:182-707
Log Levels and Filtering
RUST_LOG Environment Variable
Override tracing levels for console output usingRUST_LOG:
crates/embucketd/src/main.rs:279-292
Structured JSON Logging
Embucket outputs logs in JSON format for easy parsing: Reference:crates/embucketd/src/main.rs:299-304
Example log entry:
Filtering Allocation Events
When allocation tracing is enabled, allocation events are filtered from standard logs: Reference:crates/embucketd/src/main.rs:295-297
Health Check Endpoint
Embucket exposes a simple health check endpoint:crates/embucketd/src/main.rs:180
Use this endpoint for:
- Load balancer health checks
- Kubernetes liveness/readiness probes
- Monitoring service availability
Metrics and Observability
Memory Allocation Tracing
Enable detailed memory allocation tracking (requiresalloc-tracing feature):
crates/embucketd/src/cli.rs:97-101
When enabled, memory allocations are logged to ./alloc.log with automatic flushing every second:
Reference: crates/embucketd/src/main.rs:256-264
Query-Level Spans
Each query execution creates a dedicated span with context:crates/executor/src/service.rs:589-594
This enables:
- Per-query memory tracking
- Query execution timeline visualization
- Correlation between queries and resource usage
Execution Status Recording
Embucket records detailed execution status for each query:- Query submission time
- Execution status (running, succeeded, failed, timeout, cancelled)
- Error codes and messages
- Query type and row counts
crates/executor/src/service.rs:645-667
Telemetry Export Configuration
Sending Telemetry Data
Embucket provides a no-op telemetry endpoint for client compatibility:crates/embucketd/src/main.rs:181
This endpoint exists for Snowflake client compatibility and always returns “OK” without processing data.
OpenTelemetry Collector
To send traces to a collector, configure the endpoint:Jaeger Example
Run Jaeger and configure Embucket:Grafana Tempo Example
Production Observability Setup
Configure Log Aggregation
Collect JSON logs with your preferred system (CloudWatch, Datadog, Elasticsearch, etc.)
Debugging with Traces
When troubleshooting issues:-
Enable debug tracing:
-
Look for key spans:
ExecutionService::submit- Query submissionExecutionService::wait- Result retrievalspawn_query_task- Query execution lifecyclefinished_query_status- Final execution status
-
Check span attributes:
query_id- Unique query identifiersession_id- Session contextquery_status- Execution outcomeerror_code- Snowflake-compatible error code
-
Analyze query lifecycle:
- Submission → Planning → Execution → Completion
- Identify bottlenecks in the trace timeline
- Correlate errors with specific query phases