@maniaabastecer/observability-core
v0.1.5
Published
Reusable observability primitives: structured logging, request correlation, trace context, OTLP SDK bootstrap, and framework adapters.
Downloads
16
Readme
@maniaabastecer/observability-core
Reusable observability primitives for BR Mania services.
Public npm Publishing
This package is published as a public scoped npm package on npmjs.org.
Required CI Secret
NPM_TOKEN(Bitbucket secured variable)
Token guidance:
- Use least privilege required to publish
@maniaabastecer/observability-core. - Never print token values in logs.
- Rotate token periodically and on credential exposure suspicion.
CI Branch Policy
feature/*: validation only (npm ci,build,test,npm pack --dry-run, tarball smoke import).main: validation + guarded publish.
Publish Guard
The publish step checks package version existence first:
- If
npm view @maniaabastecer/observability-core@$VERSIONexists: pipeline exits successfully without publishing. - If it does not exist:
npm publish --access publicruns.
This makes reruns idempotent for already-published versions.
Manual Release Flow (npm version)
- Develop changes in
feature/*branch and ensure validation passes. - Update package code/docs and release notes.
- Bump version locally using one of:
npm version patchnpm version minornpm version major
- Merge into
mainusing your normal approval process. mainpipeline validates and publishes if the version is new.
Rollback / Failure Playbook
If publish fails after version bump:
- Inspect CI logs and fix root cause.
- If version has already been partially consumed or cannot be safely reused, create a new patch release (
npm version patch). - Re-run through merge +
mainpipeline with the new version. - Do not expose secrets or raw auth headers in logs during troubleshooting.
Downstream Consumption
Then install explicit versions, for example:
npm install @maniaabastecer/[email protected]Nest Adapter Import
Use Nest adapter through subpath import:
import {
ObservabilityNestMiddleware,
ObservabilityExceptionFilter,
} from '@maniaabastecer/observability-core/adapters/nest';