libraryPackage manifestv5.0.5

lib.observability

OpenTelemetry-based observability primitives

@lssm-tech/lib.observability
Source, release and verification context

Source snapshot bcc79fcc · Declared package version 5.0.5. This page combines the checked-in package guide and manifest; commands and runtime behavior were not executed in this review.

Package source ↗ Manifest ↗
servernode
EXPLORE THE PACKAGE

See where this package fits.

Follow a declared connection, inspect an import, then open the source guide when you need the detail.

THIS PACKAGElib.observabilityplatform

Arrows point from a package to its direct dependency. Each count is derived from the captured manifests.

17 declaraciones · se muestran las primeras 6SELECT TO INSPECT

@lssm-tech/lib.observability

./signals owns the canonical signal and evidence declaration family. Its signal-spec, evidence-record and database-signals leaves preserve the existing schemas, canonical identifiers, validation errors and DocBlocks. Historical ContractSpec signal imports forward to these same implementations. These entries validate supplied observations; they do not emit telemetry, persist evidence, evaluate current policy or authorize actions. Emission and tenant-scoped evidence ports remain in the existing instrumentation facade.

The local no-emit typecheck uses the repository common root to check the RuntimeCore compatibility fixture alongside this package's sources. Production declaration builds select tsconfig.build.json, retaining rootDir: src and excluding tests, specs and test-only directories from emitted declarations. The source typecheck still includes these fixtures through tsconfig.json; packed-consumer qualification retains its own package boundaries.

Website: https://contractspec.io

OpenTelemetry-based observability primitives.

What It Provides

  • Capa: lib.
  • Consumers: evolution, progressive-delivery, bundles.
  • src/pipeline/ contains pipeline stages and orchestration helpers.
  • ObservabilityPort and ErrorReportingPort expose vendor-neutral OTel signal contracts. Privacy filtering removes secret, raw payload, and personal fields by default, including separator, case, and camel-case aliases; bounded dispatchers isolate exporter outages from business work.
  • W3C traceparent/tracestate carrier helpers preserve context across HTTP, queues, jobs, webhooks, MCP calls, and other synchronous or asynchronous boundaries. Incoming traceparent values are exact (surrounding whitespace is rejected), while tracestate members enforce W3C syntax, uniqueness, and member and total-size limits. Only ASCII space and tab are accepted as optional whitespace around member separators.
  • Related ContractSpec packages include @lssm-tech/lib.contracts-integrations, @lssm-tech/lib.contracts-spec, @lssm-tech/lib.lifecycle, @lssm-tech/tool.bun, @lssm-tech/tool.typescript.
  • src/pipeline/ contains pipeline stages and orchestration helpers.

Installation

npm install @lssm-tech/lib.observability

or

bun add @lssm-tech/lib.observability

Usage

Import the root entrypoint from @lssm-tech/lib.observability, or choose a documented subpath when you only need one part of the package surface.

Arquitectura

  • src/anomaly is part of the package's public or composition surface.
  • src/index.ts is the root public barrel and package entrypoint.
  • src/intent is part of the package's public or composition surface.
  • src/logging is part of the package's public or composition surface.
  • src/metrics is part of the package's public or composition surface.
  • src/pipeline/ contains pipeline stages and orchestration helpers.
  • src/telemetry is part of the package's public or composition surface.
  • OperationalImprovementAnalyticsReader projects an explicit PostHog/HogQL metadata allowlist into sanitized operational signals and plan-bound observation results. It never selects raw prompts, payloads, credentials, or personal fields.

Public Entry Points

  • Export . resolves through ./src/index.ts.
  • Export ./anomaly/alert-manager resolves through ./src/anomaly/alert-manager.ts.
  • Export ./anomaly/anomaly-detector resolves through ./src/anomaly/anomaly-detector.ts.
  • Export ./anomaly/baseline-calculator resolves through ./src/anomaly/baseline-calculator.ts.
  • Export ./anomaly/root-cause-analyzer resolves through ./src/anomaly/root-cause-analyzer.ts.
  • Export ./intent/aggregator resolves through ./src/intent/aggregator.ts.
  • Export ./intent/detector resolves through ./src/intent/detector.ts.
  • Export ./logging resolves through ./src/logging/index.ts. It exposes the OTel-correlated Logger and the host structured JSON logger (createStructuredLogger, hashTenantRef): ctx, msg calls, child bindings, injectable sink, and tenant_id emitted only as an opaque tenant_ref_ hash.
  • Export ./metrics resolves through ./src/metrics/index.ts.
  • Export ./pipeline/evolution-pipeline resolves through ./src/pipeline/evolution-pipeline.ts.
  • Export ./telemetry/operational-improvement-reader resolves through ./src/telemetry/operational-improvement-reader.ts.
  • The root entry point exports the platform ports, privacy sanitizer, resilient dispatcher, and W3C trace-context helpers.
  • Keep the public subpath list aligned with package.json.

