Skip to content

Add Lineage metrics to PubsubIO#32037

Merged
Abacn merged 3 commits intoapache:masterfrom
Abacn:lineagepubsub
Aug 6, 2024
Merged

Add Lineage metrics to PubsubIO#32037
Abacn merged 3 commits intoapache:masterfrom
Abacn:lineagepubsub

Conversation

@Abacn
Copy link
Copy Markdown
Contributor

@Abacn Abacn commented Jul 31, 2024

Covers

UnboundedReader
PubsubBoundedWriter
PubsubUnboundedWriter (PubsubSink / PubsubDynamicSink)

Please add a meaningful description for your change here


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@Abacn
Copy link
Copy Markdown
Contributor Author

Abacn commented Jul 31, 2024

tested on integration test (rebased on #32022)

PubsubReadIT:

after

PipelineResult job = pipeline.run();

print

(job.metrics().queryMetrics(MetricsFilter.builder().addNameFilter(MetricNameFilter.named(LINEAGE_NAMESPACE, SOURCE_METRIC_NAME)).build()).getStringSets());

get

StringSetResult{stringSet=[pubsub:topic:pubsub-public-data.taxirides-realtime]}}

PubsubWriteIT:

replace to use SINK_METRIC_NAME, query gets

StringSetResult{stringSet=[pubsub:topic:apache-beam-testing.pubsub-write-1722451794792

@Abacn Abacn marked this pull request as ready for review July 31, 2024 19:03
@Abacn
Copy link
Copy Markdown
Contributor Author

Abacn commented Jul 31, 2024

R: @rohitsinha54

@github-actions
Copy link
Copy Markdown
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

Copy link
Copy Markdown
Contributor

@rohitsinha54 rohitsinha54 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to update any of the PubSub integration tests which runs in dataflow runner to assert for lineage metrics?

@Abacn
Copy link
Copy Markdown
Contributor Author

Abacn commented Jul 31, 2024

We can and should do this after runner support cleared. currently Pubsub integration tests are running on both direct runner / legacy Dataflow / Dataflow v2. When I add asserts currently it will only pass on Legacy runner suite (Direct runner suite will also pass after #32022 in)

@Abacn
Copy link
Copy Markdown
Contributor Author

Abacn commented Aug 1, 2024

a couple of unit tests failed due to that the fake topic/subscription does not follow the expected topic/subscription format, direct runner integration tests all passed however

@Abacn Abacn merged commit 17283bb into apache:master Aug 6, 2024
@Abacn Abacn deleted the lineagepubsub branch August 6, 2024 19:35
@Abacn Abacn mentioned this pull request Aug 20, 2024
3 tasks
reeba212 pushed a commit to reeba212/beam that referenced this pull request Dec 4, 2024
* Add Lineage metrics to PubsubIO

* fix format and add test

* make getDatacatalogname fail safe
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