faro-sdk (Python)
Perfil de defaults:
server— flush 750ms · batch 200 · queue 10 000. Ver perfiles.
pip install faro-sdk
import faro_sdk as faro
faro.init(
endpoint="https://faro.iaportafolio.com",
token="...", # visible en /projects → SDK
service="ingesta-csv",
environment="production",
release="git-sha-abc123",
attributes={"region": "eu-west-1"},
)
faro.info("arranque ok", port=8080)
try:
procesar(archivo)
except Exception as exc:
faro.capture_exception(exc, tags={"archivo": archivo.name})
raise
Integración con logging
import logging
from faro_sdk import FaroHandler
logging.basicConfig(level=logging.INFO)
logging.getLogger().addHandler(FaroHandler())
logging.info("auto-enviado a Faro")
try:
raise ValueError("boom")
except Exception:
logging.exception("falló el job") # incluye stack trace
Captura automática
init() instala sys.excepthook y threading.excepthook (Python 3.8+). Cualquier excepción no manejada se envía a Faro antes de imprimirla en stderr.
Para desactivar: faro.init(..., install_global_handlers=False).
Flush / cierre
faro.flush(timeout=3.0)
# o, al cerrar la app:
faro.close()
atexit ya registra un cierre limpio al terminar el proceso, pero para scripts cortos llama explícitamente para no perder eventos.
Auto-correlación con traces
track() adjunta trace_id/span_id si OpenTelemetry está instalado y hay un span activo, o si pasas un provider explícito. El provider puede devolver un header W3C traceparent o un dict con trace_id/span_id:
faro.init(
endpoint="https://faro.iaportafolio.com",
token="...",
service="checkout",
trace_context=lambda: "00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
)
faro.track("checkout_completed") # incluye trace_id + span_id
Opciones cross-SDK
warning() (alias de warn()), scrub_fields/scrub_headers/scrub_patterns y el hook before_send están disponibles aquí con la misma semántica que en el resto de SDKs. Ver API uniforme entre SDKs.
Metadata
Release files for faro-sdk 0.2.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 |
|---|---|---|---|---|
| faro_sdk-0.2.0.tar.gz | 26.2 kB | With provenance | Details for faro_sdk-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| faro_sdk-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for faro_sdk-0.2.0-py3-none-any.whl |
Total release size: 46.3 kB
Release files / faro_sdk-0.2.0.tar.gz
| Download URL | faro_sdk-0.2.0.tar.gz |
|---|---|
| Size | 26.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
064fff044e1e0d3413b4edbac7834df7c07f6d94f066da4e16e8112268ec56e3
|
|
BLAKE2b-256 checksum How to use checksums |
8a12ed23e828289cb4c1e03d408ad23bbaf04079b2001eb4cba8957fdd56a260
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 29, 2026.
Transparency logRelease files / faro_sdk-0.2.0-py3-none-any.whl
| Download URL | faro_sdk-0.2.0-py3-none-any.whl |
|---|---|
| Size | 20.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a77253423525fec7be36a9d7ad897ce69b83d180989662d2f3fb4d4bd0afed5c
|
|
BLAKE2b-256 checksum How to use checksums |
155e72eb8a2fa47027b9e0e04904bdda2c6cf09de3e494000ff279ad56dba84d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 29, 2026.
Transparency logSecurity for faro-sdk 0.2.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 faro_sdk-0.2.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 May 29, 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.