-
Notifications
You must be signed in to change notification settings - Fork 456
feat(duckdb): adding duckdb integration #14232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
riotfile.py
Outdated
command="pytest {cmdargs} tests/contrib/duckdb", | ||
venvs=[ | ||
Venv( | ||
pys=select_pys(min_version="3.9", max_version="3.11"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason not to test against 3.12 and 3.13?
else: | ||
tags[db.NAME] = database_path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is redundant with line 65
|
||
span = spans[0] | ||
assert_is_measured(span) | ||
assert span.service == "duckdb" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple assertions on span attributes make this a good candidate to be converted to a snapshot test
pin._clone(tracer=self.tracer).onto(conn) | ||
return conn, self.tracer | ||
|
||
def test_large_table_creation_performance(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests would be a good fit for the benchmarking platform, which provides stronger guarantees on resource usage. This directory contains examples of how to set up performance benchmarks that run in CI.
3717269
to
9dad1f0
Compare
- Add test snapshots for simple query, table operations, and error handling - Snapshots use ddtrace_subprocess_dir as base service name for Docker compatibility - Error handling test ignores error.stack field due to Python version differences
…e complex operations.
9dad1f0
to
6f2cf9e
Compare
bb8c5dd
to
ecb7e8b
Compare
- Remove duplicate imports in patch.py (config, schematize_service_name) - Fix redundant database_path assignment - Clean up import structure following project standards Test Architecture Enhancements: - Convert comprehensive tests with multiple span assertions to snapshot tests - Add new snapshot tests: parameterized_queries, fetch_methods, service_name_override - Simplify comprehensive tests to focus on functional validation - Fix XFAIL issue by correcting snapshot test trace count expectations - Remove performance tests from regular test suite Benchmark Platform Integration: - Create complete benchmark scenario in benchmarks/duckdb/
--- | ||
features: | ||
- | | ||
Add DuckDB integration support with comprehensive tracing capabilities including query execution monitoring, performance metrics, and error handling for DuckDB ≥ 0.8.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0.8.0 doesn't match with the supported versions in patch.py
Title: Add Integration for DuckDB
Overview
This PR adds a new integration for DuckDB, providing tracing for database operations including queries, table operations, and bulk inserts.
Motivation
This was mostly an onboarding exercise for @cweichen-dd to get familiarity with the tracing codebase. DuckDB was chosen in conversation with @tabgok, as DuckDB is gaining adoption in data analytics and ML workloads.
Files Changed
Risks
Checklist
Reviewer Checklist