Skip to main content

Banner

flexinfer-observability

Header

pipeline status coverage report

Standardized observability library for Python services in the FlexInfer ecosystem.

Features

  • Structured Logging: JsonFormatter with automatic OpenTelemetry trace ID injection.
  • Metrics: BaseMetrics abstraction for Prometheus counters/gauges with Pushgateway support.
  • Timing: Context managers for operation latency measurement.

Usage

Logging

from observability.logging import setup_logging

logger = setup_logging(level="INFO", log_format="json")
logger.info("Service started", extra={"service_id": "api-1"})

Metrics

from observability.metrics import BaseMetrics
from prometheus_client import Counter

class ServiceMetrics(BaseMetrics):
    def __init__(self):
        super().__init__(job_name="my_service")
        self.requests = Counter("requests_total", "Total requests")

metrics = ServiceMetrics()
metrics.requests.inc()
metrics.push()

Configuration

Environment Variable Description Default
LOG_LEVEL Log level (DEBUG, INFO, ...) INFO
LOG_FORMAT logging format (json, plain) plain
METRICS_PUSHGATEWAY_URL Prometheus Pushgateway URL None
METRICS_JOB_NAME Job name for metrics default_job

Installation

pip install flexinfer-observability

Metadata

Release files for flexinfer-observability 0.2.2

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

Built distribution (wheel)

Table of built distributions (wheels) for flexinfer-observability 0.2.2
File Interpreter ABI Platform
flexinfer_observability-0.2.2-py3-none-any.whl Python 3 none any Details

Release files / flexinfer_observability-0.2.2-py3-none-any.whl

Download URL flexinfer_observability-0.2.2-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58613aa460b432db858bfc77e45c662fd5e4fa7c9e48ced9e55903f0801bb928
BLAKE2b-256 checksum
How to use checksums
2da8828448d8bcbc7112a6ef7bda8ece81f1f5936e32d85e2f029d2a956d3836
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for flexinfer-observability 0.2.2

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.

Release history Release notifications | RSS feed

This release

0.2.2 This release

1 release file No 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