npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rio-cloud/cdk-v2-constructs

v6.13.4

Published

CDK constructs to build RIO flavored CI/CD pipeline in AWS.

Downloads

13,474

Readme

RIO CDK Constructs

This package contains CDK2 constructs for RIO teams.

NPM: @rio-cloud/cdk-v2-constructs

Bootstrapping of CDK project

$ npx cdk init --language typescript

Installation

$ npm install --save @rio-cloud/cdk-v2-constructs

See also

Internal documentation for library devs

Documentation

Constructs overview (Under construction...)

Watchful

Watchful constructs help generate some default monitors based on the resources defined in your stack. E.g. - If your stack contains a lambda function, and you configure watchful construct, then it will create out of box metric monitors for Throttling, Lambda error and Log error monitors. The ever-growing list of resources that watchful creates monitors for as of today are:

  • Application load balancer
  • Cloudfront
  • Documentdb
  • Dynamodb
  • Fargate
  • Lambda
  • RDS

Simply add the following to your CDK stack to get started.

  import * as rio from '@rio-cloud/cdk-v2-constructs';
    ...
    const dw = new rio.watchfulv2.Watchful(this, 'Watchful', {
      serviceName,
    });
    dw.watchScope(this); // Generates alarms for all supported resources
    ...

There are options to override some defaults too. Please be aware that the library is very opinionated and is written with the most general use cases in mind. It is necessary to keep the use of the library simple enough, which means that there is only limited flexibility regarding the configuration options. Having said that, feel free to reach out to team CLAID over slack #rio-platform-support in case of feature requests.

The broad classification of the monitors created by watchful are

  • Log error monitors
  • Metrics Query monitors: Basically everything other than log error monitors

For Metrics query monitors, you can configure the priority (defaults as 3). For log error monitors, you can configure priority, renotification interval and can configure if the auto close of the monitor is disabled.

    ...
    const dw = new Watchful(stack, 'Watchful2', { 
      logErrorMonitorConfig: {
        disableAutoClose: true, 
        renotifyInterval: 150,
        priority: 4,
      },
      queryErrorMonitorConfig: {
        priority: 4
      }
    });
    dw.watchScope(stack);

There is an overrideAlarmThreshold method which can be used to override the default watchful thresholds. Please make sure to use the method before the watchscope function. E.g. -

...
const dw = new Watchful(stack, 'Watchful', {});
dw.overrideAlarmThreshold({
  monitoredResourceScope: lambdaA,
  monitorType: MonitorType.ERRORS,
  threshold: 5,
});
dw.watchScope(stack);

ClassifyPipelineType

The pipelines can be tagged with key 'pipeline_type' to the following values:

  • deploy: To tag the production pipeline releasing the application
  • branch: The branch pipeline. Mostly used to test contributions / renovate updates
  • vulnerability: The vulnerability pipeline

The construct ClassifyPipelineType can be used to tag the pipeline accordingly. This tag is also picked up by the Datadog pipeline metric used to monitor the pipelines. It is added as a tag to the metric. This gives you more flexibility with managing the monitors also. E.g. some teams don't want to get alerted for branch pipelines. You can then leverage this metric tag to filter the pipelines.

Example:

const pipeline = new pipelines.CodePipeline(this, 'Pipeline', {
      ...
    });
rio.ClassifyPipelineType.apply(pipeline, rio.RioPipelineType.DEPLOY);