Skip to content
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

KAFKA-18272: Deprecated protocol api usage should be logged at info level (3.9) #18333

Merged
merged 2 commits into from
Dec 28, 2024

Conversation

ijuma
Copy link
Member

@ijuma ijuma commented Dec 27, 2024

This makes it possible to enable request logs for deprecated protocol api versions without enabling it for the rest. Combined with the ability to enable/disable dynamically, it makes it a bit easier to collect the information about deprecated clients that is not available via metrics.

I manually verified that:

  1. If the request logger is configured at INFO level, only deprecated protocol api versions are logged and they are logged at INFO level.
  2. If the request logger is configured at DEBUG level, all requests are logged but the log level is INFO for deprecated protocol api versions and DEBUG for the rest.
  3. If the request logger is configured at WARN level (the default), no requests are logged.

The cherry-pick from trunk had one conflict: RequestConvertToJson was rewritten from Scala to Java in trunk. In addition, I added an upgrade note for 3.9.1.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

…evel (apache#18313)

This makes it possible to enable request logs for deprecated protocol api versions without enabling it for the rest. Combined with the ability to enable/disable dynamically, it makes it a bit easier to collect the information about deprecated clients that is not available via metrics.

This isn't particularly useful in trunk/4.0 since there are no deprecated api versions in these versions, but it will be useful for older branches. I intend to backport to those branches and add a release note in the backport regarding the change in behavior.

I manually verified that:
1. If the request logger is configured at `INFO` level, only deprecated protocol api versions are logged and they are logged at `INFO` level.
2. If the request logger is configured at `DEBUG` level, all requests are logged but the log level is `INFO` for deprecated protocol api versions and `DEBUG` for the rest.
3. If the request logger is configured at `WARN` level (the default), no requests are logged.

Reviewers: Chia-Ping Tsai <[email protected]>
@ijuma ijuma requested a review from chia7712 December 27, 2024 16:25
@ijuma
Copy link
Member Author

ijuma commented Dec 27, 2024

@chia7712 Since you reviewed the original PR, perhaps you can review this cherry-pick. I'll also backport it to older branches in case we end up releasing new patch releases for those. I would usually not do that, but since this helps plan future upgrades, it makes sense to backport more aggressively.

@ijuma
Copy link
Member Author

ijuma commented Dec 28, 2024

Test failures are unrelated.

@ijuma ijuma merged commit 22a9127 into apache:3.9 Dec 28, 2024
1 check failed
@ijuma ijuma deleted the kafka-18272-deprecated-api-info-log-3.9 branch December 28, 2024 17:12
ijuma added a commit that referenced this pull request Dec 28, 2024
…evel (3.8) (#18333)

This makes it possible to enable request logs for deprecated protocol api versions without enabling it for the rest. Combined with the ability to enable/disable dynamically, it makes it a bit easier to collect the information about deprecated clients that is not available via metrics.

I manually verified that:
1. If the request logger is configured at `INFO` level, only deprecated protocol api versions are logged and they are logged at `INFO` level.
2. If the request logger is configured at `DEBUG` level, all requests are logged but the log level is `INFO` for deprecated protocol api versions and `DEBUG` for the rest.
3. If the request logger is configured at `WARN` level (the default), no requests are logged.

The cherry-pick from trunk had one conflict: `RequestConvertToJson` was rewritten from Scala to Java in trunk. In addition, I added an upgrade note for 3.8.2.

Reviewers: Chia-Ping Tsai <[email protected]>
ijuma added a commit that referenced this pull request Dec 28, 2024
…evel (3.8) (#18333)

This makes it possible to enable request logs for deprecated protocol api versions without enabling it for the rest. Combined with the ability to enable/disable dynamically, it makes it a bit easier to collect the information about deprecated clients that is not available via metrics.

I manually verified that:
1. If the request logger is configured at `INFO` level, only deprecated protocol api versions are logged and they are logged at `INFO` level.
2. If the request logger is configured at `DEBUG` level, all requests are logged but the log level is `INFO` for deprecated protocol api versions and `DEBUG` for the rest.
3. If the request logger is configured at `WARN` level (the default), no requests are logged.

The cherry-pick from trunk had one conflict: `RequestConvertToJson` was rewritten from Scala to Java in trunk. In addition, I added an upgrade note for 3.8.2.

Reviewers: Chia-Ping Tsai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants