[Logs] Sync up logger provider build-up scenarios with tracer provider#3596
Merged
CodeBlanch merged 7 commits intoopen-telemetry:mainfrom Sep 7, 2022
Merged
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3596 +/- ##
==========================================
+ Coverage 87.14% 87.34% +0.20%
==========================================
Files 280 282 +2
Lines 10112 10132 +20
==========================================
+ Hits 8812 8850 +38
+ Misses 1300 1282 -18
|
Contributor
|
This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day. |
pellared
reviewed
Sep 6, 2022
alanwest
reviewed
Sep 7, 2022
| /// </remarks> | ||
| public class BatchExportLogRecordProcessorOptions : BatchExportProcessorOptions<LogRecord> | ||
| { | ||
| internal const string MaxQueueSizeEnvVarKey = "OTEL_DOTNET_BLP_MAX_QUEUE_SIZE"; |
Member
There was a problem hiding this comment.
I assume the spec will declare official environment variable names. You think we can be optimistic and remove DOTNET from these environment variable names and just go with OTEL_BLP_MAX_QUEUE_SIZE for example?
Member
There was a problem hiding this comment.
oh scratch that i just saw the previous resolved conversation..
Member
Author
|
Merged to keep moving. Hoping to settle the environment variables before stable release. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
This PR syncs up the LoggerProvider scenarios (added on #3504) with the TracerProvider scenarios (#3533)
BaseProcessor<LogRecord>s &Action<IServiceProvider, OpenTelemetryLoggerProvider>s into theIServiceCollectionPublic API
namespace OpenTelemetry.Logs { public class OpenTelemetryLoggerOptions { + public OpenTelemetryLoggerOptions AddExporter(ExportProcessorType exportProcessorType, BaseExporter<LogRecord> exporter) {} + public OpenTelemetryLoggerOptions AddExporter(ExportProcessorType exportProcessorType, BaseExporter<LogRecord> exporter, Action<ExportLogRecordProcessorOptions> configure) {} + public OpenTelemetryLoggerOptions AddExporter<T>(ExportProcessorType exportProcessorType) where T : BaseExporter<LogRecord> {} + public OpenTelemetryLoggerOptions AddExporter<T>(ExportProcessorType exportProcessorType, Action<ExportLogRecordProcessorOptions> configure) where T : BaseExporter<LogRecord> {} } // This class is similar to MetricReaderOptions and is used by AddExporter extensions + public class ExportLogRecordProcessorOptions + { + public ExportProcessorType ExportProcessorType { get; set; } + public BatchExportLogRecordProcessorOptions BatchExportProcessorOptions { get; set; } + } // This class is similar to BatchExportActivityProcessorOptions and exists so separate environment variables may be used to configure batch log processor settings + public class BatchExportLogRecordProcessorOptions + { + } }TODOs
CHANGELOG.mdupdated for non-trivial changes