
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
telemetry-events-trace
Advanced tools
Stability: 1 - Experimental
Helper for creating and emitting TelemetryEvents for tracing.
npm install telemetry-events-trace
To run the below example run:
npm run readme
"use strict";
const events = require("events");
const pkg = require("../package.json");
const TelemetryEvents = require("telemetry-events");
const TraceTelemetryEvents = require("../index.js");
const emitter = new events.EventEmitter();
const telemetry = new TelemetryEvents(
{
emitter,
package: pkg
}
);
const tracing = new TraceTelemetryEvents(
{
telemetry
}
);
emitter.on("telemetry", event => console.dir(event));
let rootSpan1 = tracing.trace("rootSpan1", undefined, {user: "tristan"});
setTimeout(() => rootSpan1.finish(), 5);
let rootSpan2 = tracing.trace("rootSpan2", {server: "001"}, {user: "tristan"});
let childSpan1 = rootSpan2.childSpan("childSpan1", {db: "020"});
let childSpan2 = rootSpan2.childSpan("childSpan2", {db: "021"});
let childSpan3 = childSpan1.childSpan("childSpan3");
let childSpan4 = childSpan2.followingSpan("childSpan4", {consumer: "me"});
childSpan4.tags(
{
"some": "tag",
"some_other": "tag"
}
);
let headers = childSpan3.inject("http_headers", {});
console.log(headers);
let extractedSpan = tracing.extract("http_headers", headers);
let childSpan5 = extractedSpan.childSpan("childSpan5");
childSpan5.tag("error", true);
setTimeout(() => childSpan3.finish(), 10);
setTimeout(() => childSpan2.finish(), 11);
setTimeout(() => childSpan1.finish(), 12);
setTimeout(() => rootSpan2.finish(), 13);
setTimeout(() => childSpan4.finish(), 22);
setTimeout(() => childSpan5.finish(), 20);
No tests at this time.
Public API
config: Object
telemetry: Object TelemetryEvents instance.Creates a new TraceTelemetryEvents instance.
type: String One of ["http_headers", "text_map"]carrier: Object JavaScript object to extract span from.Creates a localy copy of the parent span extracted from the carrier. This local Span instance can then be used to generate child or following spans.
name: String Operation name to trace.tags: Object (Default: {}) Tags to attach to the span.baggage: Object (Default: {}) Baggage to attach to all the spans in the trace.start: Date (Default: new Date()) Start time.Creates a root span.
name: String Operation name to trace.tags: Object (Default: {}) Tags to attach to the span.baggage: Object (Default: {}) Baggage to attach to this and all following spans in the trace.start: Date (Default: new Date()) Start time.Creates a child span that has a childOf reference to the span.
finish: Date (Default: new Date()) Finish time.Finishes the span and emits a trace telemetry event.
name: String Operation name to trace.tags: Object (Default: {}) Tags to attach to the span.baggage: Object (Default: {}) Baggage to attach to this and all following spans in the trace.start: Date (Default: new Date()) Start time.Creates a child span that has a followsFrom reference to the span.
type: String One of ["http_headers", "text_map"]carrier: Object JavaScript object to inject span information into.carrier with injected span information.Injects span information into the carrier.
key: String Tag key.value: String Tag value.Creates or updates a tag in a span.
tags: Object Keys and values of tags to create or update.Creates or updates tags in a span.
We follow semantic versioning policy (see: semver.org):
Given a version number MAJOR.MINOR.PATCH, increment the:
MAJOR version when you make incompatible API changes,
MINOR version when you add functionality in a backwards-compatible manner, and
PATCH version when you make backwards-compatible bug fixes.
caveat: Major version zero is a special case indicating development version that may make incompatible API changes without incrementing MAJOR version.
FAQs
Helper for creating and emitting telemetry trace events.
The npm package telemetry-events-trace receives a total of 7 weekly downloads. As such, telemetry-events-trace popularity was classified as not popular.
We found that telemetry-events-trace demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.