You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-23 22:34:47 +02:00
sdk/log: Document how Processor and Exporter interfaces can be extended (#5347)
This commit is contained in:
@@ -570,6 +570,9 @@ functionality should be added, each one will need their own super-set
|
|||||||
interfaces and will duplicate the pattern. For this reason, the simple targeted
|
interfaces and will duplicate the pattern. For this reason, the simple targeted
|
||||||
interface that defines the specific functionality should be preferred.
|
interface that defines the specific functionality should be preferred.
|
||||||
|
|
||||||
|
See also:
|
||||||
|
[Keeping Your Modules Compatible: Working with interfaces](https://go.dev/blog/module-compatibility#working-with-interfaces).
|
||||||
|
|
||||||
### Testing
|
### Testing
|
||||||
|
|
||||||
The tests should never leak goroutines.
|
The tests should never leak goroutines.
|
||||||
|
|||||||
@@ -50,6 +50,11 @@ The user set processors for the `LoggerProvider` using
|
|||||||
|
|
||||||
The user can configure custom processors and decorate built-in processors.
|
The user can configure custom processors and decorate built-in processors.
|
||||||
|
|
||||||
|
The specification may add new operations to the
|
||||||
|
[LogRecordProcessor](https://opentelemetry.io/docs/specs/otel/logs/sdk/#logrecordprocessor).
|
||||||
|
If it happens, [CONTRIBUTING.md](../../CONTRIBUTING.md#how-to-change-other-interfaces)
|
||||||
|
describes how the SDK can be extended in a backwards-compatible way.
|
||||||
|
|
||||||
### SimpleProcessor
|
### SimpleProcessor
|
||||||
|
|
||||||
The [Simple processor](https://opentelemetry.io/docs/specs/otel/logs/sdk/#simple-processor)
|
The [Simple processor](https://opentelemetry.io/docs/specs/otel/logs/sdk/#simple-processor)
|
||||||
@@ -74,6 +79,11 @@ so that the caller can reuse the passed slice
|
|||||||
(e.g. using [`sync.Pool`](https://pkg.go.dev/sync#Pool))
|
(e.g. using [`sync.Pool`](https://pkg.go.dev/sync#Pool))
|
||||||
to avoid heap allocations on each call.
|
to avoid heap allocations on each call.
|
||||||
|
|
||||||
|
The specification may add new operations to the
|
||||||
|
[LogRecordExporter](https://opentelemetry.io/docs/specs/otel/logs/sdk/#logrecordexporter).
|
||||||
|
If it happens, [CONTRIBUTING.md](../../CONTRIBUTING.md#how-to-change-other-interfaces)
|
||||||
|
describes how the SDK can be extended in a backwards-compatible way.
|
||||||
|
|
||||||
### Record
|
### Record
|
||||||
|
|
||||||
The [ReadWriteLogRecord](https://opentelemetry.io/docs/specs/otel/logs/sdk/#readwritelogrecord)
|
The [ReadWriteLogRecord](https://opentelemetry.io/docs/specs/otel/logs/sdk/#readwritelogrecord)
|
||||||
|
|||||||
Reference in New Issue
Block a user