open-telemetry/opentelemetry-dotnet

[logs] Support OTel Logs Bridge API

CodeBlanch opened this issue · 2 comments

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.

  • OpenTelemetry.Api updates
  • OpenTelemetry.Api.ProviderBuilderExtensions updates (DI surface)
    • Initial definition: #4434
    • Updates for recent changes to tracing & metrics: #4531
    • Expose implementation publicly: #4558
  • OpenTelemetry (SDK) updates
    • Define IServiceCollection builder: #4441
    • Define BatchExportLogRecordProcessorOptions: #4446
    • Define sdk builder: #4447
    • Define builder extensions: #4450
    • Define provider extensions: #4480
    • Define LoggerProviderSdk: #4453
    • Define LoggerSdk: #4455
    • LogRecord updates: #4456
    • Update BatchExportLogRecordProcessorOptions for spec stable: #4463
    • Define Sdk.CreateLoggerProviderBuilder: #4464
    • Add tests for sdk builder extensions & provider: #4467
    • Update ILoggerProvider to use OTel LoggerProvider: #4473
      • New API surface for passing LoggerProvider to ILogger integration: #5072
    • Expose implementation publicly: #4568
    • Instrumentation scope version fix: #4635
  • OpenTelemetry.Extensions.Hosting updates
    • Define WithLogging: #4483
    • Remove auto-registration of ILogger: #4535
    • Expose implementation publicly: #4735
  • OpenTelemetry.Exporter.InMemory updates
    • Add LoggerProviderBuilder registration extension: #4541
    • Expose implementation publicly: #4584
  • OpenTelemetry.Exporter.Console updates
    • Add LoggerProviderBuilder registration extension: #4549
    • Updates for LogRecord.Severity & LogRecord.SeverityText: #4568
    • Expose implementation publicly: #4583
  • OpenTelemetry.Exporter.OpenTelemetryProtocol.Logs updates
    • Updates for LogRecord.Severity & LogRecord.SeverityText: #4568
    • Add LoggerProviderBuilder registration extension: #5103
    • Add support for Body set directly on LogRecord: #5268
    • Add support for LogRecords without CategoryName set: #5300
  • Before marking stable future open/follow-up items:
    • LogRecord.Severity nullable: #4456 (comment)
    • Discuss obsoletions:
      • OpenTelemetryLoggerOptions.AddProcessor & OpenTelemetryLoggerOptions.SetResourceBuilder
      • InMemoryExporter, ConsoleExporter, & OtlpExporter OpenTelemetryLoggerOptions registration extensions
    • Remove added InternalsVisibleTo
      • OpenTelemetry.Api: #4552
      • OpenTelemetry.Api.ProviderBuilderExtensions: #4558
      • OpenTelemetry: #4568
    • Documentation updates
    • Example updates
    • Public API review

Relates to #4014

alrz commented

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 #5648