New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@tuia/koa-cat

Package Overview
Dependencies
Maintainers
8
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tuia/koa-cat

koa-cat

latest
npmnpm
Version
0.0.4
Version published
Maintainers
8
Created
Source

koa-cat

Nodejs项目接入Cat监控

Installation

yarn add @tuia/koa-cat

Documentation

Middleware

使用中间件,捕获所有请求的数据

const koa = require('koa');
const koaCat = require('@tuia/koa-cat');

const pkg = require('./package.json');

const app = new koa();

const cat = koaCat({
  appkey: pkg.name
});

app.use(cat.middleware());

API

使用API,可灵活自由埋点

const koa = require('koa');
const koaCat = require('@tuia/koa-cat');

const pkg = require('./package.json');

const app = new koa();

const cat = koaCat({
  appkey: pkg.name
});

const a = cat.threadCat.newTransaction('Context', 'A');
setTimeout(function() {
  a.complete();
}, 1000)

Keywords

koa

FAQs

Package last updated on 05 Jun 2019

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