Local Commands

  • bun run dev — contractspec-bun-build dev
  • bun run build — contractspec-bun-build build
  • bun run test — bun test --pass-with-no-tests
  • bun run lint — bun lint:fix
  • bun run lint:check — biome check .
  • bun run lint:fix — biome check --write --unsafe --only=nursery/useSortedClasses . && biome check --write .
  • bun run typecheck — tsgo --noEmit
  • bun run publish:pkg — bun publish --tolerate-republish --ignore-scripts --verbose
  • bun run publish:pkg:canary — bun publish:pkg --tag canary
  • bun run clean — rimraf dist .turbo
  • bun run build:bundle — contractspec-bun-build transpile
  • bun run build:types — contractspec-bun-build types
  • bun run prebuild — contractspec-bun-build prebuild

Recent Updates

  • Replace eslint+prettier by biomejs to optimize speed.
  • Circular import issue.
  • Normalize formatting across contracts-integrations, composio, and observability.
  • Add AI provider ranking system with ranking-driven model selection.

Notes

  • OTel span and metric naming conventions must stay consistent across the platform.
  • Pipeline interfaces are adapter boundaries — do not leak vendor-specific details.
  • Anomaly detection thresholds affect alerting; changes require validation.

Canonical source ownership: @lssm-tech/lib.contracts-runtime-kernel owns the existing framework-neutral implementation; module.forms/runtime owns the existing Forms service and FormsPlatformError; Observability/contracts-runtime owns the existing automatic backend event binding. Legacy five maps and default behavior are preserved. Clean artifact qualification and runtime authority remain separate requirements.

The contracts-runtime leaf owns the existing event binding. It retains the original root-selected singleton/backend initialization, logger-only override, active trace context, meter namespace, metric identities/names/tags, safe economic filtering and unsubscribe. No SDK/exporter starts. All prior public roots stay exact. Producer declarations/physical consumers/release/final-tree acceptance remain pending.

Canonical telemetry tracking, anomaly monitoring and registry implementations belong to Observability. Legacy telemetry leaves forward to the same constructors; privacy masking, sampling, defaults, provider dispatch and anomaly callback ordering are preserved. Clean declarations and physical consumers remain to be qualified.

Complete provider-neutral analytics request, reader and writer contracts are owned by Observability. Existing Integration provider leaves forward to the same full declarations. Concrete adapters and query execution remain with their existing implementations.

Portable signal schemas and evidence validation are owned by @lssm-tech/lib.observability-spec. Existing /signals/signal-spec and /signals/evidence-record leaves forward the same canonical objects. Database signal defaults remain here.

Canonical telemetry V2 schemas, validation, digests and delivery taxonomy preserve historical identities. The operations/audit leaves own portable audit queries, export/evidence commands and pipeline-health declarations with original retention, auth and signing requirements. Importing these leaves does not initialize telemetry or execute exports.

The shared/audit and shared/window leaves preserve original schema identities; operations/registry.audit retains the existing audit contract registration helper.

Declared capabilities.

Lib Observability

OpenTelemetry-based observability primitives

Use it to

  • Adopt opentelemetry-based observability primitives

Requires

  • TypeScript

Choose another boundary when

  • The @lssm-tech/lib.observability package constraints do not match the target runtime or platform.

@lssm-tech/lib.observability

@lssm-tech/lib.observability/ai-improvement

@lssm-tech/lib.observability/anomaly/alert-manager

@lssm-tech/lib.observability/anomaly/anomaly-detector

@lssm-tech/lib.observability/anomaly/baseline-calculator

@lssm-tech/lib.observability/anomaly/root-cause-analyzer

@lssm-tech/lib.observability/facade/instrumentation

@lssm-tech/lib.observability/intent/aggregator

@lssm-tech/lib.observability/intent/detector

@lssm-tech/lib.observability/logging

@lssm-tech/lib.observability/metrics

@lssm-tech/lib.observability/observability.feature

@lssm-tech/lib.observability/contracts-runtime

@lssm-tech/lib.observability/telemetry/delivery-v2

