Skip to content

Commit

Permalink
[pdata] Deprecate pcommon.Value.Equal method (#6812)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitryax authored Dec 16, 2022
1 parent 16faf49 commit 557c077
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .chloggen/deprecate-value-equal.yaml
Original file line number Diff line number Diff line change
@@ -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 `pcommon.Value.Equal` method

# One or more tracking issues or pull requests related to the change
issues: [6811]
3 changes: 3 additions & 0 deletions pdata/pcommon/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ func (v Value) CopyTo(dest Value) {
}

// Equal checks for equality, it returns true if the objects are equal otherwise false.
// Deprecated: [1.0.0-rc2] Use v1.AsRaw() == v2.AsRaw() in tests.
// If you need this method where performance is critical, please share your use case in
// https://github.com/open-telemetry/opentelemetry-collector/issues/6811
func (v Value) Equal(av Value) bool {
if v.getOrig() == av.getOrig() {
return true
Expand Down

0 comments on commit 557c077

Please sign in to comment.