Skip to content

slack-19.0: add structured logging#449

Merged
timvaillancourt merged 9 commits intoslack-19.0from
structured-logger_slack-19.0
Jul 10, 2024
Merged

slack-19.0: add structured logging#449
timvaillancourt merged 9 commits intoslack-19.0from
structured-logger_slack-19.0

Conversation

@timvaillancourt
Copy link

Description

This PR is the not-yet-upstreamed vitessio#13061 with the review suggestions from the comments applied

Related Issue(s)

vitessio#13061

Checklist

  • "Backport to:" labels have been added if this change should be back-ported
  • Tests were added or are not required
  • Did the new or modified tests pass consistently locally and on the CI
  • Documentation was added or is not required

Deployment Notes

EmadMokhtar and others added 6 commits July 10, 2024 01:30
Signed-off-by: Emad Habib <ehabib@slack-corp.com>
Signed-off-by: Emad Habib <ehabib@slack-corp.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>
@salesforce-cla
Copy link

salesforce-cla bot commented Jul 9, 2024

Thanks for the contribution! Before we can merge this, we need @EmadMokhtar to sign the Salesforce Inc. Contributor License Agreement.

@timvaillancourt timvaillancourt changed the title slack-19.0 add structured logging slack-19.0: add structured logging Jul 9, 2024
@github-actions github-actions bot added this to the v19.0.4 milestone Jul 9, 2024
@timvaillancourt timvaillancourt marked this pull request as ready for review July 10, 2024 00:05
@timvaillancourt timvaillancourt requested a review from a team as a code owner July 10, 2024 00:05
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
Signed-off-by: Tim Vaillancourt <tim@timvaillancourt.com>
@timvaillancourt timvaillancourt merged commit f1ff852 into slack-19.0 Jul 10, 2024
@timvaillancourt timvaillancourt deleted the structured-logger_slack-19.0 branch July 10, 2024 11:56
@timvaillancourt timvaillancourt modified the milestones: v19.0.4, v19.0.5 Sep 10, 2024
@timvaillancourt timvaillancourt modified the milestones: v19.0.5, v19.0.7 Feb 19, 2025
tanjinx pushed a commit that referenced this pull request Feb 3, 2026
* 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>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants