[Otlp Readme]Add notes for configuring logging for different types of apps (#4806)

This commit is contained in:
Vishwesh Bankwar 2023-08-28 18:02:37 -07:00 committed by GitHub
parent 192720f936
commit 2adcf43079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View File

@ -96,8 +96,9 @@ is used to achieve structured logging and better performance. The logs are sent
the `OpenTelemetryLoggerProvider`, which is configured to export logs to
`ConsoleExporter`. `ConsoleExporter` simply displays it on the console.
> **Note**
> Certain types of applications (e.g. [ASP.NET
## Note for different application types
Certain types of applications (e.g. [ASP.NET
Core](https://learn.microsoft.com/aspnet/core) and [.NET
Worker](https://learn.microsoft.com/dotnet/core/extensions/workers)) have an
`ILogger` based logging pipeline set up by default. In such apps, enabling

View File

@ -75,6 +75,13 @@ customize the `LogRecordExportProcessorOptions` or see the [Environment
Variables](#environment-variables) section below on how to customize using
environment variables.
> **Note** For details on how to configure logging with OpenTelemetry check this
> [console](../../docs/logs/getting-started-console/Program.cs) or [ASP.NET
Core](../../examples/AspNetCore/Program.cs) example app. Check this
**[section](../../docs/logs/getting-started-console/readme.md#note-for-different-application-types)**
for configuring OpenTelemetry with `ILogger` for certain application types such
as ASP.NET Core and .NET Worker.
## Configuration
You can configure the `OtlpExporter` through `OtlpExporterOptions`