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

推荐订阅源

WordPress大学
WordPress大学
L
LangChain Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
罗磊的独立博客
J
Java Code Geeks
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 叶小钗
小众软件
小众软件
博客园 - Franky
D
Docker
Google DeepMind News
Google DeepMind News
Microsoft Azure Blog
Microsoft Azure Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
U
Unit 42
宝玉的分享
宝玉的分享
C
Check Point Blog
B
Blog
V
V2EX
博客园 - 三生石上(FineUI控件)
MyScale Blog
MyScale Blog
The Cloudflare Blog
博客园 - 聂微东
博客园_首页
Engineering at Meta
Engineering at Meta

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 your gRPC APIs with Datadog Synthetic Monitoring
Thomas Sobolik · 2022-04-07 · via Datadog | The Monitor blog

gRPC is an open-source Remote Procedure Call (RPC) framework developed by Google and released in 2016. Although gRPC is still relatively new, large organizations are adopting it in increasing numbers to build APIs that connect complex microservice meshes that use disparate languages and frameworks. gRPC-based APIs can perform requests up to seven times faster than REST APIs and enable customers to easily implement SSL authentication, load balancing, and tracing via plug-in libraries.

We’re pleased to announce that Datadog Synthetic Monitoring now enables you to test your gRPC endpoints, so you can continually monitor the availability of your gRPC services to ensure that your APIs respond to requests correctly. Like other Datadog Synthetic tests, gRPC tests include a wide range of configuration options, so you can customize them to fit your team’s needs. In this post, we’ll discuss how you can perform gRPC unary calls and gRPC health checks within the Datadog platform and monitor their results from the Synthetic Monitoring view.

How does gRPC work?

In an RPC architecture, the client application can call a method on a networked service as if it were a local object in the same address space. This function invocation is known as the Remote Procedure Call, or RPC. gRPC implements an RPC architecture in which RPCs contain data payloads serialized in protocol buffers, rather than in JSON files, as is the case in the REST API framework. Whereas JSON files are human-readable, protocol buffer serialization encodes the data in binary, facilitating faster processing and a broader range of compatible data types. By defining your RPC services in serialized proto files, you can perform gRPC calls that are either unary (that is, a discrete request is invoked once to fetch a response) or continuous streams.

Configure gRPC tests

Datadog Synthetic Monitoring enables you to perform synthetic gRPC unary calls to test the health and response time of your request functions. Once you’ve selected “gRPC” on the test creation view, you can specify the host and port and then import the service definition for a unary call by uploading the proto file and specifying which method to test. Next, set the request message you want to send. You can enter the message manually or generate a boilerplate message automatically using the Generate Example button. Then, you can add assertions to define a successful test result—such as the minimum response time and desired output—and set the managed and private locations where you’d like the test to run.

Create gRPC health checks in Datadog.

In addition to simulating gRPC unary calls, you can also create health checks that can proactively validate whether or not a service is available to receive RPCs. As with unary call tests, you can add assertions to your health checks to define the maximum response time and expected output.

Like other Synthetic tests, gRPC tests can be run on demand, on a regular schedule, or from within your CI/CD pipelines via Synthetic Monitoring’s integrations with services such as Jenkins and Github Actions. If a test fails in the pipeline, you can optionally block the deployment and automatically trigger a rollback, enabling you to keep problematic code changes from reaching production.

Finally, you can use Datadog’s robust alerting capabilities to notify your teams when a gRPC test is failing for a certain period of time or in a certain number of locations. You can also include additional context in the alert message in order to ensure on-call engineers have enough information to begin their investigation.

Monitor your gRPC tests in Datadog

The Synthetic Monitoring main view includes a list of all the Synthetic tests shared by your organization, including gRPC tests. You can query, sort, and filter this list by test type, as well as keywords and tags, to quickly find the ones you care about. For example, you can filter by error status to surface failed tests for troubleshooting, or sort by uptime to view which tests are failing the most often.

Filter to see all gRPC health checks.
Filter to see all gRPC health checks.

You can click on any test to access more granular details that can help you spot performance trends and begin to investigate why the test is failing. For instance, uptime graphs allow you to see at a glance how a test’s status differs between locations, which enables you to determine if any regional server outages are at play. You can also drill into individual test runs to view a breakdown of network timings and verify that the response message and headers are consistent with your expectations.

View details about individual gRPC health check runs.

For additional context around a test result, you can leverage Synthetics’ integration with Datadog APM to view the full trace of the inter-service function calls leading up to the RPC request. Errorful spans are highlighted in red, so you can examine any errors that may have contributed to the failure. Relevant stacktraces, infrastructure metrics, and logs are included in the same view, enabling you to easily access all the information you need to begin troubleshooting.

Get started with Synthetic gRPC testing

Datadog’s Synthetic gRPC tests, which are now available for all Synthetic Monitoring customers, enable teams to continually monitor the availability and performance of their gRPC endpoints in order to detect and resolve issues as quickly as possible. See our documentation for more information on how to start creating these tests today. If you’re not yet using Datadog to monitor your applications and infrastructure, get started with a 14-day free trial.