Monitoring your APIs is an essential part of the API management process. While Postman monitors let you keep a check on your API performance and stability, our enhanced integration with Datadog—an API performance monitoring tool—enables you to perform further analysis by logging, alerting, and dashboarding. Plus, this integration in conjunction with Postman asserting allows you to closely monitor your business logic.
Here’s how this integration works: Postman posts the monitor run results to Datadog. The results can then be further analyzed to gain greater insights into your API performance and reliability. Follow the steps here to set up a Datadog integration and achieve the following use cases.
Monitor the API latency across various regions
Postman sends the latency of each request as well as the complete monitor run to Datadog. The metrics PostmanMonitors_totalLatency and PostmanMonitor_request_latency can be observed to test the latency of your API across a particular “region” (which is a tag associated with the metric).
Observing these metrics in conjunction with the system performance metrics can help you detect the degradation of your API performance and take quick action. This observation helps you drill deeper into an anomaly in API performance and better understand the effects of latency on system resources and vice versa. Datadog also lets you set alerts once a metric crosses a certain threshold, so you will always be aware of any significant performance degradation.
API Latency analyzed along with the CPU usage
Keep a check on errors and test-case status
It’s important to keep a check on any unusual errors or test failures in the APIs. Postman monitors send across metrics such as PostmanMonitors_failedTests, PostmanMonitors_passedTests, PostmanMonitors_errors, and more to Datadog to keep checking for any errors or unusual test failure in your APIs.
These metrics can help you be proactive in taking corrective measures in the event of an API failure. Tracking these over time can give you a good idea of the reliability of your APIs. Correlating these metrics with other application metrics can help you identify the root cause of failures and errors.
With this latest release, we have introduced a few new request-level metrics: PostmanMonitor_request_failedTests and PostmanMonitor_request_passedTests.
Number of tests passed, tests failed, and the API errors being analyzed together on Datadog
Detect unusual data transfer to and from your APIs
The number of bytes sent or received by your APIs directly impacts the resource utilization of your network and system. This also in turn impacts the performance of your APIs. The new metrics PostmanMonitor_request_bytes helps you monitor closely the number of bytes being sent or received by your API over a time frame. This in conjunction with the network and system resource metrics can help you detect any adverse impacts being caused by your APIs on your network and systems. The higher resource (CPU, RAM, etc.) utilization can further have an impact on the latency metrics as well, hence the metric can indirectly answer any anomaly in the API latency metrics.
Know the availability of your APIs
API availability is one of the most important metrics that have a direct impact on your business sustainability. Postman sends across metrics such as PostmanMonitor_run_httpStatus2XX, PostmanMonitor_run_httpStatus4XX, and PostmanMonitor_run_httpStatus5XX to monitor the HTTP status of your requests. The metric in conjunction with the Datadog alerting (talked about earlier) can help you stay on top of your APIs’ availability. Also, observing the trend over a time frame will give you a good idea about your API availability, which can be correlated to business impact if there is any.
Setting up alerts for API latency on Datadog The alert as seen on Microsoft Teams
Creating a dashboard in Datadog
While all the metrics above have a standalone significance, the power of metrics increases exponentially when viewed in conjunction with each other. Datadog lets you create dashboards of related metrics, which can help you monitor your APIs and systems closely. We strongly recommend creating a dashboard corresponding to each monitor that contains all the metrics associated with that monitor and a few other systems/network resource metrics. This gives you an end-to-end view of your APIs’ performance, resilience, resource utilization, and availability.
A dashboard to analyze the API metrics and system metrics together
With these enhancements to the Datadog integration, Postman now empowers you to comprehensively evaluate every aspect of your API performance and be more proactive in taking corrective measures when needed. Try out the upgraded integration and let us know what you think.
Postman provides a wide range of functions and features to assist with API development, testing, and collaboration. Here are some commonly used functions in Postman:
Creating and Managing Requests: Postman allows you to create API requests by specifying the request method, URL, headers, parameters, and body. You can manage and organize requests within collections, including creating folders, adding descriptions, and reordering requests.
Request and Response Visualization: Postman provides a user-friendly interface to view and analyze request and response data. It supports syntax highlighting for various data formats such as JSON, XML, and HTML, making it easier to understand and validate the data.
Environment and Variables: Postman allows you to define variables and environments. Variables enable you to store and reuse dynamic values across requests, making them flexible and easy to maintain. Environments provide sets of variables specific to different environments (e.g., development, staging, production).
Pre-request Scripts: Postman enables you to execute scripts before sending API requests using pre-request scripts. These scripts can be used to dynamically generate values, manipulate data, or set variables based on specific conditions.
Collection Runner: The Collection Runner allows you to execute a series of requests in a collection. It enables you to perform data-driven testing by iterating over multiple sets of data or environments. You can configure iterations, delays, and data sources for more comprehensive testing.
Mock Servers: Postman allows you to create mock servers for simulating API responses without a live backend. Mock servers are useful during development, allowing frontend developers to work independently by providing simulated API responses.
Documentation Generation: Postman can automatically generate documentation for your APIs based on your requests and collections. It provides a simple way to share API specifications and details with stakeholders.
Collaboration and Teamwork: Postman offers collaboration features such as sharing collections, collaborating on requests, and commenting on specific requests or collections. It also supports version control integration to manage changes and updates effectively.
Integration and Automation: Postman integrates with various tools and services, including version control systems (e.g., Git), CI/CD platforms (e.g., Jenkins), and API management solutions. It provides options for integrating with these tools to automate API testing and deployment processes.