-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix to accomodate breaking log changes from Otel #43626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 accommodates breaking changes from upstream OpenTelemetry Python related to logging APIs. The changes primarily involve renaming classes and parameters to align with the new OpenTelemetry SDK structure where LogData is replaced with ReadableLogRecord/ReadWriteLogRecord, LogExporter becomes LogRecordExporter, and Event type usage is updated.
Key changes:
- Updated imports and type annotations to use
ReadableLogRecordinstead ofLogData - Renamed
LogExportertoLogRecordExporterandLogExportResulttoLogRecordExportResult - Updated test mocks and parameter names to reflect the new naming conventions
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| test_types.py | Updated imports and mock specs to use LogRecord.event_name instead of Event |
| test_processor.py | Renamed test variables from log_data to readable_log_record |
| test_manager.py | Updated variable names and comments to use readable_log_record terminology |
| test_performance_counters/test_processor.py | Updated mock specs from LogData to ReadableLogRecord |
| test_performance_counters/test_performance_counters.py | Updated mock specs from LogData to ReadableLogRecord |
| test_logs.py | Updated all test data initialization from LogData to ReadWriteLogRecord and LogExportResult to LogRecordExportResult |
| _exporter.py | Updated class inheritance, type annotations, parameter names, and return types to use new LogRecord APIs |
| _types.py | Updated span event parameter type from Event to LogRecord.event_name |
| _processor.py | Updated imports, parameter names, and method signatures to use ReadableLogRecord |
| _manager.py | Updated imports, parameter names, and method implementations to use ReadableLogRecord |
| _performance_counters/_processor.py | Updated imports, parameter names, and method signatures to use ReadableLogRecord |
| _performance_counters/_manager.py | Updated imports, parameter names, and method implementations to use ReadableLogRecord |
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/quickpulse/test_types.py
Show resolved
Hide resolved
...re-monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/_quickpulse/_types.py
Show resolved
Hide resolved
...monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py
Show resolved
Hide resolved
sdk/monitor/azure-monitor-opentelemetry-exporter/tests/quickpulse/test_manager.py
Show resolved
Hide resolved
...monitor-opentelemetry-exporter/azure/monitor/opentelemetry/exporter/export/logs/_exporter.py
Show resolved
Hide resolved
23b0c76 to
fc97c9a
Compare
Description
Accommodates breaking changes coming from the following PRs in upstream opentelemetry -
open-telemetry/opentelemetry-python#4676
open-telemetry/opentelemetry-python#4654
open-telemetry/opentelemetry-python#4647
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines