Skip to content

Conversation

@kxzk
Copy link
Collaborator

@kxzk kxzk commented Jan 23, 2026

TL;DR

Fixes incompatibility with updated OpenTelemetry Baggage API that changed method signatures from keyword arguments to positional args

Why

  • Changes Baggage.value(context:) to Baggage.values(context:) to match current API
  • Updates Baggage.set_value() calls from set_value(context:, key:, value:) to set_value(key, value, context:) positional argument order
  • Simplifies span key mapping using SPAN_KEY_MAP lookup instead of case statement
  • Consolidates duplicate test setup into shared baggage mock context
  • Updates gem dependencies (faraday-retry, google-protobuf, unicode-emoji)

Checklist

  • Has label
  • Has linked issue
  • Tests added for new behavior
  • Docs updated (if user-facing)

- Fixes incompatibility with updated OpenTelemetry Baggage API that
  changed method signatures from keyword arguments to positional args
- Changes `Baggage.value(context:)` to `Baggage.values(context:)` to
  match current API
- Updates `Baggage.set_value()` calls from
  `set_value(context:, key:, value:)` to `set_value(key, value,
  context:)` positional argument order
- Simplifies span key mapping using SPAN_KEY_MAP lookup instead of
  case statement
- Consolidates duplicate test setup into shared baggage mock context
- Updates gem dependencies (faraday-retry, google-protobuf,
  unicode-emoji)
@kxzk kxzk self-assigned this Jan 23, 2026
Copilot AI review requested due to automatic review settings January 23, 2026 11:45
@kxzk kxzk added the bug Something isn't working label Jan 23, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes incompatibility with the updated OpenTelemetry Baggage API by updating method signatures and argument orders to match the current API specification.

Changes:

  • Updated Baggage API method calls from value(context:) to values(context:) and changed set_value argument order from keyword args to positional args with optional context
  • Refactored span key mapping logic by replacing case statement with direct SPAN_KEY_MAP lookup for better maintainability
  • Consolidated duplicate test setup into a shared baggage mock context to reduce code duplication

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
lib/langfuse/propagation.rb Updated Baggage API calls to use new method signatures (values instead of value, positional args for set_value) and simplified span key lookup logic
spec/langfuse/propagation_spec.rb Added shared context for baggage mocks and updated all test calls to match new API signatures
Gemfile.lock Minor version updates for faraday-retry (2.3.2 → 2.4.0), google-protobuf (4.33.0 → 4.33.4), and unicode-emoji (4.1.0 → 4.2.0)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@kxzk kxzk merged commit f616036 into main Jan 23, 2026
16 checks passed
@kxzk kxzk deleted the feature/fix-opentelemetry-baggage-api-method-signatures branch January 23, 2026 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants