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[instruments]"

The [instruments] extra pulls in the Firecrawl SDK (firecrawl-py); drop it and install plain firecrawl-otel if you manage firecrawl-py yourself.

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[instruments]" 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.1.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.1-py3-none-any.whl (14.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: firecrawl_otel-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 910455cbb1e97896b5cd6626d6fc2c56ad4d3695ed575090d4cd249e38653a1e
MD5 6233f3e57346b25d74053db0a1add85f
BLAKE2b-256 9bd65065042bf145873552608c555d25a6852f2dc6f939c3df5875a16785da49

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_otel-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: firecrawl_otel-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 14.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 272520b659ffa01e51f803fb8e31a4faef15b560c261334e1986bb5e0d830841
MD5 7d56d8800acc1d24127c3cdd8e38df27
BLAKE2b-256 1ecf604f0aa01cac136c852cb6133664222f1ae96af47806bb983bb015c2351c

See more details on using hashes here.

Provenance

The following attestation bundles were made for firecrawl_otel-0.1.1-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