-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
feat: Improve pattern ingester tracing #14707
Conversation
This PR must be merged before a backport PR will be created. |
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.
LGTM. I added a couple of small suggestions but I don't think the impact is large so I'm happy to approve to unblock.
pkg/pattern/aggregation/push.go
Outdated
@@ -202,6 +213,13 @@ func (p *Push) buildPayload() ([]byte, error) { | |||
|
|||
payload = snappy.Encode(nil, payload) | |||
|
|||
sp.LogKV( | |||
"event", "build aggregated metrics payload", | |||
"services", strings.Join(services, ","), |
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.
Should the "services" be limited somehow? I'm not expecting a lot but just in case there is a large number of services we're trying to attach to a span.
pkg/pattern/tee_service.go
Outdated
|
||
sp.LogKV( | ||
"event", "forwarded push request to pattern ingester", | ||
"labels", strings.Join(labels, ", "), |
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.
Same here, it shouldn't be big but it might be worth checking the length of this just in case?
a7e2ff7
to
7cd3f32
Compare
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-14707-to-k226 origin/k226
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 80aec2548203957dbb834ba69e6d734d9054416d When the conflicts are resolved, stage and commit the changes:
If you have the GitHub CLI installed: # Push the branch to GitHub:
git push --set-upstream origin backport-14707-to-k226
# Create the PR body template
PR_BODY=$(gh pr view 14707 --json body --template 'Backport 80aec2548203957dbb834ba69e6d734d9054416d from #14707{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title 'feat: Improve pattern ingester tracing (backport k226)' --body-file - --label 'size/L' --label 'product-approved' --label 'backport' --base k226 --milestone k226 --web Or, if you don't have the GitHub CLI installed (we recommend you install it!): # Push the branch to GitHub:
git push --set-upstream origin backport-14707-to-k226
# Create a pull request where the `base` branch is `k226` and the `compare`/`head` branch is `backport-14707-to-k226`.
# Remove the local backport branch
git switch main
git branch -D backport-14707-to-k226 |
(cherry picked from commit 80aec25)
(cherry picked from commit 80aec25)
What this PR does / why we need it:
We had to turn off aggregated metrics in a prod cluster because the
service_name
label being used for__aggregated_metric__
had crazy cardinality, it was some huge JSON blob. This PR adds some more tracing and log signals to the aggregated metrics path through the pattern ingester so we can debug what's going on.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Checklist
CONTRIBUTING.md
guide (required)feat
PRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.md
deprecated-config.yaml
anddeleted-config.yaml
files respectively in thetools/deprecated-config-checker
directory. Example PR