All Projects → iopipe → iopipe-js

iopipe / iopipe-js

Licence: Apache-2.0 license
Build and run serverless apps with confidence on AWS Lambda with Tracing, Profiling, Metrics, Monitoring, and more.

Programming Languages

shell
77523 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to iopipe-js

iopipe-go
Go agent for AWS Lambda metrics, tracing, profiling & analytics
Stars: ✭ 18 (-45.45%)
Mutual labels:  debugging, tracing, profiling, iopipe, iopipe-agent
iopipe-python
Python agent for AWS Lambda metrics, tracing, profiling & analytics
Stars: ✭ 77 (+133.33%)
Mutual labels:  tracing, profiling, iopipe, iopipe-agent
Elinux
嵌入式 Linux 知识库 (elinux.org) 中文翻译计划;本项目发起人发布了《360° 剖析 Linux ELF》视频课程,欢迎订阅:https://www.cctalk.com/m/group/88089283
Stars: ✭ 193 (+484.85%)
Mutual labels:  debugging, tracing, profiling
Tensor Sensor
The goal of this library is to generate more helpful exception messages for numpy/pytorch matrix algebra expressions.
Stars: ✭ 532 (+1512.12%)
Mutual labels:  debugging, tracing
Trace Nodejs
Trace is a visualised distributed tracing platform designed for microservices.
Stars: ✭ 471 (+1327.27%)
Mutual labels:  debugging, profiling
Re Frame 10x
A debugging dashboard for re-frame. X-ray vision as tooling.
Stars: ✭ 491 (+1387.88%)
Mutual labels:  debugging, tracing
Tapping device
TappingDevice makes objects tell you what they do, so you don't need to track them yourself.
Stars: ✭ 296 (+796.97%)
Mutual labels:  debugging, tracing
Epsagon Go
Automated tracing library for Go 1.x ⚡️
Stars: ✭ 24 (-27.27%)
Mutual labels:  debugging, serverless-functions
Ghostwheel
Hassle-free inline clojure.spec with semi-automatic generative testing and side effect detection
Stars: ✭ 556 (+1584.85%)
Mutual labels:  debugging, tracing
Mthawkeye
Profiling / Debugging assist tools for iOS. (Memory Leak, OOM, ANR, Hard Stalling, Network, OpenGL, Time Profile ...)
Stars: ✭ 1,119 (+3290.91%)
Mutual labels:  debugging, profiling
Rexbug
A thin Elixir wrapper for the redbug Erlang tracing debugger.
Stars: ✭ 126 (+281.82%)
Mutual labels:  debugging, tracing
Icebox
Virtual Machine Introspection, Tracing & Debugging
Stars: ✭ 422 (+1178.79%)
Mutual labels:  debugging, tracing
Clockwork Chrome
Clockwork - php dev tools integrated to your browser - Chrome extension
Stars: ✭ 415 (+1157.58%)
Mutual labels:  debugging, profiling
Iopipe Js Core
Observe and develop serverless apps with confidence on AWS Lambda with Tracing, Metrics, Profiling, Monitoring, and more.
Stars: ✭ 123 (+272.73%)
Mutual labels:  debugging, profiling
Pdt
PHP Development Tools project (PDT)
Stars: ✭ 135 (+309.09%)
Mutual labels:  debugging, profiling
Clockwork
Clockwork - php dev tools in your browser - server-side component
Stars: ✭ 4,076 (+12251.52%)
Mutual labels:  debugging, profiling
Viztracer
VizTracer is a low-overhead logging/debugging/profiling tool that can trace and visualize your python code execution.
Stars: ✭ 874 (+2548.48%)
Mutual labels:  debugging, profiling
elixir-fire-brigade-workshop
Workshop "Join the Elixir Fire Brigade - Level-up Your Elixir Debugging Skills" (ElixirConf US 2017)
Stars: ✭ 14 (-57.58%)
Mutual labels:  debugging, tracing
kokkos-tools
Kokkos C++ Performance Portability Programming EcoSystem: Profiling and Debugging Tools
Stars: ✭ 52 (+57.58%)
Mutual labels:  debugging, profiling
Training Material
A collection of code examples as well as presentations for training purposes
Stars: ✭ 85 (+157.58%)
Mutual labels:  debugging, profiling

