惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
博客园 - 三生石上(FineUI控件)
S
Securelist
U
Unit 42
The Cloudflare Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Simon Willison's Weblog
Simon Willison's Weblog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog
T
Tenable Blog
The Hacker News
The Hacker News
The Register - Security
The Register - Security
IT之家
IT之家
博客园 - 【当耐特】
Spread Privacy
Spread Privacy
P
Privacy & Cybersecurity Law Blog
博客园_首页
T
Tailwind CSS Blog
人人都是产品经理
人人都是产品经理
C
Cybersecurity and Infrastructure Security Agency CISA
Know Your Adversary
Know Your Adversary
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
T
Tor Project blog
C
CERT Recently Published Vulnerability Notes
Apple Machine Learning Research
Apple Machine Learning Research
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
V
Vulnerabilities – Threatpost
A
Arctic Wolf
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
V
V2EX
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
Scott Helme
Scott Helme
L
LINUX DO - 热门话题
Cyberwarzone
Cyberwarzone
V
Visual Studio Blog
月光博客
月光博客
爱范儿
爱范儿
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
美团技术团队
G
GRAHAM CLULEY
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Heimdal Security Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis Monitor Aruba Central in Datadog How we centralize and remediate risks with Datadog Case Management Accelerate incident response with Datadog and ServiceNow Monitor your application and network load balancer logs Understanding Karpenter architecture for Kubernetes autoscaling Tools for collecting metrics and logs from Karpenter Monitor Karpenter with Datadog What your product data is actually saying Key metrics for monitoring Karpenter Securing Datadog’s platform in the AI age: The role of observability data Four ways engineering teams use the Datadog MCP Server to power AI agents Approaching your observability migration with the right mindset Meet the new Bits AI SRE: Deeper reasoning, twice as fast Key learnings from the 2026 State of DevSecOps study Use plain English to query your multi-cloud infrastructure in Resource Catalog Simplifying troubleshooting across the user journey with Datadog Synthetic Monitoring Protect your OCI resources with Datadog Cloud Security This Month in Datadog - February 2026 Amazon EC2 security: How misconfigured and public AMIs expand your cloud attack surface Enable end-to-end visibility into your Java apps with a single command Measure and improve mobile app startup performance with Datadog RUM Evaluating our AI Guard application to improve quality and control cost Identify untested code across every level of your codebase Make use of guardrail metrics and stop babysitting your releases Monitor Versa Networks SD-WAN performance in Datadog Improve performance and reliability with APM Recommendations Remediate transitive vulnerabilities faster with Datadog Software Composition Analysis Generate audit-ready vulnerability and compliance reports with Datadog Sheets Monitor Fortinet FortiManager performance in Datadog Improve test coverage across codebases with Datadog Code Coverage Move fast, don’t break things: Consistent testing standards at scale Enrich logs with ServiceNow CMDB context before routing to any SIEM or logging tool Monitor Lustre with Datadog Make faster, better product decisions with Datadog Product Analytics Surface and remediate runtime posture issues with Workload Protection Findings Protect agentic AI applications with Datadog AI Guard How to optimize JavaScript code with CSS Detect human names in logs with ML in Sensitive Data Scanner How we cut our NLQ agent debugging time from hours to minutes with LLM Observability Debug PostgreSQL query latency faster with EXPLAIN ANALYZE in Datadog Database Monitoring Datadog acquires Propolis Unify and correlate frontend and backend data with retention filters Scale compliance across global frameworks with Datadog Cloud Security Monitor Arista VeloCloud SD-WAN performance with Datadog Building reliable dashboard agents with Datadog LLM Observability Simplify log collection and aggregation for MSSPs with Datadog Observability Pipelines Mitigation for Node.js denial-of-service vulnerability affecting Datadog APM Automate flaky test fixes with the Bits AI Dev Agent and Test Optimization How we built an AI SRE agent that investigates like a team of engineers Datadog integrations 2025 recap: Observability for AI, security, and hybrid cloud Design effective executive dashboards with Datadog Implement dbt data quality checks with dbt-expectations Bring faster visibility into AWS Lambda functions with remote instrumentation Troubleshoot faster with the GitLab Source Code integration in Datadog How Cambia Health Solutions saved $30,000 monthly with Cloud Cost Management and the Datadog Resource Catalog Normalize any logs for Cloud SIEM with Datadog's OCSF processor Optimizing Datadog at scale: Cost-efficient observability at Zendesk Detect, diagnose, and resolve network issues easily with CNM Network Health Securing customer logins with breach intelligence Connect engineering errors to user impact in early-stage products Cilium configuration for Kubernetes operations at scale Designing feedback loops for progressive delivery Ship features faster and safer with Datadog Feature Flags Choosing the right OpenTelemetry Collector distribution Route your monitor alerts with Datadog monitor notification rules Automate Cloud SIEM investigations with Bits AI Security Analyst Cloud threat detection: How to identify risky activity across control and data planes Collecting Kafka performance metrics Monitoring Kafka with Datadog Monitoring Kafka performance metrics
Trace Google Pub/Sub workloads in Cloud Run with Datadog
2026-02-03 · via Datadog | The Monitor blog

