opentelemetry-dotnet
                                
                                 opentelemetry-dotnet copied to clipboard
                                
                                    opentelemetry-dotnet copied to clipboard
                            
                            
                            
                        [logs] Support OTel Logs Bridge API
The OpenTelemetry Specification has been updated with some new logging APIs marked stable:
API: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md SDK: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md
This issue is for tracking the work to implement this in OTel .NET.
Note: This work has been made an experimental feature (see #4735). The APIs will be public in prerelease builds of OpenTelemetry .NET (starting with 1.6.0-alpha.1) but will be internal in stable builds.
- [X] OpenTelemetry.Api updates
- [X] Initial definition: #4422
- [X] Drop class InstrumentationScope: #4436
- [X] LogRecordSeverityenum: #4451
- [X] Expose implementation publicly: #4552
- [X] EmitLog API feedback: #4559
 
- [X] OpenTelemetry.Api.ProviderBuilderExtensions updates (DI surface)
- [X] Initial definition: #4434
- [X] Updates for recent changes to tracing & metrics: #4531
- [X] Expose implementation publicly: #4558
 
- [X] OpenTelemetry (SDK) updates
- [X] Define IServiceCollection builder: #4441
- [X] Define BatchExportLogRecordProcessorOptions: #4446
- [X] Define sdk builder: #4447
- [X] Define builder extensions: #4450
- [X] Define provider extensions: #4480
- [X] Define LoggerProviderSdk: #4453
- [X] Define LoggerSdk: #4455
- [X] LogRecord updates: #4456
- [X] Unit test: #4462
 
- [X] Update BatchExportLogRecordProcessorOptions for spec stable: #4463
- [X] Define Sdk.CreateLoggerProviderBuilder: #4464
- [X] Add tests for sdk builder extensions & provider: #4467
- [X] Update ILoggerProvider to use OTel LoggerProvider: #4473
- [X] New API surface for passing LoggerProvider to ILogger integration: #5072
- Proposal 1: #4496
- Proposal 2: #4501
- Proposal 3: #4502
- Proposal 4: #4506
 
 
- [X] New API surface for passing LoggerProvider to ILogger integration: #5072
- [x] Expose implementation publicly: #4568
- [X] Instrumentation scope version fix: #4635
 
- [X] OpenTelemetry.Extensions.Hosting updates
- [X] Define WithLogging: #4483
- [X] Remove auto-registration of ILogger: #4535
- [X] Expose implementation publicly: #4735
 
- [X] Define 
- [X] OpenTelemetry.Exporter.InMemory updates
- [X] Add LoggerProviderBuilderregistration extension: #4541
- [X] Expose implementation publicly: #4584
 
- [X] Add 
- [X] OpenTelemetry.Exporter.Console updates
- [X] Add LoggerProviderBuilderregistration extension: #4549
- [X] Updates for LogRecord.Severity&LogRecord.SeverityText: #4568
- [X] Expose implementation publicly: #4583
 
- [X] Add 
- [X] OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs updates
- [X] Updates for LogRecord.Severity&LogRecord.SeverityText: #4568
- [X] Add LoggerProviderBuilderregistration extension: #5103
- [X] Add support for Bodyset directly onLogRecord: #5268
- [X] Add support for LogRecords withoutCategoryNameset: #5300
 
- [X] Updates for 
- [ ] Before marking stable future open/follow-up items:
- [ ] LogRecord.Severity nullable: https://github.com/open-telemetry/opentelemetry-dotnet/pull/4456#discussion_r1183013068
- [ ] Discuss obsoletions:
- OpenTelemetryLoggerOptions.AddProcessor&- OpenTelemetryLoggerOptions.SetResourceBuilder
- InMemoryExporter, ConsoleExporter, & OtlpExporter OpenTelemetryLoggerOptionsregistration extensions
 
- [X] Remove added InternalsVisibleTo- [X] OpenTelemetry.Api: #4552
- [X] OpenTelemetry.Api.ProviderBuilderExtensions: #4558
- [X] OpenTelemetry: #4568
 
- [ ] Documentation updates
- [ ] Example updates
- [ ] Public API review
 
Relates to #4014
Is there a PR to add .WithLogging(c => c.AddOtlpExporter());? didn't find it in the list.
Is there a PR to add
.WithLogging(c => c.AddOtlpExporter());? didn't find it in the list.
It is separate from Bridge itself. See https://github.com/open-telemetry/opentelemetry-dotnet/pull/5648