Skip to content

Commit

Permalink
[docs] Correct the exporter README section on data mutation (open-tel…
Browse files Browse the repository at this point in the history
…emetry#7424)

* Correct the section about mutating data

* Typos
  • Loading branch information
matej-g authored Apr 17, 2023
1 parent fe508cf commit 8e95d8f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions exporter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,10 @@ When multiple exporters are configured to send the same data (e.g. by configurin
exporters for the same pipeline):
* exporters *not* configured to mutate the data will have shared access to the data
* exporters with the Capabilities to mutate the data will receive a copy of the data

Exporters access export data when `ConsumeTraces`/`ConsumeMetrics`/`ConsumeLogs`
function is called. Exporters MUST NOT modify the `pdata.Traces`/`pdata.Metrics`/`pdata.Logs` argument of
these functions. If the exporter needs to modify the data while performing the exporting
the exporter can clone the data and perform the modification on the clone or use a
copy-on-write approach for individual sub-parts of `pdata.Traces`/`pdata.Metrics`/`pdata.Logs`.
Any approach that does not mutate the original `pdata.Traces`/`pdata.Metrics`/`pdata.Logs` is allowed.
function is called. Unless exporter's capabalities include mutation, the exporter MUST NOT modify the `pdata.Traces`/`pdata.Metrics`/`pdata.Logs` argument of
these functions. Any approach that does not mutate the original `pdata.Traces`/`pdata.Metrics`/`pdata.Logs` is allowed without the mutation capability.

## Proxy Support

Expand All @@ -99,4 +97,4 @@ following proxy environment variables:
- NO_PROXY

If set at Collector start time then exporters, regardless of protocol,
will or will not proxy traffic as defined by these environment variables.
will or will not proxy traffic as defined by these environment variables.

0 comments on commit 8e95d8f

Please sign in to comment.