Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

winston-elasticsearch-apm

Package Overview
Dependencies
Maintainers
3
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-elasticsearch-apm

Winston transport to send error stacks to Elasticsearch APM

  • 1.0.6
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
67
decreased by-17.28%
Maintainers
3
Weekly downloads
 
Created
Source

winston-elasticsearch-apm

Winston transport to send error stacks to Elasticsearch APM

Install

npm install winston-elasticsearch-apm --save

Usage

Winston@3

var winston = require('winston');
var ElasticsearchApm = require('winston-elasticsearch-apm');

var apm = require('elastic-apm-node').start({
  serviceName: 'app',
  serverUrl: 'http://localhost:8200',
});

var logger = winston.createLogger({
	transports: [
		new ElasticsearchApm({ apm: apm })
	]
});

logger.log({ level: "error", message: err });

Winston@2

var winston = require('winston');
var ElasticsearchApm = require('winston-elasticsearch-apm/legacy');

var apm = require('elastic-apm-node').start({
  serviceName: 'app',
  serverUrl: 'http://localhost:8200',
});

var logger = new winston.Logger();
logger.add(ElasticsearchApm, { apm: apm });

logger.error(err);

Options

  • apm: A predefined Elasticsearch APM object (Required)

Tests

A running APM server is required to run tests

npm test

Keywords

FAQs

Package last updated on 07 Aug 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc