Skip to content

Add topic reader names to logs - #904

Open
NastyaKa wants to merge 1 commit into
ydb-platform:mainfrom
NastyaKa:topic_reader_metrics
Open

NastyaKa wants to merge 1 commit into
ydb-platform:mainfrom
NastyaKa:topic_reader_metrics

Conversation

@NastyaKa

Copy link
Copy Markdown

Pull request type

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

What is the current behavior?

Topic readers cannot be assigned a diagnostic name, making concurrent readers difficult to distinguish in logs and server-side diagnostics.

Issue Number: N/A

What is the new behavior?

Adds an optional reader_name parameter to topic readers. If omitted, the SDK generates a process-local reader-{i} name that remains stable across reconnects. Reader names are included in initialization requests and SDK logs.

Other information

Includes unit tests, documentation, and updated sync and async examples.

@codecov

codecov Bot commented Sep 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 83.01887% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.69%. Comparing base (33b601a) to head (caae48f).

Files with missing lines Patch % Lines
ydb/_topic_reader/topic_reader_asyncio.py 82.50% 6 Missing and 1 partial ⚠️
ydb/_topic_reader/topic_reader_sync.py 60.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #904      +/-   ##
==========================================
+ Coverage   82.66%   82.69%   +0.03%     
==========================================
  Files          99       99              
  Lines       12951    12974      +23     
  Branches     1268     1271       +3     
==========================================
+ Hits        10706    10729      +23     
  Misses       1794     1794              
  Partials      451      451              
Flag Coverage Δ
integration 80.46% <69.81%> (+0.01%) ⬆️
unit 49.29% <62.26%> (+0.22%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
ydb/_grpc/grpcwrapper/ydb_topic.py 86.37% <100.00%> (+0.04%) ⬆️
ydb/_topic_reader/topic_reader.py 91.46% <100.00%> (+0.43%) ⬆️
ydb/topic.py 86.01% <ø> (ø)
ydb/_topic_reader/topic_reader_sync.py 73.17% <60.00%> (+1.01%) ⬆️
ydb/_topic_reader/topic_reader_asyncio.py 87.16% <82.50%> (+0.27%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

1 participant