NOTEThis step-by-step guide is a suggested setup. You can use another way of sending the metrics that works better in your environment, as long as they arrive in the OpenTelemetry format.
This guide shows one way to send the metrics of your AWS API Gateway APIs to Sensedia Observability. After the configuration, the traffic, errors, and latency of your APIs appear on the Metrics screen within a few minutes.
NOTEThis guide covers only AWS API Gateway, in the REST API model. It does not apply to sending metrics from other sources.
The suggested setup uses only AWS managed services, in your own account. You deploy and maintain the pipeline. Sensedia provides the collection endpoint and the credential.
Component | Where it is | What it does |
|---|---|---|
| API Gateway | Your AWS account | Generates the metrics of your APIs |
| CloudWatch Metric Stream | Your AWS account | Streams the metrics in OpenTelemetry format |
| Amazon Data Firehose | Your AWS account | Groups the metrics into batches |
| Lambda forwarder | Your AWS account | Converts each batch and sends it to Sensedia |
| Sensedia Observability | Sensedia platform | Receives, stores, and displays the metrics |
To see who takes care of each part, check the responsibility matrix in the FAQs.
Only metrics aggregated per minute, over HTTPS. No request payload, header, or IP address leaves your account. The behavior of your APIs does not change: the only configuration in API Gateway is enabling detailed metrics.
Get the collection endpoint and the credential.
The sending uses two values from your environment:
Value | What it is |
|---|---|
OTLP_ENDPOINT | Ingestion URL dedicated to your environment (HTTPS) |
OTLP_SECRET | Access credential |
WARNINGTreat the credential as a secret. Store the value in a secrets vault, such as AWS Secrets Manager.
Enable detailed metrics on the stages.
In each stage you want to observe, go to Logs and tracing and turn on Detailed CloudWatch metrics. With the CLI or infrastructure as code, use metricsEnabled=true.
It is the detailed metrics that enable the view by method.
Build the collection pipeline in your account.
Create four resources, through the console or your infrastructure as code tool:
opentelemetry1.0, filtered on the AWS/ApiGateway namespace, with the p50, p90, p95, and p99 latency percentiles included. The destination is the Firehose delivery stream.The credential is sent in the sensedia-key header. Configure the two values from the first step in the function.
Validate the sending.
Call any observed API a few times and check:
NOTEDelivery uses a buffer. An end-to-end delay of a few minutes is expected.
We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more