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 déclarations · les 6 premières affichéesSELECT 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

  • Couche: 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.

Architecture

  • 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 imports · 35 affichés

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 ../../../..
Votre vue

Make room for your context.

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

Votre contexte

The different parts of you

Choose a starting point

Un mélange utile de contexte, de visuels et de guidage discret.

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

Confort de lecture

Choisir votre langue

La langue de l’interface change uniquement le texte. Les marchés, les prix et les parcours conservent leurs propres paramètres.

Couverture des traductions

Une partie du contenu est affichée en anglais.

Navigation151
Graphe616
Catégories378
Portfolio833
Exemples2 035
Aperçu de la source1 542

D’autres traductions seront ajoutées à mesure que le contenu sera relu.

Cette préférence est enregistrée dans ce navigateur.

Rechercher sur le site

Des points de départ utiles

Aucun résultat. Essayez une expression plus courte, un nom d’opération ou un autre périmètre de recherche.

UN PEU DE PLACE POUR EXPLORER

Trouvez quelque chose à explorer.

Ouvrez un aperçu détaillé sur cette page, essayez une autre perspective ou suivez le détail vers sa propre page.

Fonctionnement des aperçus et des commandes
01

Regarder avant de partir

Survolez un lien ou sélectionnez-le avec Tab pour voir un aperçu. Cliquer sur le lien d’origine ou appuyer sur Entrée ouvre toujours sa destination.

02

Rester dans le contexte

Entrez dans l’aperçu pour explorer ses sections. Depuis un lien sélectionné, utilisez Alt + ↓ pour y entrer au clavier. Échap le ferme.

03

Ouvrir les possibilités

Les lignes dépliables, les choix de perspective et les commandes mises en évidence révèlent davantage. Votre vue adapte le confort de lecture et le contexte exploré.

Un bouton séparé pour voir de plus près

Affichez de petits boutons d’aperçu à côté des liens quand l’espace le permet. Touchez l’œil pour examiner ou le lien pour y aller directement. Ce choix reste dans cet onglet.

Aucun historique de navigation n’est collecté. La réduction des animations suit votre appareil et Votre vue.