Event-driven systems are great at decoupling services, but they also make incidents harder to untangle. A single user request can turn into dozens (or thousands) of messages, multiple consumers, retries, and delayed acknowledgments. If your tracing only tells you that a message was sent or received, you still have to guess which upstream request produced the message, whether a batch publish fanned out cleanly, and where queue time is accumulating.

Datadog APM now provides producer-aware distributed tracing for Google Cloud Pub/Sub, giving teams enhanced visibility into patterns that show up in real Pub/Sub applications: batch publishing, serverless push subscriptions to Cloud Run, and acknowledgments that happen asynchronously after downstream work completes. With Datadog’s Cloud Run integration and a small Pub/Sub configuration change for push deliveries, you can follow the full message life cycle and keep traces connected across producers and consumers.

In this post, we’ll show you how Datadog APM enables you to:

Keep producer and consumer traces connected from end to end

Native approaches for monitoring Pub/Sub messages, such as Cloud Trace, typically generate separate traces for producers and consumers. This makes it difficult to answer questions like “which API request triggered this message?” or “why did this consumer start timing out after a deployment?”

With Datadog APM, published messages automatically carry trace context in message attributes. When the consumer receives the message, Datadog extracts that context and continues the trace, so consumer work appears in the same distributed trace as the producer.

In practice, this means a single user request that produces messages can stay “whole” in APM: The producer’s http.request span can parent the Pub/Sub publish span (e.g., pubsub.request), and each consumer receive span (e.g., pubsub.receive for pull, or pubsub.push.receive for push) can continue from that same trace context.

Measure queue time with producer-injected timestamps

Trace continuity is useful on its own, but it becomes much more actionable when you can separate time spent waiting from time spent processing. Datadog adds a producer-side publish timestamp to each message and calculates delivery latency on the consumer side, surfacing a queue-time signal directly on consumer spans (e.g., pubsub.delivery_duration_ms).

This helps you distinguish between a slow consumer (processing time is high) and an overloaded pipeline (delivery latency is high, indicating backlog or insufficient consumer capacity).

A trace view highlights delivery latency for a Pub/Sub message so you can separate queue time from application processing time.

Most Pub/Sub producers don’t publish one message at a time. Client libraries batch publishes under the hood and flush batches based on timing and size thresholds. That batching behavior is great for throughput, but it introduces a visibility problem during incidents: You may see many consumer messages, but you can’t reliably connect them back to the producer’s batch publish operation.

Datadog APM addresses this by detecting batch publishes and representing them as a single publish span, while also attaching span links from each consumer message back to the originating batch publish span. This creates a many-to-one relationship, in which multiple consumer traces can all be linked back to one batch. This setup is particularly helpful for production debugging because you can pivot from the producer-side batch to all messages in that fan-out, and then group and filter those consumer traces by timing or metadata.

To make this usable during real investigations, Datadog enriches consumer spans with batch context, such as batch size and the message’s index within the batch. Instead of treating each message as an isolated unit, you can identify important patterns: for example, if messages after a particular index experienced higher delivery latency, or only a subset of a batch appears to have been processed.

A trace view shows span links from consumer message spans back to a producer batch publish span to troubleshoot fan-out behavior.

Identify Pub/Sub push deliveries in Cloud Run

Push subscriptions introduce another common tracing gap: The consumer side looks like a generic HTTP request. In Cloud Run, a Pub/Sub push delivery arrives as an HTTP POST, so without Pub/Sub-aware tracing, you’ll see an inbound http.request span with no clear indication that it was triggered by Pub/Sub, which topic delivered it, or which producer trace it should connect to.

