You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "freeznet (via GitHub)" <gi...@apache.org> on 2025/03/26 08:54:48 UTC
[PR] [improve][io] Enhance Kafka connector logging with focused bootstrap server information [pulsar]
freeznet opened a new pull request, #24128:
URL: https://github.com/apache/pulsar/pull/24128
### Motivation
The current Kafka connector logging outputs the entire properties object, which adds unnecessary log lines. This PR improves logging for Kafka connectors by specifically logging the bootstrap server information rather than dumping all properties, enhancing readability and focusing on the most relevant connection detail. Users can continue to retrieve connector state information using Admin API when needed.
### Modifications
- Changed log statements in Kafka connector classes to only output bootstrap server information instead of full properties
- Updated logging in the following files:
- `KafkaConnectSink.java`
- `KafkaAbstractSink.java`
- `KafkaBytesSink.java`
- `KafkaBytesSource.java`
- Used the `getOrDefault` method to extract bootstrap server information from properties with fallback handling
### Verifying this change
- [x] Make sure that the change passes the CI checks.
This change is a trivial rework / code cleanup without any test coverage. The modifications only affect log output formatting and don't change any functional behavior, so no additional tests are required.
### Documentation
- [ ] `doc` <!-- Your PR contains doc changes. -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][io] Enhance Kafka connector logging with focused bootstrap server information [pulsar]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #24128:
URL: https://github.com/apache/pulsar/pull/24128#issuecomment-2754473470
## [Codecov](https://app.codecov.io/gh/apache/pulsar/pull/24128?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `81.81818%` with `2 lines` in your changes missing coverage. Please review.
> Project coverage is 74.22%. Comparing base [(`bbc6224`)](https://app.codecov.io/gh/apache/pulsar/commit/bbc62245c5ddba1de4b1e7cee4ab49334bc36277?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`56364f1`)](https://app.codecov.io/gh/apache/pulsar/commit/56364f1a5be224b593d55ba864917f34fa9ab81c?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> Report is 990 commits behind head on master.
| [Files with missing lines](https://app.codecov.io/gh/apache/pulsar/pull/24128?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...ava/org/apache/pulsar/io/kafka/KafkaBytesSink.java](https://app.codecov.io/gh/apache/pulsar/pull/24128?src=pr&el=tree&filepath=pulsar-io%2Fkafka%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fio%2Fkafka%2FKafkaBytesSink.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2thZmthL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvaW8va2Fma2EvS2Fma2FCeXRlc1NpbmsuamF2YQ==) | 0.00% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/pulsar/pull/24128?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
| [...a/org/apache/pulsar/io/kafka/KafkaBytesSource.java](https://app.codecov.io/gh/apache/pulsar/pull/24128?src=pr&el=tree&filepath=pulsar-io%2Fkafka%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fio%2Fkafka%2FKafkaBytesSource.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2thZmthL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvaW8va2Fma2EvS2Fma2FCeXRlc1NvdXJjZS5qYXZh) | 75.00% | [0 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/pulsar/pull/24128?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
[](https://app.codecov.io/gh/apache/pulsar/pull/24128?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
```diff
@@ Coverage Diff @@
## master #24128 +/- ##
============================================
+ Coverage 73.57% 74.22% +0.64%
+ Complexity 32624 32102 -522
============================================
Files 1877 1864 -13
Lines 139502 144457 +4955
Branches 15299 16474 +1175
============================================
+ Hits 102638 107219 +4581
+ Misses 28908 28775 -133
- Partials 7956 8463 +507
```
| [Flag](https://app.codecov.io/gh/apache/pulsar/pull/24128/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [inttests](https://app.codecov.io/gh/apache/pulsar/pull/24128/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `26.66% <0.00%> (+2.08%)` | :arrow_up: |
| [systests](https://app.codecov.io/gh/apache/pulsar/pull/24128/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `23.20% <0.00%> (-1.13%)` | :arrow_down: |
| [unittests](https://app.codecov.io/gh/apache/pulsar/pull/24128/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `73.71% <81.81%> (+0.86%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Files with missing lines](https://app.codecov.io/gh/apache/pulsar/pull/24128?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [...ache/pulsar/io/kafka/connect/KafkaConnectSink.java](https://app.codecov.io/gh/apache/pulsar/pull/24128?src=pr&el=tree&filepath=pulsar-io%2Fkafka-connect-adaptor%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fio%2Fkafka%2Fconnect%2FKafkaConnectSink.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2thZmthLWNvbm5lY3QtYWRhcHRvci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcHVsc2FyL2lvL2thZmthL2Nvbm5lY3QvS2Fma2FDb25uZWN0U2luay5qYXZh) | `74.14% <100.00%> (-0.39%)` | :arrow_down: |
| [.../org/apache/pulsar/io/kafka/KafkaAbstractSink.java](https://app.codecov.io/gh/apache/pulsar/pull/24128?src=pr&el=tree&filepath=pulsar-io%2Fkafka%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fio%2Fkafka%2FKafkaAbstractSink.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2thZmthL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvaW8va2Fma2EvS2Fma2FBYnN0cmFjdFNpbmsuamF2YQ==) | `46.15% <100.00%> (ø)` | |
| [...ava/org/apache/pulsar/io/kafka/KafkaBytesSink.java](https://app.codecov.io/gh/apache/pulsar/pull/24128?src=pr&el=tree&filepath=pulsar-io%2Fkafka%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fio%2Fkafka%2FKafkaBytesSink.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2thZmthL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvaW8va2Fma2EvS2Fma2FCeXRlc1NpbmsuamF2YQ==) | `0.00% <0.00%> (ø)` | |
| [...a/org/apache/pulsar/io/kafka/KafkaBytesSource.java](https://app.codecov.io/gh/apache/pulsar/pull/24128?src=pr&el=tree&filepath=pulsar-io%2Fkafka%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpulsar%2Fio%2Fkafka%2FKafkaBytesSource.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cHVsc2FyLWlvL2thZmthL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9wdWxzYXIvaW8va2Fma2EvS2Fma2FCeXRlc1NvdXJjZS5qYXZh) | `70.45% <75.00%> (ø)` | |
... and [1062 files with indirect coverage changes](https://app.codecov.io/gh/apache/pulsar/pull/24128/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
</details>
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [improve][io] Enhance Kafka connector logging with focused bootstrap server information [pulsar]
Posted by "lhotari (via GitHub)" <gi...@apache.org>.
lhotari merged PR #24128:
URL: https://github.com/apache/pulsar/pull/24128
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org