slack-19.0: fix structured logging#532
Merged
timvaillancourt merged 11 commits intoslack-19.0from Oct 17, 2024
Merged
Conversation
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Author
|
Confirmed this on tablets ✅: tvaillancourt@tablet-iad-staging-vtfun-00-80-5m9z:/var/log/vttablet$ tail vttablet.log|tail -1 |jq .
{
"level": "warn",
"ts": "2024-10-16T08:24:27-07:00",
"caller": "discovery/healthcheck.go:557",
"msg": "not marking healthy primary us_east_1e-0170333722 as Up for loadtest/80- because its PrimaryTermStartTime is smaller than the highest known timestamp from previous PRIMARYs us_east_1b-0170353516: 1728945320 < 1728945636 "
} |
tanjinx
approved these changes
Oct 17, 2024
tanjinx
pushed a commit
that referenced
this pull request
Feb 3, 2026
* `slack-19.0`: fix structured logging Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * remove debug println Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * test cleanup Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * update flags and e2e tests Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * fix e2e flag test Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * code cleanup Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * simplify Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * fix goimports Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * log_dir WIP Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> --------- Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
5 tasks
tanjinx
added a commit
that referenced
this pull request
Feb 4, 2026
* `slack-19.0`: add structured logging (#449) * Install zap log and noglog Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Implement the Vitess Structure Logger VTSLoger Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Move the structure logging code to logger.go file * make PR suggestions from vitessio#13061 Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Fix bad merge conflict Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Fix bad merge conflict again Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * fix test Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * add flags e2e test for vtgateclienttest Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * update error msg Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> --------- Signed-off-by: Emad Habib <ehabib@slack-corp.com> Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Co-authored-by: Emad Habib <ehabib@slack-corp.com> Co-authored-by: Emad Mokhtar <me@emadmokhtar.com> * `slack-19.0`: fix structured logging (#532) * `slack-19.0`: fix structured logging Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * remove debug println Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * test cleanup Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * update flags and e2e tests Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * fix e2e flag test Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * code cleanup Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * simplify Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * fix goimports Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * log_dir WIP Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> --------- Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Add structured logging flags to RegisterFlagsWithTimeouts The cherry-picked structured logging commits added the flags to RegisterFlags() but not to RegisterFlagsWithTimeouts(). This caused mysqlctld (which uses RegisterFlagsWithTimeouts) to not have the structured logging flags available. This commit adds the --structured-logging and --structured-log-level flags to RegisterFlagsWithTimeouts() to match RegisterFlags(). Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> --------- Signed-off-by: Emad Habib <ehabib@slack-corp.com> Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com> Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com> Co-authored-by: Emad Habib <ehabib@slack-corp.com> Co-authored-by: Emad Mokhtar <me@emadmokhtar.com> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
sbaker617
pushed a commit
that referenced
this pull request
Feb 5, 2026
* `slack-19.0`: add structured logging (#449) * Install zap log and noglog Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Implement the Vitess Structure Logger VTSLoger Signed-off-by: Emad Habib <ehabib@slack-corp.com> * Move the structure logging code to logger.go file * make PR suggestions from vitessio#13061 Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Fix bad merge conflict Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Fix bad merge conflict again Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * fix test Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * add flags e2e test for vtgateclienttest Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * update error msg Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> --------- Signed-off-by: Emad Habib <ehabib@slack-corp.com> Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Co-authored-by: Emad Habib <ehabib@slack-corp.com> Co-authored-by: Emad Mokhtar <me@emadmokhtar.com> * `slack-19.0`: fix structured logging (#532) * `slack-19.0`: fix structured logging Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * remove debug println Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * test cleanup Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * update flags and e2e tests Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * fix e2e flag test Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * code cleanup Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * simplify Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * fix goimports Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * log_dir WIP Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> --------- Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> * Add structured logging flags to RegisterFlagsWithTimeouts The cherry-picked structured logging commits added the flags to RegisterFlags() but not to RegisterFlagsWithTimeouts(). This caused mysqlctld (which uses RegisterFlagsWithTimeouts) to not have the structured logging flags available. This commit adds the --structured-logging and --structured-log-level flags to RegisterFlagsWithTimeouts() to match RegisterFlags(). Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com> Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com> --------- Signed-off-by: Emad Habib <ehabib@slack-corp.com> Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com> Signed-off-by: Tanjin Xu <tanjin.xu@slack-corp.com> Co-authored-by: Tim Vaillancourt <tim@timvaillancourt.com> Co-authored-by: Emad Habib <ehabib@slack-corp.com> Co-authored-by: Emad Mokhtar <me@emadmokhtar.com> Co-authored-by: Claude <svc-devxp-claude@slack-corp.com>
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.
Description
This PR fixes structure logging in v19 (introduced in #449) that is not being enabled due to a bug, although we set
--structured-loggingon daemonsBefore:
After w/this PR:
Related Issue(s)
slack-19.0: add structured logging #449Checklist
Deployment Notes