Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@opentelemetry/winston-transport
Advanced tools
This module provides a Transport for winston
module to send Winston logging to the OpenTelemetry Logging SDK.
Compatible with OpenTelemetry JS API and SDK 1.0+
.
npm install --save @opentelemetry/winston-transport
This package exports the Winston transport class that is used to send records to the
OpenTelemetry Logs SDK. It can be used directly when configuring a Winston logger. If using
@opentelemetry/instrumenation-winston
package there is no need to instantiate the transport as the instrumentation will take care of that.
For example:
const logsAPI = require('@opentelemetry/api-logs');
const {
LoggerProvider,
SimpleLogRecordProcessor,
ConsoleLogRecordExporter,
} = require('@opentelemetry/sdk-logs');
const { OpenTelemetryTransportV3 } = require('@opentelemetry/winston-transport');
const winston = require('winston');
// To start a logger, you first need to initialize the Logger provider.
const loggerProvider = new LoggerProvider();
// Add a processor to export log record
loggerProvider.addLogRecordProcessor(
new SimpleLogRecordProcessor(new ConsoleLogRecordExporter())
);
logsAPI.logs.setGlobalLoggerProvider(loggerProvider);
const logger = winston.createLogger({
level: 'info',
transports: [
new winston.transports.Console(),
new OpenTelemetryTransportV3()
]
});
[!IMPORTANT] Logs will be duplicated if
@opentelemetry/winston-transport
is added as a transport inwinston
and@opentelemetry/instrumentation-winston
is configured withdisableLogSending: false
.
winston
versions >=3.0.0 <4
Apache 2.0 - See LICENSE for more information.
FAQs
OpenTelemetry Transport for winston
The npm package @opentelemetry/winston-transport receives a total of 180,050 weekly downloads. As such, @opentelemetry/winston-transport popularity was classified as popular.
We found that @opentelemetry/winston-transport demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.