Ibis Server Traced Metrics
March 6, 2025 ยท View on GitHub
The ibis-server codebase uses OpenTelemetry for tracing. The following spans are traced across different components:
Rewriter Module
transpile- Internal span for SQL transpilation operationsrewrite- Internal span for SQL rewriting operationsextract_manifest- Internal span for manifest extraction from SQLexternal_rewrite- Client span for external engine rewriting operationsembedded_rewrite- Internal span for embedded engine rewriting operations
Substitute Module
substitute- Internal span for model substitution operations
Connector Module
connector_init- Internal span for connector initializationconnector_query- Client span for executing queriesconnector_dry_run- Client span for dry-running queriesdescribe_sql_for_error_message- Client span for generating SQL error messagesget_schema- Client span for retrieving schema informationduckdb_query- Internal span for DuckDB queriesduckdb_dry_run- Internal span for DuckDB dry runs
API Endpoints (v2)
v2_query_{data_source}- Server span for query operationsv2_query_{data_source}_dry_run- Server span for dry run query operationsv2_validate_{data_source}- Server span for validation operationsv2_metadata_tables_{data_source}- Server span for metadata table listingv2_metadata_constraints_{data_source}- Server span for metadata constraint listingdry_plan- Server span for dry planning operationsv2_dry_plan_{data_source}- Server span for data source specific dry planningv2_model_substitute_{data_source}- Server span for model substitution operations
API Endpoints (v3)
v3_query_{data_source}- Server span for query operationsv3_query_{data_source}_dry_run- Server span for dry run query operationsv3_dry_plan_{data_source}- Server span for data source specific dry planningv3_validate_{data_source}- Server span for validation operationsv3_functions_{data_source}- Server span for function listingv3_model-substitute_{data_source}- Server span for model substitution operations
Utility Functions
base64_to_dict- Internal span for base64 to dictionary conversionto_json- Internal span for DataFrame to JSON conversion
Trace Context
- Each endpoint accepts request headers and properly propagates trace context using the
build_contextfunction.