fix: Remove noisy context tag from http_request_duration metric log#3645
Merged
Conversation
Signed-off-by: Edgar Ramírez Mondragón <edgarrm358@gmail.com>
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR stops adding the Sequence diagram for updated HTTP request duration metric loggingsequenceDiagram
participant RESTStream
participant RequestsSession as requests_Session
participant Metrics as metrics
RESTStream->>RequestsSession: send(prepared_request)
RequestsSession-->>RESTStream: Response
RESTStream->>RESTStream: _write_request_duration_log(endpoint, response, extra_tags)
RESTStream->>Metrics: Point("timer", tags=extra_tags)
Metrics-->>RESTStream: point_recorded()
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- If
contextandextra_tagsare intended to be unused going forward, consider adding a deprecation path (e.g., warnings when non-None values are passed and a note in the docstring) rather than just a TODO and# noqa: ARG002, so callers have a clear migration signal before the parameters are actually removed.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- If `context` and `extra_tags` are intended to be unused going forward, consider adding a deprecation path (e.g., warnings when non-None values are passed and a note in the docstring) rather than just a TODO and `# noqa: ARG002`, so callers have a clear migration signal before the parameters are actually removed.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3645 +/- ##
==========================================
- Coverage 93.81% 93.81% -0.01%
==========================================
Files 73 73
Lines 5948 5946 -2
Branches 729 728 -1
==========================================
- Hits 5580 5578 -2
Misses 273 273
Partials 95 95
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Remove the noisy context tag from HTTP request duration metrics and update related logging behavior and tests.
Bug Fixes:
Enhancements:
Tests: