Skip to content

Commit a7d0683

Browse files
authored
doc(sdk-logs): document that SimpleLogRecordProcessor is not for production use (#6080)
1 parent 47f1b4e commit a7d0683

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

experimental/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ For notes on migrating to 2.x / 0.200.x see [the upgrade guide](doc/upgrade-to-2
3131

3232
### :books: Documentation
3333

34+
* doc(sdk-logs): document that SimpleLogRecordProcessor is not for production use [#6080](https://github.com/open-telemetry/opentelemetry-js/pull/6080) @cjihrig
35+
3436
### :house: Internal
3537

3638
* test(otlp-grpc-exporter-base): increase timeout in flaky test [#6042](https://github.com/open-telemetry/opentelemetry-js/pull/6042) @cjihrig

experimental/packages/sdk-logs/src/export/SimpleLogRecordProcessor.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ import type { LogRecordExporter } from './LogRecordExporter';
2525
import type { LogRecordProcessor } from '../LogRecordProcessor';
2626
import type { SdkLogRecord } from './SdkLogRecord';
2727

28+
/**
29+
* An implementation of the {@link LogRecordProcessor} interface that exports
30+
* each {@link LogRecord} as it is emitted.
31+
*
32+
* NOTE: This {@link LogRecordProcessor} exports every {@link LogRecord}
33+
* individually instead of batching them together, which can cause significant
34+
* performance overhead with most exporters. For production use, please consider
35+
* using the {@link BatchLogRecordProcessor} instead.
36+
*/
2837
export class SimpleLogRecordProcessor implements LogRecordProcessor {
2938
private _shutdownOnce: BindOnceFuture<void>;
3039
private _unresolvedExports: Set<Promise<void>>;

0 commit comments

Comments
 (0)