Skip to content

SYSTEM Cited by 1 source

Zalando Observability API package

What it is

@zalando/observability-api is the shared types + API package at the base of Zalando's OpenTelemetry SDK family. It contains the TypeScript types and abstract API surface that both runtime-specific SDKs ( Node, browser) implement (Source: sources/2024-07-28-zalando-opentelemetry-for-javascript-observability-at-zalando).

Why it matters

An isomorphic application โ€” one that runs both on the server (Node.js) and in the browser โ€” would otherwise need two separate instrumentation codebases, one per runtime. Zalando has many isomorphic apps, notably pages served by the Rendering Engine. By splitting types + APIs into a runtime-neutral package, instrumentation code can be written once and run unchanged on both targets, with each runtime's SDK adapter resolving the concrete implementation.

The post explicitly names this as the origin story: "Thanks to one of the early contributors to the Node.js SDK, we had already separated types and APIs into an independent package. This API package was then used to implement Node.js and web SDKs. This structure became especially useful while instrumenting isomorphic applications".

Package structure

@zalando/observability-api           # this package (types + API)
@zalando/observability-sdk-node      # Node implementation
@zalando/observability-sdk-browser   # browser implementation

The -api package is a lightweight peer/runtime dependency of both SDK packages.

Seen in

Last updated ยท 501 distilled / 1,218 read