Skip to content

Add python pub/sub docs - #39230

Merged
pablomartinezbernardo merged 5 commits into
masterfrom
pmartinez/py-gcp-push-sub
Aug 31, 2026
Merged

Add python pub/sub docs#39230
pablomartinezbernardo merged 5 commits into
masterfrom
pmartinez/py-gcp-push-sub

Conversation

@pablomartinezbernardo

@pablomartinezbernardo pablomartinezbernardo commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

What does this PR do? What is the motivation?

Add python pub/sub docs by extracting the content to a shortcode. Also, fix 2 issues (changing it in the shortcode, and therefore in the preexisting node docs):

1. Use --transport-topic for existing Pub/Sub topics

The previous Eventarc examples used:

--event-filters="type=google.cloud.pubsub.topic.v1.messagePublished"
--event-filters="topic=projects/my-project/topics/orders"

They now use:

--event-filters="type=google.cloud.pubsub.topic.v1.messagePublished"
--transport-topic=projects/my-project/topics/orders

The distinction is important:

  • --transport-topic selects the Pub/Sub topic that transports messagePublished events.
  • Google documents that if --transport-topic is omitted, Eventarc creates a transport topic. Therefore, using topic as an event filter does not bind the trigger to the existing orders topic.
  • Google’s official Cloud Run example uses the same type event filter followed by --transport-topic=projects/PROJECT_ID/topics/TOPIC_ID.

Sources:

2. Remove “Distributed tracing with Pub/Sub” from Cloud Run Jobs

Both parts of the section assumed a request-serving Cloud Run resource:

  1. The direct subscription example configured an HTTP endpoint:

    --push-endpoint=https://order-processor-xyz.run.app/pubsub

  2. The Eventarc Standard example configured:

    --destination-run-service=order-processor

Neither applies to a Cloud Run Job:

Merge readiness

  • Ready for merge

For Datadog employees:

  • ⚠️ Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). If you've already created your PR with an incorrect branch name, please rename your branch and open a fresh PR.
  • 🤖 New: Comment with /review to run an automated check that catches common issues before a Documentation team member reviews your PR.

AI assistance

Additional notes

@pablomartinezbernardo
pablomartinezbernardo requested review from a team as code owners August 17, 2026 14:59
@datadog-prod-us1-4

This comment has been minimized.

@jhgilbert jhgilbert added the astro-reorg-no-conflicts Needs manual conflict resolution after replatforming reorg label Aug 17, 2026
@maycmlee maycmlee self-assigned this Aug 17, 2026

@maycmlee maycmlee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just a small suggestion, otherwise looks good

Comment thread hugo/content/en/serverless/google_cloud_run/containers/in_container/python.md Outdated
Comment thread hugo/content/en/serverless/google_cloud_run/containers/sidecar/python.md Outdated
Comment thread hugo/content/en/serverless/google_cloud_run/functions/python.md Outdated
Co-authored-by: May Lee <may.lee@datadoghq.com>
@pablomartinezbernardo
pablomartinezbernardo marked this pull request as draft August 24, 2026 07:05
@pablomartinezbernardo pablomartinezbernardo changed the title Add python pub/sub docs Add python pub/sub/go docs Aug 24, 2026
@github-actions github-actions Bot added the Architecture Everything related to the Doc backend label Aug 24, 2026
@pablomartinezbernardo pablomartinezbernardo changed the title Add python pub/sub/go docs Add python pub/sub docs Aug 26, 2026
@pablomartinezbernardo
pablomartinezbernardo marked this pull request as ready for review August 26, 2026 10:56

@maycmlee maycmlee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@pablomartinezbernardo Thanks for using the general reuse shortcode! Left a comment about the links.

Comment thread hugo/layouts/shortcodes/gcr-pubsub-push-tracing.en.md Outdated

@maycmlee maycmlee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanls @pablomartinezbernardo! Just wanted to confirm one thing.


{{% svl-tracing-env %}}

## Distributed tracing with Pub/Sub

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just want to confirm that you didn't want to add the shortcode here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Correct, this is because of my "2. Remove “Distributed tracing with Pub/Sub” from Cloud Run Jobs" comment in the PR description: This should not have ever been included in cloud run jobs

@maycmlee maycmlee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah okay, thanks! Feel free to merge when ready!

@pablomartinezbernardo
pablomartinezbernardo merged commit 4f0fa18 into master Aug 31, 2026
35 of 36 checks passed
@pablomartinezbernardo
pablomartinezbernardo deleted the pmartinez/py-gcp-push-sub branch August 31, 2026 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Architecture Everything related to the Doc backend astro-reorg-no-conflicts Needs manual conflict resolution after replatforming reorg

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants