nodus-observability
OpenTelemetry bootstrap, Prometheus registry, structured JSON logging, and async-safe trace ContextVars. Zero required dependencies beyond python-json-logger — OTel and Prometheus are optional extras.
Install
pip install nodus-observability # core only
pip install "nodus-observability[metrics]" # + prometheus-client
pip install "nodus-observability[otel]" # + opentelemetry stack
pip install "nodus-observability[all]" # everything
Trace context
from nodus_observability import set_trace_id, get_trace_id, reset_trace_id, ensure_trace_id
tok = set_trace_id("req-abc-123")
print(get_trace_id()) # "req-abc-123"
reset_trace_id(tok)
Structured logging
from nodus_observability import configure_logging, get_trace_id
configure_logging(
env="production",
log_level="INFO",
get_trace_id_fn=get_trace_id, # inject trace_id from ContextVar
)
OTel tracing
from nodus_observability import init_otel, get_tracer
init_otel(service_name="my-service") # reads OTEL_EXPORTER_OTLP_ENDPOINT
tracer = get_tracer("my-module")
with tracer.start_as_current_span("my-operation") as span:
span.set_status("ok")
Prometheus metrics
from nodus_observability import create_registry, Counter
REGISTRY = create_registry() # never use the default global registry
requests_total = Counter(
"myapp_requests_total",
"Total requests",
["method", "status"],
registry=REGISTRY,
)
requests_total.labels(method="GET", status="200").inc()
Extracted from
AINDY/platform_layer/trace_context.py, otel.py, metrics.py, and log_config.py in the A.I.N.D.Y. runtime.
Metadata
Release files for nodus-observability 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nodus_observability-0.1.0.tar.gz | 10.5 kB | Without provenance | Details for nodus_observability-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nodus_observability-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for nodus_observability-0.1.0-py3-none-any.whl |
Total release size: 19.8 kB
Release files / nodus_observability-0.1.0.tar.gz
| Download URL | nodus_observability-0.1.0.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2cd4b336bbc812db994c1f3c83336af8df865d21c47f32027ce752ebde3aa41
|
|
BLAKE2b-256 checksum How to use checksums |
d56f7209f37600daec9b488069edec8623c4489d3232345032565af8f8c0cada
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Release files / nodus_observability-0.1.0-py3-none-any.whl
| Download URL | nodus_observability-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96f5c25bd0e7081a03253bdf940f9acb7d3809a5ab03a03010c99a4b6ad5b58b
|
|
BLAKE2b-256 checksum How to use checksums |
0afe623e7f716d099b0071603aac5986108bc3a96972cdc77c4943bc4cc97cd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.9
|
Security for nodus-observability 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.