-
Notifications
You must be signed in to change notification settings - Fork 80
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
chore(weave): DD Logging to Batched Server #3794
base: master
Are you sure you want to change the base?
Conversation
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=751b111d914f1404acd57963401c8109c06e261a |
WalkthroughThe changes add tracing capabilities to the Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Tracer as ddtrace.tracer.wrap
participant CHServer as ClickHouseTraceServer
Client->>Tracer: Invoke method (e.g., _query)
Tracer->>CHServer: Call original method with added tracing
CHServer-->>Tracer: Return result
Tracer-->>Client: Return result enriched with trace data
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (830)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
weave/trace_server/clickhouse_trace_server_batched.py
(15 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**/*.py`: Focus on pythonic code patterns. Check for proper...
**/*.py
: Focus on pythonic code patterns.
Check for proper exception handling.
Verify type hints usage where applicable.
Look for potential performance improvements.
Don't comment on formatting if black/isort is configured.
Check for proper dependency injection patterns.
Verify proper async handling if applicable.
weave/trace_server/clickhouse_trace_server_batched.py
🔇 Additional comments (2)
weave/trace_server/clickhouse_trace_server_batched.py (2)
38-38
: Import addition looks good.The ddtrace library is correctly imported to enable the tracing functionality being added throughout the file.
392-392
: Tracing implementation looks good.The added decorators follow a consistent pattern, applying
@ddtrace.tracer.wrap
to each method with a name that clearly identifies the method being traced. This will provide valuable performance monitoring data without changing the underlying functionality.Also applies to: 427-427, 885-885, 979-979, 1009-1011, 1261-1261, 1294-1294, 1792-1792, 1826-1826, 1848-1848, 1875-1875, 1885-1885, 1896-1896
New and updated dependencies detected. Learn more about Socket for GitHub ↗︎
Have feedback? Participate in our User Experience Survey 📊 |
Report is too large to display inline. Next stepsMark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@@ -388,6 +389,7 @@ def row_to_call_schema_dict(row: tuple[Any, ...]) -> dict[str, Any]: | |||
for call in call_dicts: | |||
yield tsi.CallSchema.model_validate(call) | |||
|
|||
@ddtrace.tracer.wrap(name="clickhouse_trace_server_batched._add_feedback_to_calls") |
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 lines are only needed on methods which are NOT in the standard interface
pyproject.toml
Outdated
@@ -53,6 +53,7 @@ dependencies = [ | |||
# this to a separate package. Note, when that happens, we will need to pull along some of the | |||
#default dependencies as well. | |||
trace_server = [ | |||
"ddtrace>=2.7.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.
ideally these deps are hard pinned (^
) since they are for the server
Summary by CodeRabbit
ddtrace
package with an exact version of 2.7.0.