@lssm-tech/lib.observability/telemetry/v2-primitives

@lssm-tech/lib.observability/telemetry/v2-validation

@lssm-tech/lib.observability/telemetry/v2

@lssm-tech/lib.observability/operations/audit/event.export.command

@lssm-tech/lib.observability/operations/audit/event.get.query

@lssm-tech/lib.observability/operations/audit/event.list.query

@lssm-tech/lib.observability/operations/audit/evidence.attach.command

@lssm-tech/lib.observability/operations/audit/pipeline.health.query

@lssm-tech/lib.observability/operations/audit/shared-schemas

@lssm-tech/lib.observability/shared/audit

@lssm-tech/lib.observability/shared/window

@lssm-tech/lib.observability/operations/registry.audit

Imports and export paths.

53 entries

These are package-manifest entry points. Named symbols listed above come from the capability catalogue; this is not an exhaustive TypeScript symbol reference.

53 importaciones · se muestran 35

Dependencies and related packages.

Runtime dependencies 17
@opentelemetry/exporter-metrics-otlp-http
^0.222.0
@opentelemetry/exporter-trace-otlp-http
^0.222.0
@opentelemetry/resources
^2.10.0
@opentelemetry/sdk-metrics
^2.11.0
@opentelemetry/sdk-node
^0.222.0
@opentelemetry/sdk-trace-base
^2.10.0
@opentelemetry/semantic-conventions
^1.43.0
compare-versions
catalog:data
zod
catalog:
Peer dependencies 1
@opentelemetry/api
1.9.1
Development dependencies 4
@opentelemetry/api
1.9.1
typescript
catalog:

Package scripts.

Commands declared by this package. Review its setup requirements before running them; no command here was executed by this review.

publish:pkgbun publish --tolerate-republish --ignore-scripts --verbose
publish:pkg:canarybun publish:pkg --tag canary
buildcontractspec-bun-build build
build:bundlecontractspec-bun-build transpile
build:typescontractspec-bun-build types
devcontractspec-bun-build dev
cleanrimraf dist .turbo
lintbun lint:fix
lint:fixnode ../../../../scripts/biome.cjs check --write --unsafe --only=nursery/useSortedClasses . && node ../../../../scripts/biome.cjs check --write .
lint:checknode ../../../../scripts/biome.cjs check .
testbun test --pass-with-no-tests
prebuildcontractspec-bun-build prebuild
typechecktsgo --noEmit --rootDir ../../../..
Tu vista

Make room for your context.

Shape the presentation around this moment. You can change it whenever you need.

Tu contexto

The different parts of you

Choose a starting point

Una mezcla útil de contexto, imágenes y orientación discreta.

Tune each dimension
Each dimension can change independently. Product permissions and available actions stay unchanged.

Support the way you begin and return

Tune your support

Comodidad de lectura

Elige tu idioma

El idioma de la interfaz solo cambia el texto. Los mercados, precios y flujos de trabajo conservan sus propios ajustes.

Cobertura de traducción

Parte del contenido se muestra en inglés.

Navegación151
Grafo616
Categorías188
Portafolio332
Ejemplos2035
Vista previa de la fuente41

Se añadirán más traducciones a medida que se revise el contenido.

Esta preferencia se guarda en este navegador.

Buscar en el sitio web

Puntos de partida útiles

Sin resultados. Prueba una frase más corta, un nombre de operación u otro ámbito de búsqueda.

UN POCO DE ESPACIO PARA EXPLORAR

Encuentra algo que explorar.

Abre una vista detallada en esta página, prueba otra perspectiva o sigue el detalle a su propia página.

Cómo funcionan las vistas previas y los controles
01

Mirar antes de salir

Pasa el cursor por un enlace o enfócalo con Tab para ver una vista previa. Hacer clic en el enlace original o pulsar Intro siempre abre su destino.

02

Mantener el contexto

Entra en la vista previa para explorar sus secciones. Usa Alt + ↓ desde un enlace enfocado para entrar con el teclado. Escape la cierra.

03

Abrir las posibilidades

Las filas desplegables, las perspectivas y los controles destacados revelan más. Tu vista cambia la comodidad de lectura y el contexto que exploras.

Un botón separado para mirar más de cerca

Muestra pequeños botones de vista previa junto a los enlaces donde haya espacio. Toca el ojo para inspeccionar o el enlace para ir directamente. Esta elección permanece en esta pestaña.

No se recoge historial de navegación. El movimiento reducido sigue tu dispositivo y Tu vista.