Special Announcement: We've Joined New Relic Serverless! Get ready to function faster with full visibility into your serverless applications—and everything else. Read our founders' note to learn more.

IOpipe Agent & Bundled Plugins

npm version Slack semantic-release

This package provides the IOpipe agent and plugins pre-bundled.

Installation & usage

Install via npm:

npm install --save @iopipe/iopipe

Or via yarn:

yarn add @iopipe/iopipe

Then require this module, passing it an object with your project token (get a free account), and it will automatically monitor and collect metrics from your applications running on AWS Lambda.

If you are using the Serverless Framework to deploy your lambdas, check out our serverless plugin.

Example:

const iopipe = require('@iopipe/iopipe')({ token: 'PROJECT_TOKEN' });

exports.handler = iopipe((event, context) => {
  context.succeed('This is my serverless function!');
});

By default this package will enable @iopipe/trace and @iopipe/event-info plugins. It also includes the @iopipe/profiler plugin, which is disabled by default. For more information on how to use IOpipe and these plugins, see the documentation below:

Example With Tracing, Custom Metrics, and Labels (ES6 Module Format):

import iopipe, {mark, metric, label} from '@iopipe/iopipe';

exports.handler = iopipe()(async (event, context) => {
  // add a trace measurement for the database call
  mark.start('db-call');
  // fetch some data from the database
  const rows = await sql(`select * from dogs where status = 'goodboy'`);
  mark.end('db-call');

  // add a custom metric for IOpipe search and alerts
  metric('rows-from-db', rows.length);

  // add a label to this invocation for easy filter/sort on dashboard.iopipe.com
  label('used-db-cache');

  context.succeed('This is my serverless function!');
});

Lambda Layers

IOpipe publishes AWS Lambda Layers which are publicly available on AWS. Using a framework that supports lambda layers (such as SAM or Serverless), you can use the following ARNs for your runtime:

  • nodejs10.x: arn:aws:lambda:$REGION:146318645305:layer:IOpipeNodeJS10:$VERSION_NUMBER
  • nodejs8.10: arn:aws:lambda:$REGION:146318645305:layer:IOpipeNodeJS810:$VERSION_NUMBER

Where $REGION is your AWS region and $VERSION_NUMBER is an integer representing the IOpipe release. You can get the version number via the Releases page.

Then in your SAM template (for example), you can add:

Globals:
  Function:
    Layers:
        - arn:aws:lambda:us-east-1:146318645305:layer:IOpipeNodeJS810:1

And the IOpipe library will be included in your function automatically.

You can also wrap your IOpipe functions without a code change using layers. For example, in your SAM template you can do the following:

Resources:
  YourFunctionHere:
    Type: 'AWS::Serverless::Function'
    Properties:
      CodeUri: path/to/your/code
      # Automatically wraps the handler with IOpipe
      Handler: @iopipe/iopipe.handler
      Runtime: nodejs8.10
      Environment:
        Variables:
          # Specifies which handler IOpipe should run
          IOPIPE_HANDLER: path/to/your.handler

Or with the Serverless framework:

functions:
  your-function-here:
    environment:
        IOPIPE_HANDLER: path/to/your.handler
    handler: @iopipe/iopipe.handler
    layers:
      - arn:aws:lambda:us-east-1:146318645305:layer:IOpipeNodeJS810:1
    runtime: nodejs8.10

Troubleshooting

Lambda layers: Lambda can't find the file @iopipe/iopipe.js

If you're seeing this error, it's likely that the node runtime isn't resolving NPM_PATH for the @iopipe/iopipe module in /opt/nodejs/node_modules.

These steps should fix the problem:

  1. Create an iopipe_wrapper.js script in your project's root.
  2. The script's contents should be module.exports = require('@iopipe/iopipe');. (And that's all that needs to be in it.)
  3. Update the handler for your layer declaration to iopipe_wrapper.handler.

License

Apache 2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].