Skip to main content

obskitpy

obskitpy

Observabilidade (OpenTelemetry → Elasticsearch → Kibana) em qualquer projeto Python, via CLI.

Documentação completa na raiz do repositório: docs/. Este arquivo é um resumo.

Começar (2 comandos)

uv add "obskitpy[requests]"      # ou pip install; o extra 'requests' adiciona spans HTTP automáticos
cd meu-projeto
obskitpy init                   # cria observability/ (stack + dashboard base); --service NOME opcional
obskitpy up                     # sobe ES + Kibana + Collector e cria o dashboard

No código:

import logging, obskitpy

log = logging.getLogger(__name__)
shutdown = obskitpy.setup("meu-servico")     # logs + traces + métricas via OTLP (localhost:4317)

@obskitpy.traced()                            # um span por chamada, marca erro se a exceção propagar
def processar(item): ...

try:
    processar(x)
except Exception:
    log.exception("falhou")                 # já sai com error.type, error.origin e error.chain

shutdown()                                  # descarrega os dados pendentes

Métricas próprias: obskitpy.meter().create_counter("pedidos.processados") (API do OpenTelemetry).

Comandos

Comando O que faz
obskitpy init [--service N] [--kibana-port P ...] cria observability/ (compose, collector, dashboard.ndjson, .env)
obskitpy up sobe a stack, espera ficar saudável e aplica o dashboard
obskitpy down [-v] derruba (-v apaga os dados)
obskitpy status / obskitpy open containers + link / abre o dashboard
obskitpy dashboard export grava no arquivo o dashboard como está no Kibana
obskitpy dashboard apply importa observability/dashboard.ndjson no Kibana

Todos aceitam --dir (padrão observability).

Evoluindo o dashboard

  1. obskitpy up já cria o dashboard <servico>-observability com os painéis básicos: logs, erros, execuções (traces), duração de spans, erros por tipo/origem e lista de erros com trace_id.
  2. Edite no Kibana (adicione painéis, métricas do seu domínio, filtros).
  3. obskitpy dashboard export e versione observability/dashboard.ndjson no git.
  4. Em outra máquina/CI: obskitpy up (ou obskitpy dashboard apply) recria tudo.

Os painéis filtram por resource.attributes.service.name, então vários serviços podem compartilhar uma stack (use o mesmo --dir/portas) ou ter uma cada (use portas diferentes no init).

Observações

  • Ambiente local: segurança do Elasticsearch desligada, portas só em 127.0.0.1.
  • Os dados demoram alguns segundos para ficar pesquisáveis após o primeiro envio.
  • Colima/Docker: o docker compose precisa enxergar a pasta do projeto (no Colima, só $HOME é montado por padrão).
  • Requer Docker com o plugin Compose v2.

Metadata

Release files for obskitpy 0.10.1

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

Source distribution (sdist)

Source distribution for obskitpy 0.10.1
File Size Uploaded Provenance Actions
obskitpy-0.10.1.tar.gz 163.6 kB With provenance Details for obskitpy-0.10.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for obskitpy 0.10.1
File Interpreter ABI Platform Actions
obskitpy-0.10.1-py3-none-any.whl Python 3 none any Details for obskitpy-0.10.1-py3-none-any.whl

Total release size: 317.3 kB

Release files / obskitpy-0.10.1.tar.gz

Download URL obskitpy-0.10.1.tar.gz
Size 163.6 kB
Tags Source
SHA-256 checksum
How to use checksums
82e5347e5257d781459c878dcea77e28f007994ad4b036bb5aaed44d5b31cfed
BLAKE2b-256 checksum
How to use checksums
8a3f738446859c967f37992ef192cef34f747284a817972cbb6adc896c49ec93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Release files / obskitpy-0.10.1-py3-none-any.whl

Download URL obskitpy-0.10.1-py3-none-any.whl
Size 153.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9002dabd3550ec5367f8911f2df9fa43f4e7b800884fd703cf0f236d3a330a3d
BLAKE2b-256 checksum
How to use checksums
75c1a611c1bee42d44c44d5ffd89bc04b786659dbcd79e9887aed4a913d1e1a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 21, 2026.

Transparency log

Security for obskitpy 0.10.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for obskitpy-0.10.1.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 Nov 21, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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