Clarify what LogRecordProcessor is able to modify #3902
Labels
spec:logs
Related to the specification/logs directory
triaged-accepted
The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal
What are you trying to achieve?
I want to model
LogRecordProcessor
for Go SDK (open-telemetry/opentelemetry-go#4896).Currently this is what the spec says about
ReadWriteLogRecord
(theOnEmit
argument):Take notice that the full LogRecord contains info such us
Resource
andInstrumentationScope
. According to the spec the LogRecordProcessor should enable modifying them. Personally, I am not sure if it is desired.What should we do if the processor modifies the resource? Should we alter it for records emitted by the SDK or only this one being processed?
What should we do if the processor modifies the instrumentation? Should we alter it for all records associated with the instrumentation scope or only this one being processed?
Can the processor also modify the counts for attributes due to collection limits?
Shouldn't the processor be only allowing to modify the fields which can be set via
Emit
(via `Logger) using the Bridge API?Additionally, I am also not certain if the processor should be able to alter the Trace Context Fields.
I propose to explicitly list what LogRecordProcessor is able to modify.
Additional context
This is what it is possible to do with a
LogRecordProcessor
in different stable logs SDK implementations:The text was updated successfully, but these errors were encountered: