opentelemetry-api: Convert objects of any type other than AnyValue in attributes to string to be exportable (#4808)
docs: Added sqlcommenter example (#4734) build: bump ruff to 0.14.1 (#4782) Addopentelemetry-exporter-credential-provider-gcp as an optional dependency toopentelemetry-exporter-otlp-proto-grpc andopentelemetry-exporter-otlp-proto-http (#4760) semantic-conventions: Bump to 1.38.0 (#4791) [BREAKING] Remove LogData and extend SDK LogRecord to have instrumentation scope (#4676) [BREAKING] Rename several classes from Log to LogRecord (#4647) Migration Guide: LogData has been removed. Users should update their code as follows:
For Log Exporters: Change fromSequence[LogData] toSequence[ReadableLogRecord] # Beforefromopentelemetry.sdk._logsimportLogDatadefexport(self,batch:Sequence[LogData])->LogRecordExportResult: ...# Afterfromopentelemetry.sdk._logsimportReadableLogRecorddefexport(self,batch:Sequence[ReadableLogRecord])->LogRecordExportResult: ... For Log Processors: UseReadWriteLogRecord for processing,ReadableLogRecord for exporting # Beforefromopentelemetry.sdk._logsimportLogDatadefon_emit(self,log_data:LogData): ...# Afterfromopentelemetry.sdk._logsimportReadWriteLogRecord,ReadableLogRecorddefon_emit(self,log_record:ReadWriteLogRecord):# Convert to ReadableLogRecord before exportingreadable=ReadableLogRecord(log_record=log_record.log_record,resource=log_record.resourceorResource.create({}),instrumentation_scope=log_record.instrumentation_scope,limits=log_record.limits, ) ...Accessing log data: Use the same attributes onReadableLogRecord/ReadWriteLogRecord log_record.log_record - The API LogRecord (contains body, severity, attributes, etc.)log_record.resource - The Resourcelog_record.instrumentation_scope - The InstrumentationScope (now included, was in LogData before)log_record.limits - The LogRecordLimits
Mark the Events API/SDK as deprecated. The Logs API/SDK should be used instead, an event is now aLogRecord with theevent_name field set (#4654). Fix type checking for built-in metric exporters (#4820)
This discussion was created from the releaseVersion 1.39.0/0.60b0. |