Profiles in Amazon CloudWatch
Amazon CloudWatch Profiles is available as a public preview. Features and APIs described in this guide are subject to change before general availability.
A profile is a continuous recording of resource usage at the code level. It samples the call stacks (stack traces) of your running code to show which functions consume CPU, memory, or other resources during execution.
You send profile data to Amazon CloudWatch Profiles over the OpenTelemetry Protocol (OTLP). OTLP is the same open standard that CloudWatch uses for logs, metrics, and traces. You can send data from an OTLP-compatible profiler in the following ways:
-
Through the CloudWatch agent or an OpenTelemetry Collector
-
Directly to the CloudWatch OTLP endpoint
A client that sends directly to the endpoint authenticates in one of two ways. It signs
each request with AWS Signature Version 4 (SigV4), or it sends a CloudWatch API key as a bearer
token in the Authorization: Bearer header. For more information about API keys,
see Setting up bearer token authentication for metrics and profiles.
You can view the profile data that you send to CloudWatch in an account and Region in the CloudWatch console. If you use CloudWatch Omni, the same data is also available by default in the Omni space for that account and Region. For more information, see Analyze profiles in CloudWatch Omni.
To send profile data from your applications, you need a profiler that produces OTLP profile data. You also need a way to send that data to CloudWatch, such as the CloudWatch agent, an OpenTelemetry Collector, or a direct request to the CloudWatch OTLP endpoint. For your options, see Publish profile data to Amazon CloudWatch. For step-by-step tutorials that set up a profiler and the CloudWatch agent on Amazon EC2 or Kubernetes, see Tutorials: Profile Java applications.