Skip to main content

OpenTelemetry instrumentation for Pixeltable

Translates Pixeltable's instrumentation hooks into OpenTelemetry spans and metrics. Instrumentation is opt-in: Pixeltable itself never imports OpenTelemetry or activates telemetry on its own.

pip install opentelemetry-instrumentation-pixeltable
# or, to also pull in the OpenTelemetry SDK and OTLP exporters that init() needs:
pip install 'pixeltable[otel]'

Attach to an existing OpenTelemetry SDK

When your application already owns an OpenTelemetry SDK, attach Pixeltable to it:

from opentelemetry.instrumentation.pixeltable import PixeltableInstrumentor

PixeltableInstrumentor().instrument()  # uses the global providers
# or: PixeltableInstrumentor().instrument(tracer_provider=my_tp, meter_provider=my_mp)

The standard opentelemetry-instrument CLI discovers and activates it automatically via its entry point.

Let Pixeltable configure the SDK

To build providers and an OTLP exporter from Pixeltable's [otel] config (or the standard OTEL_EXPORTER_OTLP_* environment variables), call init() once at startup (requires the pixeltable[otel] extra):

import opentelemetry.instrumentation.pixeltable as pxt_otel

pxt_otel.init(endpoint='http://localhost:4318')

Configuration is read from the database's [[pixeltable.database]] entry (db_exporter_otlp_endpoint, db_exporter_otlp_protocol), then the standard OTEL_EXPORTER_OTLP_* environment variables, then the [otel] section of Pixeltable's config (~/.pixeltable/config.toml). On the pods of a hosted database, init() skips the entry's two fields and exports to the collector in the pod, at the address in the pod's environment.

Per-provider LLM spans

This package emits Pixeltable's own operation, execution, and UDF spans. It does not capture per-provider token usage or cost. To add rich provider spans (OpenAI, Anthropic, etc.), install a dedicated GenAI instrumentor alongside this one:

from opentelemetry.instrumentation.openai_v2 import OpenAIInstrumentor
from opentelemetry.instrumentation.pixeltable import PixeltableInstrumentor

PixeltableInstrumentor().instrument()
OpenAIInstrumentor().instrument()

Because Pixeltable establishes the ambient OpenTelemetry context for every UDF call (including across its thread pools and async scheduler), the provider instrumentor's spans nest correctly under Pixeltable's udf.<name> span. Prefer the bare opentelemetry-instrumentation-* packages (or OpenInference), which attach to the global provider; avoid all-in-one initializers that install their own TracerProvider and would clobber the one configured here.

Metadata

Release files for opentelemetry-instrumentation-pixeltable 0.2.0

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

Source distribution (sdist)

Source distribution for opentelemetry-instrumentation-pixeltable 0.2.0
File Size Uploaded Provenance Actions
opentelemetry_instrumentation_pixeltable-0.2.0.tar.gz 22.0 kB Without provenance Details for opentelemetry_instrumentation_pixeltable-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for opentelemetry-instrumentation-pixeltable 0.2.0
File Interpreter ABI Platform Actions
opentelemetry_instrumentation_pixeltable-0.2.0-py3-none-any.whl Python 3 none any Details for opentelemetry_instrumentation_pixeltable-0.2.0-py3-none-any.whl

Total release size: 38.3 kB

Release files / opentelemetry_instrumentation_pixeltable-0.2.0.tar.gz

Download URL opentelemetry_instrumentation_pixeltable-0.2.0.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
892482da6a1f54a9138bf2908129f65f05fd57c5ecaeba15745e79dd7d34e20b
BLAKE2b-256 checksum
How to use checksums
a336b383be24a6bcb3761b0173066fc20c9280f60a947d5d8d92f87205b25a92
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / opentelemetry_instrumentation_pixeltable-0.2.0-py3-none-any.whl

Download URL opentelemetry_instrumentation_pixeltable-0.2.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a553ca8716f11de83c5e94bf6cd90ec040e3576662bc808f9260dd5d5f712657
BLAKE2b-256 checksum
How to use checksums
94424d9510781c1dbde5e39efdcc6dfffcac345df3b0c2a7e2ad446c33bde8e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for opentelemetry-instrumentation-pixeltable 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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