Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pdata] Remove deprecated API #6314

Merged
merged 1 commit into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .chloggen/remove-deprecated-pdata-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
change_type: breaking
component: pdata
note: Remove API deprecated in 0.62.0
issues: [6314]
subtext: |
- Remove deprecated `pcommon.NewValueString`
- Remove deprecated `pcommon.Map.PutString`
- Remove deprecated `plog.SeverityNumberUndefined`
- Remove deprecated `p[metric|log|trace]otlp.RegisterServer`
- Remove deprecated `pmetric.[Default]?MetricDataPointFlags`
- Remove deprecated `pmetric.MetricAggregationTemporality*`
- Remove deprecated `pmetric.MetricTypeNone`
- Remove deprecated `pmetric.NumberDataPointValueTypeNone`
- Remove deprecated `pmetric.ExemplarValueTypeNone`
- Remove deprecated `pmetric.[New]?Buckets
- Remove deprecated `pmetric.[New]?ValueAtQuantile`
- Remove deprecated `pmetric.[New]?ValueAtQuantileSlice`
- Remove deprecated `ptrace.[New]?SpanStatus`
11 changes: 0 additions & 11 deletions pdata/pcommon/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ func NewValueStr(v string) Value {
return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_StringValue{StringValue: v}})
}

// Deprecated: [v0.62.0] Use NewValueStr instead.
var NewValueString = NewValueStr

// NewValueInt creates a new Value with the given int64 value.
func NewValueInt(v int64) Value {
return newValue(&otlpcommon.AnyValue{Value: &otlpcommon.AnyValue_IntValue{IntValue: v}})
Expand Down Expand Up @@ -650,14 +647,6 @@ func (m Map) PutStr(k string, v string) {
}
}

// PutString performs the Insert or Update action. The Value is
// inserted to the map that did not originally have the key. The key/value is
// updated to the map where the key already existed.
// Deprecated: [v0.62.0] Use PutStr instead.
func (m Map) PutString(k string, v string) {
m.PutStr(k, v)
}

// PutInt performs the Insert or Update action. The int Value is
// inserted to the map that did not originally have the key. The key/value is
// updated to the map where the key already existed.
Expand Down
3 changes: 0 additions & 3 deletions pdata/plog/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,5 @@ const (
SeverityNumberFatal4 = SeverityNumber(otlplogs.SeverityNumber_SEVERITY_NUMBER_FATAL4)
)

// Deprecated: [v0.62.0] Use SeverityNumberUnspecified instead.
const SeverityNumberUndefined = SeverityNumberUnspecified

// String returns the string representation of the SeverityNumber.
func (sn SeverityNumber) String() string { return otlplogs.SeverityNumber(sn).String() }
3 changes: 0 additions & 3 deletions pdata/plog/plogotlp/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,6 @@ func RegisterGRPCServer(s *grpc.Server, srv GRPCServer) {
otlpcollectorlog.RegisterLogsServiceServer(s, &rawLogsServer{srv: srv})
}

// Deprecated: [v0.62.0] Use RegisterGRPCServer instead
var RegisterServer = RegisterGRPCServer

type rawLogsServer struct {
srv GRPCServer
}
Expand Down
6 changes: 0 additions & 6 deletions pdata/pmetric/metric_data_point_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,3 @@ func (ms DataPointFlags) WithNoRecordedValue(b bool) DataPointFlags {
}
return DataPointFlags(orig)
}

// Deprecated: [0.62.0] Use DefaultDataPointFlags instead.
var DefaultMetricDataPointFlags = DefaultDataPointFlags

// Deprecated: [0.62.0] Use DataPointFlags instead.
type MetricDataPointFlags = DataPointFlags
41 changes: 0 additions & 41 deletions pdata/pmetric/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ const (
MetricTypeSummary
)

// Deprecated: [0.62.0] Use MetricTypeEmpty instead.
const MetricTypeNone = MetricTypeEmpty

// String returns the string representation of the MetricType.
func (mdt MetricType) String() string {
switch mdt {
Expand Down Expand Up @@ -159,20 +156,6 @@ func (at AggregationTemporality) String() string {
return ""
}

// Deprecated: [v0.62.0] Use AggregationTemporality instead.
type MetricAggregationTemporality = AggregationTemporality

const (
// Deprecated: [v0.62.0] Use AggregationTemporalityUnspecified instead.
MetricAggregationTemporalityUnspecified = AggregationTemporalityUnspecified

// Deprecated: [v0.62.0] Use AggregationTemporalityDelta instead.
MetricAggregationTemporalityDelta = AggregationTemporalityDelta

// Deprecated: [v0.62.0] Use AggregationTemporalityCumulative instead.
MetricAggregationTemporalityCumulative = AggregationTemporalityCumulative
)

// NumberDataPointValueType specifies the type of NumberDataPoint value.
type NumberDataPointValueType int32

Expand All @@ -183,9 +166,6 @@ const (
NumberDataPointValueTypeDouble
)

// Deprecated: [0.62.0] Use NumberDataPointValueTypeEmpty instead.
const NumberDataPointValueTypeNone = NumberDataPointValueTypeEmpty

// String returns the string representation of the NumberDataPointValueType.
func (nt NumberDataPointValueType) String() string {
switch nt {
Expand All @@ -209,9 +189,6 @@ const (
ExemplarValueTypeDouble
)

// Deprecated: [0.62.0] Use ExemplarValueTypeEmpty instead.
const ExemplarValueTypeNone = ExemplarValueTypeEmpty

// String returns the string representation of the ExemplarValueType.
func (nt ExemplarValueType) String() string {
switch nt {
Expand All @@ -224,21 +201,3 @@ func (nt ExemplarValueType) String() string {
}
return ""
}

// Deprecated: [v0.62.0] Use ExponentialHistogramDataPointBuckets instead.
type Buckets = ExponentialHistogramDataPointBuckets

// Deprecated: [v0.62.0] Use NewExponentialHistogramDataPointBuckets instead.
var NewBuckets = NewExponentialHistogramDataPointBuckets

// Deprecated: [v0.62.0] Use SummaryDataPointValueAtQuantile instead.
type ValueAtQuantile = SummaryDataPointValueAtQuantile

// Deprecated: [v0.62.0] Use NewSummaryDataPointValueAtQuantile instead.
var NewValueAtQuantile = NewSummaryDataPointValueAtQuantile

// Deprecated: [v0.62.0] Use SummaryDataPointValueAtQuantileSlice instead.
type ValueAtQuantileSlice = SummaryDataPointValueAtQuantileSlice

// Deprecated: [v0.62.0] Use NewSummaryDataPointValueAtQuantileSlice instead.
var NewValueAtQuantileSlice = NewSummaryDataPointValueAtQuantileSlice
3 changes: 0 additions & 3 deletions pdata/pmetric/pmetricotlp/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@ func RegisterGRPCServer(s *grpc.Server, srv GRPCServer) {
otlpcollectormetrics.RegisterMetricsServiceServer(s, &rawMetricsServer{srv: srv})
}

// Deprecated: [v0.62.0] Use RegisterGRPCServer instead
var RegisterServer = RegisterGRPCServer

type rawMetricsServer struct {
srv GRPCServer
}
Expand Down
3 changes: 0 additions & 3 deletions pdata/ptrace/ptraceotlp/traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,6 @@ func RegisterGRPCServer(s *grpc.Server, srv GRPCServer) {
otlpcollectortrace.RegisterTraceServiceServer(s, &rawTracesServer{srv: srv})
}

// Deprecated: [v0.62.0] Use RegisterGRPCServer instead
var RegisterServer = RegisterGRPCServer

type rawTracesServer struct {
srv GRPCServer
}
Expand Down
6 changes: 0 additions & 6 deletions pdata/ptrace/traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,3 @@ const (

// String returns the string representation of the StatusCode.
func (sc StatusCode) String() string { return otlptrace.Status_StatusCode(sc).String() }

// Deprecated: [v0.62.0] Use Status instead.
type SpanStatus = Status

// Deprecated: [v0.62.0] Use NewStatus instead.
var NewSpanStatus = NewStatus