Skip to content

Commit

Permalink
Merge branch 'main' into json_conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdandrutu authored Mar 17, 2022
2 parents abe157c + f3fd237 commit 5d5dfa5
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 88 deletions.
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,17 @@

### 🛑 Breaking changes 🛑

- Remove pdata `InternalRep` deprecated funcs (#5018)
- Remove service/defaultcomponents deprecated package (#5019)
- Remove deprecated UseOpenTelemetryForInternalMetrics (#5026)

### 🚩 Deprecations 🚩

- API related to `pdata.AttributeValue` is deprecated in favor of `pdata.Value` (#4975)
- `pdata.AttributeValue` struct is deprecated in favor of `pdata.Value`
- `pdata.AttributeValueType` type is deprecated in favor of `pdata.ValueType`
- `pdata.AttributeValueType...` constants are deprecated in favor of `pdata.ValueType...`
- `pdata.NewAttributeValue...` funcs are deprecated in favor of `pdata.NewValue...`

## v0.47.0 Beta

Expand All @@ -17,11 +27,6 @@
### 🚩 Deprecations 🚩

- pdata: deprecate funcs working with InternalRep (#4957)
- API related to `pdata.AttributeValue` is deprecated in favor of `pdata.Value` (#4975)
- `pdata.AttributeValue` struct is deprecated in favor of `pdata.Value`
- `pdata.AttributeValueType` type is deprecated in favor of `pdata.ValueType`
- `pdata.AttributeValueType...` constants are deprecated in favor of `pdata.ValueType...`
- `pdata.NewAttributeValue...` funcs are deprecated in favor of `pdata.NewValue...`
- Deprecate `pdata.AttributeMap.Delete` in favor of `pdata.AttributeMap.Remove` (#4914)
- Deprecate consumerhelper, move helpers to consumer (#5006)

Expand Down
4 changes: 0 additions & 4 deletions config/configtelemetry/configtelemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ const (
levelDetailedStr = "detailed"
)

// Deprecated: UseOpenTelemetryForInternalMetrics has been deprecated. Uses feature flag in
// telemetry.useOtelForInternalMetrics to handle this feature
const UseOpenTelemetryForInternalMetrics = false

// Level is the level of internal telemetry (metrics, logs, traces about the component itself)
// that every component should generate.
type Level int32
Expand Down
24 changes: 0 additions & 24 deletions model/internal/otlp_wrapper.go

This file was deleted.

6 changes: 0 additions & 6 deletions model/internal/pdata/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package pdata // import "go.opentelemetry.io/collector/model/internal/pdata"

import (
"go.opentelemetry.io/collector/model/internal"
otlplogs "go.opentelemetry.io/collector/model/internal/data/protogen/logs/v1"
)

Expand Down Expand Up @@ -51,11 +50,6 @@ func NewLogs() Logs {
return Logs{orig: &otlplogs.LogsData{}}
}

// Deprecated: [v0.47.0] will be removed soon, only used internally.
func (ld Logs) InternalRep() internal.LogsWrapper {
return internal.LogsWrapper{}
}

// MoveTo moves all properties from the current struct to dest
// resetting the current instance to its zero value.
func (ld Logs) MoveTo(dest Logs) {
Expand Down
6 changes: 0 additions & 6 deletions model/internal/pdata/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package pdata // import "go.opentelemetry.io/collector/model/internal/pdata"

import (
"go.opentelemetry.io/collector/model/internal"
otlpmetrics "go.opentelemetry.io/collector/model/internal/data/protogen/metrics/v1"
)

Expand Down Expand Up @@ -51,11 +50,6 @@ func NewMetrics() Metrics {
return Metrics{orig: &otlpmetrics.MetricsData{}}
}

// Deprecated: [v0.47.0] will be removed soon, only used internally.
func (md Metrics) InternalRep() internal.MetricsWrapper {
return internal.MetricsWrapper{}
}

// Clone returns a copy of MetricData.
func (md Metrics) Clone() Metrics {
cloneMd := NewMetrics()
Expand Down
6 changes: 0 additions & 6 deletions model/internal/pdata/traces.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package pdata // import "go.opentelemetry.io/collector/model/internal/pdata"

import (
"go.opentelemetry.io/collector/model/internal"
otlptrace "go.opentelemetry.io/collector/model/internal/data/protogen/trace/v1"
)

Expand Down Expand Up @@ -51,11 +50,6 @@ func NewTraces() Traces {
return Traces{orig: &otlptrace.TracesData{}}
}

// Deprecated: [v0.47.0] will be removed soon, only used internally.
func (td Traces) InternalRep() internal.TracesWrapper {
return internal.TracesWrapper{}
}

// MoveTo moves all properties from the current struct to dest
// resetting the current instance to its zero value.
func (td Traces) MoveTo(dest Traces) {
Expand Down
36 changes: 18 additions & 18 deletions model/pdata/common_alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import "go.opentelemetry.io/collector/model/internal/pdata"
type ValueType = pdata.ValueType

// AttributeValueType is an alias for pdata.ValueType type.
// Deprecated: [v0.47.0] Use ValueType instead.
// Deprecated: [v0.48.0] Use ValueType instead.
type AttributeValueType = pdata.ValueType

const (
Expand All @@ -36,35 +36,35 @@ const (
ValueTypeArray = pdata.ValueTypeArray
ValueTypeBytes = pdata.ValueTypeBytes

// Deprecated: [v0.47.0] Use ValueTypeEmpty instead.
// Deprecated: [v0.48.0] Use ValueTypeEmpty instead.
AttributeValueTypeEmpty = pdata.ValueTypeEmpty

// Deprecated: [v0.47.0] Use ValueTypeString instead.
// Deprecated: [v0.48.0] Use ValueTypeString instead.
AttributeValueTypeString = pdata.ValueTypeString

// Deprecated: [v0.47.0] Use ValueTypeInt instead.
// Deprecated: [v0.48.0] Use ValueTypeInt instead.
AttributeValueTypeInt = pdata.ValueTypeInt

// Deprecated: [v0.47.0] Use ValueTypeDouble instead.
// Deprecated: [v0.48.0] Use ValueTypeDouble instead.
AttributeValueTypeDouble = pdata.ValueTypeDouble

// Deprecated: [v0.47.0] Use ValueTypeBool instead.
// Deprecated: [v0.48.0] Use ValueTypeBool instead.
AttributeValueTypeBool = pdata.ValueTypeBool

// Deprecated: [v0.47.0] Use ValueTypeMap instead.
// Deprecated: [v0.48.0] Use ValueTypeMap instead.
AttributeValueTypeMap = pdata.ValueTypeMap

// Deprecated: [v0.47.0] Use ValueTypeArray instead.
// Deprecated: [v0.48.0] Use ValueTypeArray instead.
AttributeValueTypeArray = pdata.ValueTypeArray

// Deprecated: [v0.47.0] Use ValueTypeBytes instead.
// Deprecated: [v0.48.0] Use ValueTypeBytes instead.
AttributeValueTypeBytes = pdata.ValueTypeBytes
)

// Value is an alias for pdata.Value struct.
type Value = pdata.Value

// Deprecated: [v0.47.0] Use Value instead.
// Deprecated: [v0.48.0] Use Value instead.
type AttributeValue = pdata.Value

// Aliases for functions to create pdata.Value.
Expand All @@ -78,28 +78,28 @@ var (
NewValueArray = pdata.NewValueArray
NewValueBytes = pdata.NewValueBytes

// Deprecated: [v0.47.0] Use NewValueEmpty instead.
// Deprecated: [v0.48.0] Use NewValueEmpty instead.
NewAttributeValueEmpty = pdata.NewValueEmpty

// Deprecated: [v0.47.0] Use NewValueString instead.
// Deprecated: [v0.48.0] Use NewValueString instead.
NewAttributeValueString = pdata.NewValueString

// Deprecated: [v0.47.0] Use NewValueInt instead.
// Deprecated: [v0.48.0] Use NewValueInt instead.
NewAttributeValueInt = pdata.NewValueInt

// Deprecated: [v0.47.0] Use NewValueDouble instead.
// Deprecated: [v0.48.0] Use NewValueDouble instead.
NewAttributeValueDouble = pdata.NewValueDouble

// Deprecated: [v0.47.0] Use NewValueBool instead.
// Deprecated: [v0.48.0] Use NewValueBool instead.
NewAttributeValueBool = pdata.NewValueBool

// Deprecated: [v0.47.0] Use NewValueMap instead.
// Deprecated: [v0.48.0] Use NewValueMap instead.
NewAttributeValueMap = pdata.NewValueMap

// Deprecated: [v0.47.0] Use NewValueArray instead.
// Deprecated: [v0.48.0] Use NewValueArray instead.
NewAttributeValueArray = pdata.NewValueArray

// Deprecated: [v0.47.0] Use NewValueBytes instead.
// Deprecated: [v0.48.0] Use NewValueBytes instead.
NewAttributeValueBytes = pdata.NewValueBytes
)

Expand Down
6 changes: 0 additions & 6 deletions model/pdata/logs_alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package pdata // import "go.opentelemetry.io/collector/model/pdata"
// This file contains aliases for log data structures.

import (
"go.opentelemetry.io/collector/model/internal"
"go.opentelemetry.io/collector/model/internal/pdata"
)

Expand All @@ -36,11 +35,6 @@ type Logs = pdata.Logs
// NewLogs is an alias for a function to create new Logs.
var NewLogs = pdata.NewLogs

// Deprecated: [v0.47.0] will be removed soon, only used internally.
func LogsFromInternalRep(internal.LogsWrapper) Logs {
return Logs{}
}

// SeverityNumber is an alias for pdata.SeverityNumber type.
type SeverityNumber = pdata.SeverityNumber

Expand Down
6 changes: 0 additions & 6 deletions model/pdata/metrics_alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package pdata // import "go.opentelemetry.io/collector/model/pdata"
// This file contains aliases for metric data structures.

import (
"go.opentelemetry.io/collector/model/internal"
"go.opentelemetry.io/collector/model/internal/pdata"
)

Expand All @@ -36,11 +35,6 @@ type Metrics = pdata.Metrics
// NewMetrics is an alias for a function to create new Metrics.
var NewMetrics = pdata.NewMetrics

// Deprecated: [v0.47.0] will be removed soon, only used internally.
func MetricsFromInternalRep(internal.MetricsWrapper) Metrics {
return Metrics{}
}

// MetricDataType is an alias for pdata.MetricDataType type.
type MetricDataType = pdata.MetricDataType

Expand Down
6 changes: 0 additions & 6 deletions model/pdata/traces_alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package pdata // import "go.opentelemetry.io/collector/model/pdata"
// This file contains aliases for trace data structures.

import (
"go.opentelemetry.io/collector/model/internal"
"go.opentelemetry.io/collector/model/internal/pdata"
)

Expand All @@ -36,11 +35,6 @@ type Traces = pdata.Traces
// NewTraces is an alias for a function to create new Traces.
var NewTraces = pdata.NewTraces

// Deprecated: [v0.47.0] will be removed soon, only used internally.
func TracesFromInternalRep(internal.TracesWrapper) Traces {
return Traces{}
}

// TraceState is an alias for pdata.TraceState type.
type TraceState = pdata.TraceState

Expand Down
2 changes: 1 addition & 1 deletion service/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func init() {
featuregate.Register(featuregate.Gate{
ID: useOtelForInternalMetricsfeatureGateID,
Description: "controls whether the collector to uses open telemetry for internal metrics",
Enabled: configtelemetry.UseOpenTelemetryForInternalMetrics,
Enabled: false,
})
}

Expand Down

0 comments on commit 5d5dfa5

Please sign in to comment.