Skip to main content

OpenTelemetry instrumentation for the Firecrawl SDK — ship scrape/crawl/search traces and metrics to SigNoz or any OTLP backend.

Project description

firecrawl-otel

OpenTelemetry instrumentation for the Firecrawl Python SDK. Trace every scrape / crawl / search / map / extract call and ship the traces and metrics to SigNoz — or any OTLP backend — without changing your Firecrawl call sites.

Firecrawl does not emit OpenTelemetry itself, so this package instruments it on the client side using the standard OpenTelemetry BaseInstrumentor pattern.

Install

pip install firecrawl-otel

Quickstart

from firecrawl import Firecrawl
from firecrawl_otel import FirecrawlInstrumentor

FirecrawlInstrumentor().instrument()      # once, at startup

app = Firecrawl(api_key="fc-...")         # your normal client — unchanged
doc = app.scrape("https://example.com")   # automatically traced

Point the telemetry at SigNoz with standard OpenTelemetry environment variables:

# SigNoz Cloud (region = us | us2 | eu | eu2 | in | in2)
export OTEL_SERVICE_NAME=my-app
export OTEL_EXPORTER_OTLP_ENDPOINT=https://ingest.us.signoz.cloud:443
export OTEL_EXPORTER_OTLP_HEADERS=signoz-ingestion-key=<your-key>

For self-hosted SigNoz use http://localhost:4317 and no headers.

Zero-code option

Because the package registers an opentelemetry_instrumentor entry point, the OpenTelemetry CLI can enable it with no code change at all:

pip install firecrawl-otel opentelemetry-distro opentelemetry-exporter-otlp
opentelemetry-bootstrap -a install
opentelemetry-instrument python your_app.py

What you get in SigNoz

Traces — one span per Firecrawl call:

Span attribute Example
firecrawl.operation scrape, crawl, search, map
url.full https://example.com
firecrawl.query what is opentelemetry (search)
firecrawl.formats markdown,html
firecrawl.results 5
firecrawl.credits_used 12
firecrawl.status completed

Metrics:

Metric Type Description
firecrawl.requests counter Calls, tagged by firecrawl.operation + outcome (ok/error)
firecrawl.request.duration histogram (ms) Latency per call
firecrawl.credits.used counter Firecrawl credits consumed
firecrawl.results.returned histogram Documents/pages/results returned

Notes

  • Call instrument() before creating the Firecrawl client. The unified client binds its methods at construction time, so instrument at startup (as in the quickstart) — clients created afterwards are traced.
  • This library configures no exporters. Exporter setup stays with your app (the OTEL_* env vars above, or opentelemetry-instrument). That keeps it composable with the rest of your OpenTelemetry setup.
  • Pass explicit providers if you don't use the globals: FirecrawlInstrumentor().instrument(tracer_provider=tp, meter_provider=mp).
  • Disable again with FirecrawlInstrumentor().uninstrument().
  • A runnable end-to-end demo (scrape → search → crawl) lives in examples/.

Development

pip install -e ".[dev]"
pytest
python -m build && twine check dist/*

License

Apache-2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

firecrawl_otel-0.1.0.tar.gz (14.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

firecrawl_otel-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file firecrawl_otel-0.1.0.tar.gz.

File metadata

  • Download URL: firecrawl_otel-0.1.0.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for firecrawl_otel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 619a2d726bd5bdd7c8006e6f615ad9957762451d28c4c2562dc2e7aa5cb5250d
MD5 008503515705dfaf64d35793080a5dfc
BLAKE2b-256 ec9cbaba8897c7588eee8463ff84909b52cc48c4addcb0e34afb1c4231a2f186

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_otel-0.1.0.tar.gz:

Publisher: publish.yml on gkarthi-signoz/firecrawl-otel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file firecrawl_otel-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: firecrawl_otel-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for firecrawl_otel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c4d946d101999119e2e6ffd01f61e23678285d487182deec6f368bea6490370
MD5 6760e5385aefc8f0f0e74ead6076e901
BLAKE2b-256 b0acf5d08095e7e70eb4284effa6c78317b991bd231c5294c78c1438c47939bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_otel-0.1.0-py3-none-any.whl:

Publisher: publish.yml on gkarthi-signoz/firecrawl-otel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page