Skip to content

Upgrade OpenTelemetry SDK to 1.39.0+#59

Merged
jedrzej-patronusai merged 1 commit into
mainfrom
fix/otel-1.39-compatibility
Jan 9, 2026
Merged

Upgrade OpenTelemetry SDK to 1.39.0+#59
jedrzej-patronusai merged 1 commit into
mainfrom
fix/otel-1.39-compatibility

Conversation

@jedrzej-patronusai
Copy link
Copy Markdown
Contributor

Summary

  • Bump OpenTelemetry dependencies from 1.31.x to 1.39.0+
  • Migrate LogRecord usage from SDK to API module
  • Fix compatibility with OTel 1.39.0 breaking changes

Background

OpenTelemetry SDK 1.39.0 (December 2025) introduced breaking changes to the logs API:

  1. LogRecord removed from SDK - opentelemetry.sdk._logs.LogRecord no longer exists
  2. API LogRecord is the correct class - opentelemetry._logs.LogRecord should be used for creating log records
  3. resource parameter removed - The API LogRecord doesn't accept a resource parameter; resources are managed at the Logger/LoggerProvider level

Test plan

  • Verified imports work with OTel SDK 1.39.1
  • Tested @traced decorator
  • Tested logging within traced functions
  • Tested @evaluator decorator
  • Tested full integration workflow with tracing + logging + evaluation

- Bump opentelemetry-api, opentelemetry-sdk, opentelemetry-exporter-otlp to >=1.39.0
- Import LogRecord from opentelemetry._logs (API) instead of opentelemetry.sdk._logs (SDK)
- Remove resource parameter from LogRecord constructor (not supported in API LogRecord)

OpenTelemetry 1.39.0 removed LogRecord from the SDK module as part of their
logs API stabilization. The API LogRecord is now the correct class for
creating log records, while resource handling is managed at the Logger level.
@jedrzej-patronusai jedrzej-patronusai merged commit db0edce into main Jan 9, 2026
4 of 6 checks passed
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.

2 participants