Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
iopipe-plugin-trace
Advanced tools
Create marks and measures for arbitrary units of time. Measure latency of database calls, third party requests, or code blocks and visualize them in IOpipe!
4.3.2
2.14.12
0.8.0
With yarn (recommended) in project directory:
yarn add iopipe-plugin-trace
With npm in project directory:
npm install iopipe-plugin-trace
Then include the plugin with IOpipe in your serverless function:
const iopipeLib = require('iopipe');
const tracePlugin = require('iopipe-plugin-trace');
const iopipe = iopipeLib({
plugins: [tracePlugin()]
});
// wrap your lambda handler
exports.handler = iopipe((event, context) => {
context.iopipe.mark.start('database');
// after database call is finished
context.iopipe.mark.end('database');
context.iopipe.mark.start('analytics');
// after analytics call is finished
context.iopipe.mark.end('analytics');
context.succeed('Wow!');
});
// create the start mark
// the string argument is a name you are assigning the particular trace
context.iopipe.mark.start('db');
// create the end mark
// pass the name of the trace that you want to end
context.iopipe.mark.end('db');
// create an custom measurement between start:init and end:db
context.iopipe.measure('custom', 'init', 'db');
autoMeasure
(bool: optional = true)By default, the plugin will create auto-measurements for marks with matching mark.start
and mark.end
. These measurements will be displayed in the IOpipe Dashboard. If you'd like to turn this off, set autoMeasure: false
.
const iopipe = iopipeLib({
plugins: [tracePlugin({
autoMeasure: false
})]
});
npm run eslint -- --fix
to auto-format the code before submitting pull requests.FAQs
IOpipe plugin for tracing metrics
The npm package iopipe-plugin-trace receives a total of 6 weekly downloads. As such, iopipe-plugin-trace popularity was classified as not popular.
We found that iopipe-plugin-trace demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.