Skip to content

fix(otel): preserve external observation type on update - #1802

Closed
hassiebp wants to merge 1 commit into
mainfrom
hassiebbot/fix-lfe-14798-preserve-observation-type
Closed

fix(otel): preserve external observation type on update#1802
hassiebp wants to merge 1 commit into
mainfrom
hassiebbot/fix-lfe-14798-preserve-observation-type

Conversation

@hassiebp

@hassiebp hassiebp commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

What

Prevent update_current_span() and trace-level helper wrappers from writing a fallback langfuse.observation.type onto an existing OpenTelemetry span. Third-party instrumentation can therefore retain its own observation classification while still receiving Langfuse metadata and other updates.

Adds a regression test using an OpenInference instrumentation scope and openinference.span.kind=AGENT.

Linear: LFE-14798
Source report: langfuse/langfuse#15814

Verification

  • UV_CACHE_DIR=/tmp/langfuse-python-uv-cache uv run --frozen ruff check .
  • UV_CACHE_DIR=/tmp/langfuse-python-uv-cache uv run --frozen mypy langfuse --no-error-summary
  • UV_CACHE_DIR=/tmp/langfuse-python-uv-cache uv run --frozen pytest tests/unit/test_otel.py (66 passed, 2 skipped)

@hassiebp hassiebp closed this Aug 6, 2026
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