Skip to content
PluginStats

otel-zoneless-context weekly downloads statistics

By adityareddy-dev · npm · Webpack plugins

OpenTelemetry context manager for the browser without zone.js, plus a bundler plugin that rewrites the awaits in your code so the active context comes back after each one

View on npm Outdated · Nov 14, 2026

otel-zoneless-context has 8 recorded weekly downloads on npm, a decrease of 46.7% over the past 30 days, ranking #3182 of 3,247 tracked listings.

Weekly downloads
8
Official API · Dec 5, 2026
7-day growth
-20.0%
-2 weekly downloads
30-day growth
-46.7%
-7 weekly downloads
90-day growth
—
Insufficient history
Rank
#3182
▼ 213 in 7 days

About otel-zoneless-context

otel-zoneless-context

An OpenTelemetry context manager for the browser, no zone.js, that keeps concurrent flows apart across a native await in code the plugin rewrites, as of 2026-10-08. Zoneless managers already exist. Splunk's RUM SDK and Elastic's EDOT browser both ship one, and they carry the context by patching Promise.prototype.then and the callback APIs. A native await on a native promise doesn't go through the patched then though, so the context is gone after the first await. What this package adds is a bundler plugin that rewrites each await in your code to put the context back when the function resumes. The manager itself is a changed copy of the Apache-2.0 SplunkContextManager from splunk-otel-js-web, see Credit.

Use

npm install otel-zoneless-context
import { WebTracerProvider } from '@opentelemetry/sdk-trace-web'
import { ZonelessContextManager } from 'otel-zoneless-context'

const provider = new WebTracerProvider({ spanProcessors: [/* yours */] })
provider.register({ contextManager: new ZonelessContextManager() })

Then the plugin, here for Vite:

// vite.config.js
import { vite as zonelessContext } from 'otel-zoneless-context/plugin'

export default {
  plugins: [zonelessContext()],
}

otel-zoneless-context/plugin also exports rollup, webpack, esbuild, rspack and rolldown, and I haven't tested the last two. Options are include and exclude, a RegExp or a list of them. By default every .js, .mjs, .ts, .mts, .jsx and .tsx file outside node_modules gets rewritten. runtime sets where the helpers get imported from. The manager takes { patch: false } to leave the browser APIs alone.

What the plugin does

This:

async function load(id) {
  const res = await fetch(`/items/${id}`)
  return res.json()
}

comes out as:

import { settle as __ctxSettle, take as __ctxTake, save as __ctxSave, current as __ctxCurrent, restore as __ctxRestore } from "otel-zoneless-context/runtime";async function load(id) {let __ctxValue, __ctxBack;
  const res = __ctxTake((__ctxValue = __ctxSettle(fetch(`/items/${id}`)), __ctxBack = __ctxSave(), __ctxValue = await __ctxValue, __ctxBack(), __ctxValue))
  return res.json()
}

It runs before TypeScript and JSX are compiled and takes every async function, top level await and for await included. Files with no await are left alone.

Results

Run on 2026-10-09 on Windows in headless Chromium 156.0.8078.4 with @opentelemetry/api 1.9.1, @opentelemetry/sdk-trace-web and @opentelemetry/context-zone 2.12.0, zone.js 0.16.3, built with esbuild 0.28.2 to esnext so every await stays native. Every case except #5914 runs two flows, A and B, at the same time on timers that cross, and after each await checks that the active context is still its own. The leak row checks from code outside both flows that it sees no context at all. The #5914 row is the repro from that issue with the same function names, its console logs swapped for a check that the repro span is active.

casestack managerzone managerthis one, plugin offthis one, plugin on
#59144/64/64/66/6
two flows2/82/82/88/8
leak3/33/33/33/3
try catch finally0/60/60/66/6
for loop0/60/60/66/6
for await0/80/80/88/8
nested async arrow0/60/60/66/6
Promise.all0/40/40/44/4
class method0/40/40/44/4
startActiveSpan0/40/40/44/4
.then callback0/62/62/66/6
library callback0/40/40/42/4
reject and resolve in one task, reject first0/20/20/22/2
reject and resolve in one task, resolve first0/20/20/22/2

