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
obskitpy upjá cria o dashboard<servico>-observabilitycom os painéis básicos: logs, erros, execuções (traces), duração de spans, erros por tipo/origem e lista de erros comtrace_id.- Edite no Kibana (adicione painéis, métricas do seu domínio, filtros).
obskitpy dashboard exporte versioneobservability/dashboard.ndjsonno git.- Em outra máquina/CI:
obskitpy up(ouobskitpy 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 composeprecisa 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.3.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 |
|---|---|---|---|---|
| obskitpy-0.3.0.tar.gz | 97.0 kB | With provenance | Details for obskitpy-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| obskitpy-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for obskitpy-0.3.0-py3-none-any.whl |
Total release size: 190.5 kB
Release files / obskitpy-0.3.0.tar.gz
| Download URL | obskitpy-0.3.0.tar.gz |
|---|---|
| Size | 97.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2f987a7285c4559e6d8f632c15bf8383be97a166d6708c336f0cc877301f0281
|
|
BLAKE2b-256 checksum How to use checksums |
e1f1899d25a48a2eb9e78e2d9d45fa9b30b4d2d463358aa376374e158aaa8b7c
|
| 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 20, 2026.
Transparency logRelease files / obskitpy-0.3.0-py3-none-any.whl
| Download URL | obskitpy-0.3.0-py3-none-any.whl |
|---|---|
| Size | 93.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69c69242d90da462bea6373e9ecd348a3d0691618309904c93791fcabe890a8a
|
|
BLAKE2b-256 checksum How to use checksums |
165df6a9a6130621d3f8221828fbbf8754b4eebd301512b5a4a78923fe4c0191
|
| 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 20, 2026.
Transparency logSecurity for obskitpy 0.3.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
Both files in this release have been uploaded with provenance metadata.
Attestation for obskitpy-0.3.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 Nov 20, 2026.
Transparency logA 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.