Socket
Book a DemoInstallSign in
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

latest
npmnpm
Version
1.0.6
Version published
Maintainers
3
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

winston

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.