Skip to Content

Browser telemetry

Send OpenTelemetry from a web page to Everr with a public, origin-bound key. Hand the wiring to your agent, or set it up yourself.

Sendstraceslogsmetricserrors

Everr accepts OpenTelemetry (OTLP) straight from the browser. Because anything in a web page is visible to every visitor, browser ingestion uses a public key: safe to ship in page source because it only works from the origins you allowlist, and it can do nothing but send telemetry.

Mint a public key

In the Everr dashboard, open the user menu (top-left), click API keys, then New public key in the Public keys section.

  1. Enter a name and choose an expiration.
  2. Add every origin your app is served from, one per line, for example https://app.example.com. An origin is scheme://host with an optional port and no path.
  3. Click Create public key and copy the key.

To allow third-level domains such as https://tenant.example.com, use https://*.example.com or its shorthand *.example.com. The wildcard matches exactly one DNS label, with the same scheme and port.

To update the allowlist on an existing public key, select Edit origins on its row. The same key continues to work, and the change usually takes effect within 30 seconds.

Unlike secret keys, a public key can be copied again at any time: click Copy key on its row in the Public keys section, or click its prefix to see the full key. Public keys created before this was possible can't be shown again. To get a copyable one, create a new public key and rotate it in.

Let your agent wire it up

Everr ships the everr-setup-telemetry skill. Ask your agent to instrument the app with the key you just minted:

/everr-setup-telemetry Instrument this web app with the OpenTelemetry web SDK and send traces, logs, and metrics to Everr's browser ingest using my public key

The Agent installs @everr/otel-web, reads the key from an env var, and constructs the SDK at startup.

Alternative: wire it up by hand

Install @everr/otel-web and construct it once, before the app renders:

npm install @everr/otel-web
import { errors, interactions, network, pageviews, performance, WebSDK } from "@everr/otel-web";

new WebSDK({
  serviceName: "acme-web",
  ingestKey: "<your-public-key>",
  instrumentations: [errors(), pageviews(), interactions(), performance(), network()],
});

Capture is opt-in. The SDK records only what the listed instrumentations produce.

Anonymized by default

@everr/otel-web keeps nothing in the browser and sends no visitor or user identifier, unless you turn that on.

anonymized: true (default)anonymized: false
Cookiesnonenone
localStoragenever read or writteneverr.visitor.id and everr.session
everr.visitor.idnot sentrandom id, stable across visits
session.idrandom, in memory, ends with a pagestored, ends after 30 idle minutes
user.* from identify()not sentsent

Both modes send the same device attributes with every batch: the user agent, the screen size, the time zone, the browser language, and the landing URL. The SDK computes no identifier from them. Both modes also send whatever you add with setAttributes() or beforeSend.

Everr states what the SDK stores and sends. Whether your site needs a consent banner is your decision.

Start anonymized, and change the mode when the visitor decides. The change applies to the running SDK, with no reload:

import { setAnonymized, WebSDK } from "@everr/otel-web";

new WebSDK({
  serviceName: "acme-web",
  ingestKey: "<your-public-key>",
  anonymized: !hasConsent(),
  instrumentations: [pageviews()],
});

onConsentGranted(() => setAnonymized(false));
onConsentWithdrawn(() => setAnonymized(true));

setAnonymized(false) keeps the current session.id and adds the visitor id. setAnonymized(true) sends the queued records, then deletes the two stored keys and starts a new session.id, so the later records do not join the earlier ones.

Identify a signed-in user

Call identify() when the user signs in, in either mode. While the SDK is anonymized it keeps the user in memory and sends nothing. The user.* attributes go out from the next record after setAnonymized(false).

import { clearIdentity, identify } from "@everr/otel-web";

identify("u_123", { plan: "pro" });

// On sign-out: forget the user, the visitor id, and the session.
clearIdentity();

Use another OpenTelemetry SDK

Point any OpenTelemetry web SDK at Everr with the key as a bearer token:

import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
import { BatchSpanProcessor, WebTracerProvider } from "@opentelemetry/sdk-trace-web";

const exporter = new OTLPTraceExporter({
  url: "https://ingest.everr.dev/v1/traces",
  headers: { Authorization: "Bearer <your-public-key>" },
});

const provider = new WebTracerProvider({
  spanProcessors: [new BatchSpanProcessor(exporter)],
});
provider.register();

Logs and metrics work the same way with the matching exporters (/v1/logs, /v1/metrics). Requests from an origin that is not on the key's allowlist return 401 Unauthorized, and the SDK drops the batch.

Local development

The local Everr collector (started by everr local start) accepts browser OTLP at the otlp: URL printed by everr local start or everr local status, with no key and no origin setup. Public keys only matter for sending browser telemetry to Everr Cloud.