You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

cdk-apprunner-metrics

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cdk-apprunner-metrics

This AWS CDK construct export the default metrics created by the App Runner Service, you can use them to create dashboards or alarms.

1.1.0
latest
Source
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

AWS App Runner Metrics

This AWS CDK construct export the default metrics created by the App Runner Service, you can use them to create dashboards or alarms.

Requirements To use this construct, you'll need the following:

  • An AWS account with the necessary permissions to create AWS AppRunner and AWS CloudFormation resources.
  • AWS CDK v2 installed and configured on your development machine.
  • Node.js and TypeScript installed on your development machine.

Getting Started

To get started with this library, follow these steps:

  • Install the library in your AWS CDK project by running the following command:
npm install cdk-apprunner-metrics

or, with yarn:

yarn add cdk-apprunner-metrics
  • Import it in your CDK stack:
import { AppRunnerMetrics } from "cdk-apprunner-metrics";
  • Instantiate the CfnService construct in your AWS CDK stack and provide the required parameters:
const service = new apprunner.CfnService(this, "AppRunnerService", {
  serviceName: id,
  /** Other config... **/
});
  • Get the metric you desire:
const http2xxCountMetric = AppRunnerMetrics.http2xxResponseCount(service);
const http4xxCountMetric = AppRunnerMetrics.http4xxResponseCount(service);
const http5xxCountMetric = AppRunnerMetrics.http5xxResponseCount(service);
const requestLatencyMetric = AppRunnerMetrics.requestLatency(service);
const activeInstancesMetric = AppRunnerMetrics.activeInstances(service);
const cpuUtilizationMetric = AppRunnerMetrics.cpuUtilization(service);
const memoryUtilizationMetric = AppRunnerMetrics.memoryUtilization(service);
const concurrencyMetric = AppRunnerMetrics.concurrency(service);
  • You can use your metrics on whatever place you like.

Keywords

AppRunner

FAQs

Package last updated on 22 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts