Skip to content

Address review feedback on semconv PR (#1705)#1707

Merged
dmontagu merged 2 commits intomainfrom
fix/semconv-pr-feedback
Feb 12, 2026
Merged

Address review feedback on semconv PR (#1705)#1707
dmontagu merged 2 commits intomainfrom
fix/semconv-pr-feedback

Conversation

@dmontagu
Copy link
Copy Markdown
Contributor

Summary

Addresses review comments from #1705:

  • Validate normalize_versions() inputs: Now rejects invalid version values (e.g. 2, 'v2') and empty inputs with clear ValueError messages
  • Fix docstrings: instrument_openai() and instrument_anthropic() docstrings now accurately describe that version='latest' still emits minimal request_data for message template compatibility
  • Fix test docstrings: Updated to match actual behavior
  • Remove duplicate import io: BytesIO was already imported at module level

Non-actionable review comments were replied to and resolved on the original PR.

Test plan

  • test_normalize_versions_validation — new test covering valid and invalid inputs
  • Existing version_latest and version_v1 tests pass
  • Pre-commit (ruff, pyright) passes

- Validate inputs in normalize_versions() (reject invalid versions, empty lists)
- Fix docstrings for instrument_openai/instrument_anthropic to accurately describe
  version='latest' behavior (minimal request_data still emitted)
- Fix test docstrings to match actual behavior
- Remove duplicate io import in test_openai.py
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Feb 12, 2026

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: c141add
Status: ✅  Deploy successful!
Preview URL: https://d066178d.logfire-docs.pages.dev
Branch Preview URL: https://fix-semconv-pr-feedback.logfire-docs.pages.dev

View logs

@dmontagu dmontagu enabled auto-merge (squash) February 12, 2026 00:16
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@dmontagu dmontagu disabled auto-merge February 12, 2026 00:17
Avoids lying to the type system by casting a known-invalid value.
@dmontagu dmontagu enabled auto-merge (squash) February 12, 2026 00:22
@dmontagu dmontagu merged commit be42850 into main Feb 12, 2026
14 checks passed
@dmontagu dmontagu deleted the fix/semconv-pr-feedback branch February 12, 2026 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant