-
Notifications
You must be signed in to change notification settings - Fork 933
Add severity-based and trace-based log record processors #4611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
21b4940
a5e39f1
24000ec
f0f47fa
1e680b7
d243d93
c7834b1
a75d666
49494bf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,6 +36,8 @@ weight: 3 | |
| * [Built-in processors](#built-in-processors) | ||
| + [Simple processor](#simple-processor) | ||
| + [Batching processor](#batching-processor) | ||
| + [Severity based processor](#severity-based-processor) | ||
| + [Trace based processor](#trace-based-processor) | ||
| - [LogRecordExporter](#logrecordexporter) | ||
| * [LogRecordExporter operations](#logrecordexporter-operations) | ||
| + [Export](#export) | ||
|
|
@@ -456,6 +458,9 @@ make the flush timeout configurable. | |
| The standard OpenTelemetry SDK MUST implement both simple and batch processors, | ||
| as described below. | ||
|
|
||
| **Status**: [Development](../document-status.md) - The SDK SHOULD implement | ||
| severity based and trace based processors, as described below. | ||
pellared marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Other common processing scenarios SHOULD be first considered | ||
| for implementation out-of-process | ||
| in [OpenTelemetry Collector](../overview.md#collector). | ||
|
|
@@ -495,6 +500,54 @@ to make sure that they are not invoked concurrently. | |
| * `maxExportBatchSize` - the maximum batch size of every export. It must be | ||
| smaller or equal to `maxQueueSize`. The default value is `512`. | ||
|
|
||
| #### Severity based processor | ||
pellared marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| **Status**: [Development](../document-status.md) | ||
|
|
||
| This processor filters log records by minimum severity level. | ||
trask marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| **Required operations:** | ||
|
|
||
| * [`Enabled`](#enabled-1) - Return `false` if the provided | ||
trask marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| [Severity Number](./data-model.md#field-severitynumber) is below the | ||
| configured `minimumSeverity`. Otherwise, forward to the delegate's | ||
| `Enabled` method if available and return `true` if not available. | ||
| * [`OnEmit`](#onemit) - If the log record's severity is below the configured | ||
| `minimumSeverity`, do not forward it to the delegate. Otherwise, forward the | ||
| log record to the delegate. | ||
| * [`Shutdown`](#shutdown) - Forward to the delegate's `Shutdown` method. | ||
| * [`ForceFlush`](#forceflush-1) - Forward to the delegate's `ForceFlush` method. | ||
|
|
||
| **Configurable parameters:** | ||
|
|
||
| * `minimumSeverity` - the minimum severity level required for passing the | ||
| log record on to the delegate. | ||
| * `delegate` - the processor to delegate to for log records that are not | ||
| filtered out. | ||
|
|
||
| #### Trace based processor | ||
pellared marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| **Status**: [Development](../document-status.md) | ||
|
|
||
| This processor filters log records by span sampling status. | ||
|
|
||
| **Required operations:** | ||
|
|
||
| * [`Enabled`](#enabled-1) - Return `false` if the current | ||
| [Context](../context/README.md) contains a valid span context that is not | ||
| sampled. Otherwise, forward to the delegate's `Enabled` method if available | ||
| and return `true` if not available. | ||
| * [`OnEmit`](#onemit) - If the log record is associated with a valid span | ||
| context that is not sampled, do not forward it to the delegate. Otherwise, | ||
| forward the log record to the delegate. | ||
|
||
| * [`Shutdown`](#shutdown) - Forward to the delegate's `Shutdown` method. | ||
| * [`ForceFlush`](#forceflush-1) - Forward to the delegate's `ForceFlush` method. | ||
|
|
||
| **Configurable parameters:** | ||
|
|
||
| * `delegate` - the processor to delegate to for log records that are not | ||
| filtered out. | ||
|
|
||
| ## LogRecordExporter | ||
|
|
||
| `LogRecordExporter` defines the interface that protocol-specific exporters must | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.