Datadog detects Pub/Sub push deliveries and creates a dedicated pubsub.push.receive span that represents time spent in Pub/Sub infrastructure and scheduling prior to delivery. Datadog also reparents the generic consumer HTTP request span under that pubsub.push.receive span, making the trace hierarchy reflect reality: The HTTP request happened because Pub/Sub delivered a message, not because an external client called your service directly.

This is especially useful when Cloud Run services have mixed traffic—direct requests and Pub/Sub-delivered invocations—because it gives you a clear way to separate and analyze those two sources of work.

A trace view shows a Pub/Sub push receive span parenting a Cloud Run HTTP request span to clarify that the invocation originated from Pub/Sub.

Preserve trace context across async acknowledgments

Acknowledgments in Pub/Sub rarely happen immediately at the end of a message handler. In many applications, the ack is intentionally delayed until a database transaction commits, an external API confirms a change, or a batch processing step completes. From a tracing perspective, that delay is a problem: If the ack happens after the handler returns (or in a different async context), the ack span can become an orphan, or disappear entirely.

Datadog preserves trace context across these async boundaries so that acknowledgments still attach to the original receive span, even when the application calls message.ack() minutes later and the Pub/Sub client batches the underlying acknowledge(ackIds) calls.

When ack spans stay connected, you can:

  • Measure the full receive-to-ack duration (i.e., how long a message stayed in-flight)
  • Separate application processing time from Pub/Sub acknowledgment latency
  • Avoid misleading traces where acknowledgments appear unrelated to the work they finalize
A trace view shows an acknowledgment span connected to the original message receive span even though the application acknowledged the message asynchronously.

Configure push subscriptions and Eventarc for full trace visibility

For pull subscriptions, trace propagation can work with no Pub/Sub-side changes because the consumer library can read message attributes directly. Push subscriptions are different: The message arrives over HTTP, and depending on configuration, message attributes may be nested in a wrapper payload that is only parsed after HTTP instrumentation has already created the request span. If the producer trace context isn’t available early enough, you can’t reliably connect the consumer back to the producer.

To unlock full producer-aware tracing for push subscriptions, configure your push subscription to write metadata to HTTP headers by using the --push-no-wrapper-write-metadata flag. With that configuration, Pub/Sub places message attributes into headers, which makes trace context available at the start of request handling, early enough for Datadog to create the pubsub.push.receive span and continue the producer trace cleanly.

Note: With payload unwrapping enabled, Pub/Sub delivers raw message data directly as the HTTP request body, instead of the default wrapped JSON that contains metadata and a base64-encoded data field. This means you no longer need to parse nested JSON or base64-decode the message; req.body becomes the original payload sent by the publisher.

Configure a standard push subscription

You can create a new push subscription with the flag enabled:

gcloud pubsub subscriptions create order-processor-sub \

--topic=orders \

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

--push-no-wrapper \

--push-no-wrapper-write-metadata

Or update an existing subscription:

gcloud pubsub subscriptions update order-processor-sub \

--push-no-wrapper-write-metadata

Eventarc-backed Pub/Sub triggers

Eventarc Pub/Sub triggers use push subscriptions under the hood. When you create an Eventarc trigger, Google Cloud creates a managed push subscription automatically, but the trigger creation flow does not expose --push-no-wrapper-write-metadata. If you want producer-aware tracing for Eventarc deliveries to Cloud Run, you’ll need to update the auto-created subscription after the trigger exists.

A typical workflow looks like this:

  1. Create the Eventarc trigger (standard).
  2. Identify the auto-created subscription associated with your topic.
  3. Update that subscription with --push-no-wrapper-write-metadata.

gcloud pubsub subscriptions update eventarc-...-sub-... \

--push-no-wrapper-write-metadata

Get end-to-end Pub/Sub traces in Datadog

Producer-aware tracing for Pub/Sub is most valuable when you’re debugging the failures that only show up in production: partial batch fan-out, queue backlogs that ripple into downstream latency, and delayed acknowledgments that obscure true end-to-end timing. By keeping producer and consumer traces connected, adding batch-aware span links, detecting push deliveries in Cloud Run, and preserving async ack context, Datadog helps you investigate these issues with fewer blind spots.

To get started, install and configure Datadog APM for your Pub/Sub producer and consumer services, then make sure your push subscriptions are configured with --push-no-wrapper-write-metadata. Learn more in our APM documentation. If you’re new to Datadog, sign up for a 14-day free trial.