Skip to content

Commit

Permalink
Fix wrong name suggestion made by bogdandrutu
Browse files Browse the repository at this point in the history
In #5929, the suggestion to have the combined name as "MarshalerSizer" was wrong.

Even the comment #5929 (comment) was wrong since the link is `WriteSeeker`.

Signed-off-by: Bogdan <[email protected]>
  • Loading branch information
bogdandrutu committed Sep 6, 2022
1 parent 8b18d1a commit 91f2632
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

### 🚩 Deprecations 🚩

- Deprecate `p[metric|log|trace].MarshalerSizer` in favor of `p[metric|log|trace].MarshalSizer`. (#6033)
- Deprecate `pcommon.Map.Update+` in favor of `pcommon.Map.Get` + `pcommon.Value.Set+` (#6013)
- Deprecate `pcommon.Empty[Trace|Span]ID` in favor of `pcommon.New[Trace|Span]IDEmpty` (#6008)
- Deprecate `pcommon.[Trace|Span]ID.Bytes` in favor direct conversion. (#6008)
Expand Down
7 changes: 5 additions & 2 deletions pdata/plog/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@

package plog // import "go.opentelemetry.io/collector/pdata/plog"

// MarshalerSizer is the interface that groups the basic Marshal and Size methods
type MarshalerSizer interface {
// Deprecated: [v0.60.0] use MarshalSizer.
type MarshalerSizer = MarshalSizer

// MarshalSizer is the interface that groups the basic Marshal and Size methods
type MarshalSizer interface {
Marshaler
Sizer
}
Expand Down
4 changes: 2 additions & 2 deletions pdata/plog/pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
otlplogs "go.opentelemetry.io/collector/pdata/internal/data/protogen/logs/v1"
)

// NewProtoMarshaler returns a MarshalerSizer.
// NewProtoMarshaler returns a MarshalSizer.
// Marshals to OTLP binary protobuf bytes and calculates the size of the marshaled Logs.
func NewProtoMarshaler() MarshalerSizer {
func NewProtoMarshaler() MarshalSizer {
return newPbMarshaler()
}

Expand Down
7 changes: 5 additions & 2 deletions pdata/pmetric/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@

package pmetric // import "go.opentelemetry.io/collector/pdata/pmetric"

// MarshalerSizer is the interface that groups the basic Marshal and Size methods
type MarshalerSizer interface {
// Deprecated: [v0.60.0] use MarshalSizer.
type MarshalerSizer = MarshalSizer

// MarshalSizer is the interface that groups the basic Marshal and Size methods
type MarshalSizer interface {
Marshaler
Sizer
}
Expand Down
4 changes: 2 additions & 2 deletions pdata/pmetric/pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
otlpmetrics "go.opentelemetry.io/collector/pdata/internal/data/protogen/metrics/v1"
)

// NewProtoMarshaler returns a MarshalerSizer.
// NewProtoMarshaler returns a MarshalSizer.
// Marshals to OTLP binary protobuf bytes and calculates the size of the marshaled Metrics.
func NewProtoMarshaler() MarshalerSizer {
func NewProtoMarshaler() MarshalSizer {
return newPbMarshaler()
}

Expand Down
7 changes: 5 additions & 2 deletions pdata/ptrace/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@

package ptrace // import "go.opentelemetry.io/collector/pdata/ptrace"

// MarshalerSizer is the interface that groups the basic Marshal and Size methods
type MarshalerSizer interface {
// Deprecated: [v0.60.0] use MarshalSizer.
type MarshalerSizer = MarshalSizer

// MarshalSizer is the interface that groups the basic Marshal and Size methods
type MarshalSizer interface {
Marshaler
Sizer
}
Expand Down
4 changes: 2 additions & 2 deletions pdata/ptrace/pb.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ import (
otlptrace "go.opentelemetry.io/collector/pdata/internal/data/protogen/trace/v1"
)

// NewProtoMarshaler returns a MarshalerSizer.
// NewProtoMarshaler returns a MarshalSizer.
// Marshals to OTLP binary protobuf bytes and calculates the size of the marshaled Traces.
func NewProtoMarshaler() MarshalerSizer {
func NewProtoMarshaler() MarshalSizer {
return newPbMarshaler()
}

Expand Down

0 comments on commit 91f2632

Please sign in to comment.