@@ -47,9 +47,10 @@ processor documentation for more information.
4747
4848## <a name =" data-ownership " ></a >Data Ownership
4949
50- The ownership of the ` TraceData ` and ` MetricsData ` in a pipeline is passed as the data travels
51- through the pipeline. The data is created by the receiver and then the ownership is passed
52- to the first processor when ` ConsumeTraceData ` /` ConsumeMetricsData ` function is called.
50+ The ownership of the ` pdata.Traces ` , ` pdata.Metrics ` and ` pdata.Logs ` data in a pipeline
51+ is passed as the data travels through the pipeline. The data is created by the receiver
52+ and then the ownership is passed to the first processor when ` ConsumeTraces ` /` ConsumeMetrics ` /` ConsumeLogs `
53+ function is called.
5354
5455Note: the receiver may be attached to multiple pipelines, in which case the same data
5556will be passed to all attached pipelines via a data fan-out connector.
@@ -79,8 +80,8 @@ data and the data can be safely modified in the pipeline.
7980
8081The exclusive ownership of data allows processors to freely modify the data while
8182they own it (e.g. see ` attributesprocessor ` ). The duration of ownership of the data
82- by processor is from the beginning of ` ConsumeTraceData ` /` ConsumeMetricsData ` call
83- until the processor calls the next processor's ` ConsumeTraceData ` /` ConsumeMetricsData `
83+ by processor is from the beginning of ` ConsumeTraces ` /` ConsumeMetrics ` / ` ConsumeLogs `
84+ call until the processor calls the next processor's ` ConsumeTraces ` /` ConsumeMetrics ` / ` ConsumeLogs `
8485function, which passes the ownership to the next processor. After that the processor
8586must no longer read or write the data since it may be concurrently modified by the
8687new owner.
@@ -97,17 +98,16 @@ In this mode no cloning is performed at the fan-out connector of receivers that
9798are attached to multiple pipelines. In this case all such pipelines will see
9899the same single shared copy of the data. Processors in pipelines operating in shared
99100ownership mode are prohibited from modifying the original data that they receive
100- via ` ConsumeTraceData ` /` ConsumeMetricsData ` call. Processors may only read the data but
101- must not modify the data.
101+ via ` ConsumeTraces ` /` ConsumeMetrics ` / ` ConsumeLogs ` call. Processors may only read
102+ the data but must not modify the data.
102103
103104If the processor needs to modify the data while performing the processing but
104105does not want to incur the cost of data cloning that Exclusive mode brings then
105106the processor can declare that it does not modify the data and use any
106107different technique that ensures original data is not modified. For example,
107108the processor can implement copy-on-write approach for individual sub-parts of
108- ` TraceData ` /` MetricsData ` argument. Any approach that does not mutate the
109- original ` TraceData ` /` MetricsData ` argument (including referenced data, such as
110- ` Node ` , ` Resource ` , ` Spans ` , etc) is allowed.
109+ ` pdata.Traces ` /` pdata.Metrics ` /` pdata.Logs ` argument. Any approach that does not
110+ mutate the original ` pdata.Traces ` /` pdata.Metrics ` /` pdata.Logs ` is allowed.
111111
112112If the processor uses such technique it should declare that it does not intend
113113to modify the original data by setting ` MutatesConsumedData=false ` in its capabilities
0 commit comments