Scan your whole stack
From OX Research Newsroom
Are you using @mark1russell7/otel-ts?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.10.4
@mark1russell7/otel-ts was last scanned on 26 Nov 2026 at version 0.10.4. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.10.4 LATEST | 26 Nov 2026 | No rules fired |
| 0.10.3 | 26 Nov 2026 | No rules fired |
| 0.10.2 | 26 Nov 2026 | No rules fired |
| 0.10.1 | 26 Nov 2026 | Not shown |
| 0.10.0 | 26 Nov 2026 | Not shown |
Findings for v0.10.4. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.10.4; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
OpenTelemetry and Grafana Faro for TypeScript web apps, with one init() call.
Try the live lab. It starts the real init() in your browser, and it shows each span, metric and log record as it leaves the package. The data stays in your browser.
Install the package from npm:
pnpm add @mark1russell7/otel-ts
The npm package contains the compiled dist/ folder. You do not need a build step.
import { init } from "@mark1russell7/otel-ts";
const otel = init({
serviceName: "checkout-web",
serviceVersion: "1.4.0",
endpoint: "https://otel.example.com",
});
const meter = otel.getMeter("checkout");
meter.createHistogram("checkout.duration", { unit: "ms" }).record(120);
init() starts traces, metrics and logs. It sends them to endpoint with OTLP over HTTP. The paths are /v1/traces, /v1/metrics and /v1/logs.
init() also does these steps:
service.instance.id for each init() call.session.id attribute to each log record and to each span.faroCollectorUrl.init from another entry. Refer to Context manager.init() also runs in Web Workers. There, it does not start the parts that need a DOM.
| Option | Type | Default | Description |
|---|---|---|---|
endpoint |
string |
"http://localhost:4318" |
The OTLP HTTP endpoint. |
serviceName |
string |
"frontend-app" |
The service.name resource attribute. |
serviceVersion |
string |
"0.0.0" |
The service.version resource attribute. |
serviceInstanceId |
string |
A new random UUID v4 for each init() call |
The service.instance.id resource attribute. Refer to Writer identity. |
contextManager |
"async" \| "stack" \| ContextManager |
"async" |
The context manager of the tracer provider. The zone and core entries have other values. Refer to Context manager. |
browserAttributes |
boolean |
true |
Puts browser.brands, browser.platform, browser.mobile, browser.language and user_agent.original (semantic conventions) on the resource, from navigator. The attributes of resourceAttributes replace them when the key is the same. |
resourceAttributes |
Record<string, string> |
{} |
More resource attributes. They replace the attributes above when the key is the same. |
tracing |
boolean |
true |
Starts the trace provider. |
propagateTraceHeaderCorsUrls |
Array<string \| RegExp> |
[] (the origin of the page only) |
The other origins that get trace context headers. Requests to the origin of the page always get them. Refer to Trace headers to other origins. |
metrics |
boolean |
true |
Starts the meter provider. |
metricsExportIntervalMs |
number |
15000 |
The time between two metric exports, in milliseconds. Refer to Metric export. |
metricsTemporality |
"cumulative" \| "delta" |
"cumulative" |
The aggregation temporality that the OTLP metric exporter requests. |
histogramAggregation |
"explicit" \| "exponential" |
"explicit" |
The aggregation for histogram instruments. Refer to Histograms. |
logs |
boolean |
true |
Starts the logger provider. |
instrumentDocumentLoad |
boolean |
true |
Records document-load spans. This instrumentation needs a DOM. |
instrumentFetch |
boolean |
true |
Records a span for each fetch() request. |
instrumentXhr |
boolean |
true |
Records a span for each XMLHttpRequest request. |
instrumentUserInteraction |
boolean |
true |
Records user-interaction spans. This instrumentation needs a DOM. |
instrumentLongTask |
boolean |
true |
Records long-task spans. |
faro |
boolean |
true |
Starts Grafana Faro. Faro also needs faroCollectorUrl and a DOM. Refer to Grafana Faro. |
faroCollectorUrl |
string |
Not set | The Faro collector URL. Without this URL, Faro does not start. |
faroAppName |
string |
The serviceName value |
The Faro app name. |
sessionTracking |
boolean |
true |
Keeps the session ID in sessionStorage. Refer to Sessions. |
debug |
boolean |
false |
Writes the configuration to the console when init() runs. |
The fetch and XHR instrumentations add the trace context headers (traceparent) to the requests to the origin of the page. A request to another origin gets them only when propagateTraceHeaderCorsUrls has a match for its URL. A custom header makes the browser send a CORS preflight, so each origin in the list must allow traceparent in Access-Control-Allow-Headers. Otherwise the browser refuses the request.
To join the spans of your API on another origin to the trace of the page, give that origin:
init({ propagateTraceHeaderCorsUrls: [/^https:\/\/api\.example\.com\//] });
Before 0.2.0, the default was [/.*/]: each cross-origin request got the headers, and third-party servers without traceparent in their CORS headers refused the requests.
| Member | Description |
|---|---|
forceFlush(): Promise<void> |
Exports all pending telemetry now. The providers continue to run. |
shutdown(): Promise<void> |
Exports all pending telemetry and stops all providers. A second call returns the same promise. |
onBeforeFlush(listener: (cause: FlushCause) => void): () => void |
Adds a function that runs before each flush. It gets the lifecycle transition that started the flush, if any. Refer to Record values before a flush. |
getSessionId(): string |
Returns the current session ID. |
getMeter(name: string): Meter |
Returns a Meter for counters, histograms and gauges. |
getLogger(name: string): Logger |
Returns a Logger for log records. |
The context manager keeps the active span. A span that starts while a span is active gets the active span as its parent. Set the manager with the contextManager option.
zone.js and async-browser-context patch the same functions with different rules. Thus, they cannot share a page. The package has three entries, and each entry loads one context library or none:
| Entry | Context library | contextManager values |
Default |
|---|---|---|---|
@mark1russell7/otel-ts |
async-browser-context | "async", "stack", a ContextManager |
"async" |
@mark1russell7/otel-ts/zone |
zone.js | "zone", "stack", a ContextManager |
"zone" |
@mark1russell7/otel-ts/core |
None | "stack", a ContextManager |
"stack" |
Each entry exports the same API. Only init() and the types OtelTsConfig and ContextManagerOption are different. Import from one entry in an app.
If you give a name that the entry does not have, init() throws an error before it starts. The error tells you which entry has the name. For example, "zone" in @mark1russell7/otel-ts gives this error:
[otel-ts] contextManager: "zone" is not available in "@mark1russell7/otel-ts". This entry loads async-browser-context, and zone.js and async-browser-context cannot share a page: they patch the same functions with different rules. Import init from "@mark1russell7/otel-ts/zone" in place of "@mark1russell7/otel-ts". Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.