--- id: openfeature-hooks-opentelemetry version: "0.3.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # openfeature-hooks-opentelemetry — OpenTelemetry hooks for the OpenFeature Python SDK License: permissive · Maintenance: active · Downloads: 125.7K/mo ## What it is and what it does This package provides a hook for the OpenFeature Python SDK that integrates with OpenTelemetry to automatically record feature flag evaluations as span events. When a flag is evaluated and an active OpenTelemetry span exists, the hook captures the evaluation as a span event, making feature flag decisions visible in distributed traces. This enables teams to correlate feature flag changes with request performance, latency, and errors, supporting observability use cases like A/B testing analysis and progressive rollout monitoring. The hook can be registered either globally (affecting all flag evaluations) or per-client (affecting only specific OpenFeature clients). It depends on openfeature-sdk for the hook framework, opentelemetry-api for span access, and opentelemetry-semantic-conventions for standardized attribute naming. The package is actively maintained and requires Python 3.9 or later. Use it for: - Correlate feature flag decisions with request latency and errors in distributed traces to measure feature impact. - Track A/B test variant assignments across service calls to analyze test performance and user behavior. - Monitor progressive feature rollouts by observing which flag variants are active during request processing. - Debug unexpected behavior by inspecting which feature flags were evaluated during a traced request. - Analyze the relationship between feature flag changes and system performance metrics in observability dashboards. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Automatically captures feature flag evaluations as span events in OpenTelemetry traces, enabling observability of how feature flags affect runtime behavior. Yes. This package fills a clear observability gap for teams using OpenFeature and OpenTelemetry together. It has low install friction, active maintenance, permissive licensing, no known vulnerabilities, and solves a real problem—making feature flag decisions visible in distributed traces. Install it if you use both OpenFeature and OpenTelemetry and want to understand how feature flags affect your system's behavior. ## Install pip install openfeature-hooks-opentelemetry uv add openfeature-hooks-opentelemetry poetry add openfeature-hooks-opentelemetry ## Installing openfeature-hooks-opentelemetry Before you install: Low friction install with three stable runtime dependencies (openfeature-sdk, opentelemetry-api, opentelemetry-semantic-conventions). Repository is active with recent commits and no archived status. License in practice: Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for most commercial and open-source projects. Quickstart: pip install openfeature-hooks-opentelemetry from openfeature import api from openfeature.contrib.hook.opentelemetry import TracingHook api.add_hooks([TracingHook()]) Requires Python 3.9 or later; an active OpenTelemetry span must be present for the hook to create span events. Verify before relying: - Whether the hook works with all OpenFeature SDK versions or has specific version constraints beyond what the dependency declaration shows. - Performance overhead of the hook when evaluating many flags in high-throughput scenarios. - Compatibility with different OpenTelemetry exporters and backends. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 125.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags opentelemetry feature flag tracing, openfeature hooks observability, feature flag span events, opentelemetry tracing integration, feature flag telemetry signals, openfeature sdk hooks, distributed tracing feature flags, observability, feature-flags, distributed-tracing [View on SkillFed](https://skillfed.io/packages/openfeature-hooks-opentelemetry) · [View on PyPI](https://pypi.org/project/openfeature-hooks-opentelemetry/)