In #5914 the three others lose the span at test2 and general.end, the same two steps the issue reports. CI runs all of it on pushes to main and on pull requests and prints these tables in the log, the Node ones in their own job. Node has no window, so nothing gets patched there and the .then row stays at 2/6. Built through Rollup 4.64.3 and Vite 8.3.4 the plugin gets the same Node numbers as through esbuild, and through webpack 5.111.1 too. The tests assert the misses of the other managers too, so if one of them starts keeping the context the run goes red and this table gets fixed.

What it misses

  • A library the plugin doesn't rewrite, which awaits and then calls back into your code. The callback saw no context in the test (the library callback row).
  • setTimeout with a delay over 34 ms doesn't carry the context. That's Splunk's cut-off and I kept it.
  • Each await gets one more promise and a closure. I haven't measured what that does to a real app.
  • Angular CLI's default builder. I tried Angular 22.2.2 with @angular-builders/custom-esbuild 22.0.1 on 2026-10-09 and nothing got rewritten. That builder adds plugins after Angular's own compiler plugin, and that one loads every .ts and .js file itself, so this plugin never sees the code. The older webpack builder (@angular-devkit/build-angular:browser) turns async functions into generators, which go through the patched then. In the same scratch app built that way the manager kept the context with nothing rewritten, 13 of 13 checks on the #5914 steps and two flows.
  • Not tested yet: rspack, rolldown, yield inside an async generator, async code downleveled to generators, and the plugin over node_modules.

Credit…

Description from the npm listing.

  • opentelemetry
  • context-manager
  • zoneless
  • async-await
  • browser
  • vite-plugin
  • rollup-plugin
  • webpack-plugin
  • esbuild-plugin

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

otel-zoneless-context weekly downloads on npm, last 90 days: 8 weekly downloads as of Dec 5, 2026.otel-zoneless-contextWeekly downloads on npm · Last 90 days8downloads / week0100200300400500Sep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
otel-zoneless-context weekly downloads on npm, last 90 days: 8 weekly downloads as of Dec 5, 2026.

7/30/90-day growth

otel-zoneless-context weekly downloads growth on npm: -20.0% over 7 days, -46.7% over 30 days, 90-day growth unavailable.otel-zoneless-contextWeekly downloads growth on npm8downloads / week now7-day growth-2 weekly downloads-20.0%30-day growth-7 weekly downloads-46.7%90-day growth+8 weekly downloadsInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
otel-zoneless-context weekly downloads growth on npm: -20.0% over 7 days, -46.7% over 30 days, 90-day growth unavailable.

Ranking history

otel-zoneless-context npm ranking history: currently #3182 (by weekly downloads).otel-zoneless-contextnpm ranking · by weekly downloads · Last 90 days#3182current rank#1400#1600#1800#2000#2200#2400#2600#2800#3000#3200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 32 observations · Updated Dec 5, 2026pluginstats.com
otel-zoneless-context npm ranking history: currently #3182 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,083 shown · page 160, #4 (overall #3,184)
All npm: every listing in weekly downloads order

Listing placement

Webpack plugins349 listings · 18 pages · page 17, #19 (overall #339)
Webpack plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (156)
Recent weekly downloads observations for otel-zoneless-context
Date (UTC)Weekly downloadsChange vs. previous
80
8-1
9+6
3-1
4-2
6-3
9-1
10-3
13+1
120
120
12+2
10+4
6—

Similar npm Webpack plugins plugins

All 20 otel-zoneless-context alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/otel-zoneless-context. First seen Oct 18, 2026; last successful collection Nov 14, 2026. See the methodology.