Skip to main content

pamone-obs (Python)

Reusable helper for the pamone obs-agent sidecar. Apps install this once and get logs, resource metrics and (optionally) traces shipped to pamone — with no hostPath (works under Pod Security restricted) and no change to Datadog.

  • logs — mirror stdout/stderr into the shared file (fixes stdout-only apps).
  • metrics — read the app's OWN cgroup v2 → CPU/memory/IO + /proc/net/dev.
  • traces — mirror spans from the tracer already in use (dd-trace or OTel), additively; the Datadog path is untouched.

Install

pip install pamone-obs              # metrics + logs (+ trace auto-detect)
# optional extras carry the tracer libs if the app does not already have them:
pip install "pamone-obs[trace]"     # ddtrace
pip install "pamone-obs[otel]"      # opentelemetry-sdk

Use

Explicit (one line), after the app's logger/tracer setup:

import pamone_obs
pamone_obs.init()

Zero-code (recommended for images): install once, then it auto-starts:

pamone-obs install-pth              # writes zz_pamone_obs.pth into site-packages

Choose features per app (env)

env default effect
PAMONE_ENABLED true master switch
PAMONE_LOGS_ENABLED true stdout/stderr → app.log
PAMONE_METRICS_ENABLED true cgroup → metrics.jsonl
PAMONE_TRACES_ENABLED true spans → spans.jsonl (auto-detect tracer)
PAMONE_TRACES_BACKEND auto auto | ddtrace | otel
PAMONE_SINK_DIR /var/log/pamone shared emptyDir mount path
PAMONE_METRICS_INTERVAL 10 seconds
PAMONE_CGROUP_ROOT /sys/fs/cgroup cgroup v2 root
PAMONE_MAX_FILE_BYTES 5242880 truncate threshold per file

Examples:

  • metrics + logs only (no tracer / no DD): PAMONE_TRACES_ENABLED=false
  • with traces (pod uses dd-trace): leave traces enabled (or set PAMONE_TRACES_BACKEND=ddtrace).

Sidecar pairing

Set the agent env to the same paths (see the Helm library chart deploy/helm/pamone-sidecar and CONTRACT.md):

AGENT_LOG_PATH=/var/log/pamone/app.log
AGENT_METRICS_PATH=/var/log/pamone/metrics.jsonl
AGENT_SPANS_PATH=/var/log/pamone/spans.jsonl

Build & distribute to clusters

Build a wheel and publish it so pip install pamone-obs works everywhere:

python -m build            # -> dist/pamone_obs-0.1.0-py3-none-any.whl

Options, best → simplest:

  1. Internal PyPI (devpi / pypiserver / Nexus) reachable by cluster build runners: twine upload the wheel once; apps do pip install pamone-obs.
  2. Bake into an internal base Python image (e.g. playcourt/python fork): install the wheel + pamone-obs install-pth once; every app inherits it and only needs the env + shared volume → truly zero-code.
  3. Vendor the wheel into each app image when there is no PyPI egress: COPY pamone_obs-0.1.0-py3-none-any.whl . && pip install ./pamone_obs-*.whl.

The library is stdlib-only; tracer packages are optional extras.

Notes / limitations

  • The log tee captures the current process only (child processes have their own streams). For multi-worker servers, each worker runs init() — metrics are duplicated (harmless) and each worker's output is written.
  • Calls are best-effort and never raise; failures are logged at debug level.

Metadata

Release files for pamone-obs 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pamone-obs 0.1.0
File Size Uploaded Provenance
pamone_obs-0.1.0.tar.gz 9.6 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pamone-obs 0.1.0
File Interpreter ABI Platform
pamone_obs-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.3 kB

Release files / pamone_obs-0.1.0.tar.gz

Download URL pamone_obs-0.1.0.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
688855c2f88592951032dcde74f1c3f15c920e0d58aaa16749f94e578c8fec62
BLAKE2b-256 checksum
How to use checksums
00f415d44d5653ea2fbd2cda140508e4fcaa56424b442a8bf460a87af38a937f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Release files / pamone_obs-0.1.0-py3-none-any.whl

Download URL pamone_obs-0.1.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90a18962993a0b511b859d3265e7e5a2715e9294e10a1c3018ab32ac4d75d1da
BLAKE2b-256 checksum
How to use checksums
00abdf0f3a470f1d464bdda1b39445de575aa2f2ae664503a46118b9bf75a41b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

Security for pamone-obs 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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pamone_obs-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 15, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page