diff --git a/.chloggen/pdata-deprecate-moveto.yaml b/.chloggen/pdata-deprecate-moveto.yaml new file mode 100755 index 00000000000..2ad12c169fa --- /dev/null +++ b/.chloggen/pdata-deprecate-moveto.yaml @@ -0,0 +1,11 @@ +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: deprecation + +# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver) +component: pdata + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: Deprecate [Metrics|Logs|Traces].MoveTo methods. + +# One or more tracking issues or pull requests related to the change +issues: [7091] diff --git a/pdata/plog/logs.go b/pdata/plog/logs.go index c0b1534eb5e..1947ad225ae 100644 --- a/pdata/plog/logs.go +++ b/pdata/plog/logs.go @@ -38,6 +38,7 @@ func NewLogs() Logs { // MoveTo moves the Logs instance overriding the destination and // resetting the current instance to its zero value. +// Deprecated: [1.0.0-rc5] The method can be replaced with a plain assignment. func (ms Logs) MoveTo(dest Logs) { *dest.getOrig() = *ms.getOrig() *ms.getOrig() = otlpcollectorlog.ExportLogsServiceRequest{} diff --git a/pdata/pmetric/metrics.go b/pdata/pmetric/metrics.go index bb6fcf0afd4..bae9c73e7d8 100644 --- a/pdata/pmetric/metrics.go +++ b/pdata/pmetric/metrics.go @@ -43,6 +43,7 @@ func (ms Metrics) CopyTo(dest Metrics) { // MoveTo moves the Metrics instance overriding the destination and // resetting the current instance to its zero value. +// Deprecated: [1.0.0-rc5] The method can be replaced with a plain assignment. func (ms Metrics) MoveTo(dest Metrics) { *dest.getOrig() = *ms.getOrig() *ms.getOrig() = otlpcollectormetrics.ExportMetricsServiceRequest{} diff --git a/pdata/ptrace/traces.go b/pdata/ptrace/traces.go index 6f629201509..757bd67f903 100644 --- a/pdata/ptrace/traces.go +++ b/pdata/ptrace/traces.go @@ -38,6 +38,7 @@ func NewTraces() Traces { // MoveTo moves the Traces instance overriding the destination and // resetting the current instance to its zero value. +// Deprecated: [1.0.0-rc5] The method can be replaced with a plain assignment. func (ms Traces) MoveTo(dest Traces) { *dest.getOrig() = *ms.getOrig() *ms.getOrig() = otlpcollectortrace.ExportTraceServiceRequest{}