fix(hindsight-api-slim): bump opentelemetry-{api,sdk,instrumentation,exporter} floors so PrometheusMetricReader 0.62b1 doesn't crash startup#1373
Open
nikolay-bratanov wants to merge 1 commit intovectorize-io:mainfrom
Conversation
…exporter} floors so PrometheusMetricReader 0.62b1 doesn't crash startup opentelemetry-exporter-prometheus 0.62b1 calls MetricReader.__init__(otel_component_type=…), a kwarg that opentelemetry-sdk introduced only in v1.41.0 (open-telemetry/opentelemetry-python#4970). The previous `opentelemetry-{api,sdk}>=1.20.0` / `opentelemetry-{instrumentation,exporter,semantic-conventions}>=0.41b0` / `opentelemetry-exporter-otlp-proto-http>=1.20.0` floors let pip resolve a recent exporter-prometheus against an older sdk (e.g. 1.39.x cached in a lockfile), so on hindsight-api startup metric initialisation explodes with "MetricReader.__init__() got an unexpected keyword argument 'otel_component_type'. Metrics will be disabled (using no-op collector)." Functionally hindsight stays up but /metrics is silently empty. Bumping all six otel pins to the matching 1.41.0 / 0.62b1 floor keeps pip's resolver consistent across the otel ecosystem and removes the mismatch that produces the warning. Closes vectorize-io#1372
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1372.
Why
opentelemetry-exporter-prometheus 0.62b1callsMetricReader.__init__(otel_component_type=…), a kwarg thatopentelemetry-sdkintroduced only in v1.41.0 (open-telemetry/opentelemetry-python#4970, released 2026-04-09).Verified by greping each tagged sdk:
otel_component_typeoccurrences inmetrics/_internal/export/__init__.pyv1.39.1v1.40.0v1.41.0v1.41.1The previous floors in
hindsight-api-slim/pyproject.toml:let pip happily resolve
opentelemetry-exporter-prometheus 0.62b1(current latest) against a1.39.x/1.40.xsdk that was already cached in a venv/lockfile from before.hindsight-apithen logs at startup:The daemon stays up (no-op collector kicks in) but
/metricsis silently empty for the rest of the process lifetime.What
Bump all six otel-related deps to the matching
1.41.0/0.62b1floor so pip's resolver keeps the otel ecosystem consistent:Verification
Reproduced locally with
hindsight-api-slim 0.5.6+opentelemetry-sdk==1.39.1+opentelemetry-exporter-prometheus==0.62b1:After upgrading the entire otel stack to 1.41.1 / 0.62b1 (workaround documented in #1372),
hindsight-apistartup logs:— and the
/metricsendpoint serves data normally. With this PR's floor bumps applied, every fresh install gets that working state by default.Risk
Strictly raising lower bounds. Anyone already on the broken combination gets a one-time pip resolver bump on next install; anyone already on
>=1.41/>=0.62b1is unaffected. No code changes.Notes
mistralai 2.3.2separately requiresopentelemetry-semantic-conventions<0.61,>=0.60b1, which conflicts with this PR's>=0.62b1floor. In the venv where I verified, mistralai is only used for an optional provider so the conflict is apip checkwarning rather than a runtime issue. If hindsight does end up needing mistralai imported on the hot path, that's a separate upstream pin to relax inmistralai.