npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pragmasa/winston-otel-pragma-logs-v2

v1.0.1

Published

OTEL - Winston implementation tracing for aws node lambdas

Downloads

78

Readme

winston-otel-pragma-logs

Description

An OpenTelemetry (OTEL) implementation for Winston that provides tracing for AWS Lambda functions in Node.js.

Installation

npm i @pragmasa/winston-otel-pragma-logs-v2

Requirements

This package has the following peer dependencies:

  • @opentelemetry/api: ^1.9.0
  • @opentelemetry/auto-instrumentations-node: ^0.52.0
  • @opentelemetry/exporter-trace-otlp-http: ^0.52.0
  • @opentelemetry/instrumentation-aws-lambda: ^0.52.0
  • @opentelemetry/resources: ^1.19.0
  • @opentelemetry/sdk-node: ^0.52.1
  • @opentelemetry/semantic-conventions: ^1.19.0
  • winston: ^3.17.0

Usage

Basic Configuration

import { logger, wrapLambdaHandler } from 'winston-otel-pragma-logs';

// Original Lambda function
const myHandler = async (event, context) => {
  // Log a message with tracing information
  logger.info('Processing event', { action: { eventData: event } });
  
  // Your business logic here
  const result = await processData(event);
  
  logger.info('Processing completed', { action: { result: result } });
  return result;
};

// Export the wrapped handler with tracing
export const handler = wrapLambdaHandler(myHandler);

Environment Variables Configuration

The package uses the following environment variables:

  • OTEL_EXPORTER_OTLP_ENDPOINT: URL of the endpoint to export OTLP traces (e.g., "https://api.honeycomb.io/v1/traces")
  • OTEL_SERVICE_NAME: Service name to identify your application in traces (default: "default-lambda")

Log Format

The generated logs automatically include tracing information in JSON format:

{
  "timestamp": "2023-06-15T12:34:56.789Z",
  "tracing": {
    "traceId": "abcdef1234567890abcdef1234567890",
    "spanId": "abcdef1234567890"
  },
  "level": "info",
  "message": "Log message",
  "data": {
    "key": "value",
    "otherData": 123
  }
}

Features

  • Automatic integration of Winston with OpenTelemetry
  • Wrapper for Lambda functions that automatically creates spans
  • Automatic correlation between logs and traces
  • Automatic instrumentation for AWS Lambda and other Node.js libraries
  • Export traces to any OTLP-compatible backend

Spanish Documentation

For Spanish documentation, please see README.es.md.

License

Developed by [email protected]