Skip to content

Commit

Permalink
Remove deprecated func/types from component (#6606)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
  • Loading branch information
bogdandrutu authored Nov 23, 2022
1 parent fa1effe commit 5b004ba
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 52 deletions.
11 changes: 11 additions & 0 deletions .chloggen/rmdepcomp.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: breaking

# The name of the component, or a single word describing the area of concern, (e.g. otlpreceiver)
component: component

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: Remove deprecated func/types from component

# One or more tracking issues or pull requests related to the change
issues: [6606]
3 changes: 0 additions & 3 deletions component/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,6 @@ const (
StabilityLevelStable
)

// Deprecated: [0.65.0] Use StabilityLevelDevelopment instead.
const StabilityLevelInDevelopment = StabilityLevelDevelopment

func (sl StabilityLevel) String() string {
switch sl {
case StabilityLevelUndefined:
Expand Down
3 changes: 0 additions & 3 deletions component/exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ func UnmarshalExporterConfig(conf *confmap.Conf, cfg ExporterConfig) error {
return unmarshal(conf, cfg)
}

// Deprecated: [v0.65.0] unnecessary interface, will be removed.
type Exporter = Component

// TracesExporter is an Exporter that can consume traces.
type TracesExporter interface {
Component
Expand Down
3 changes: 0 additions & 3 deletions component/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ func UnmarshalProcessorConfig(conf *confmap.Conf, cfg ProcessorConfig) error {
return unmarshal(conf, cfg)
}

// Deprecated: [v0.65.0] unnecessary interface, will be removed.
type Processor = Component

// TracesProcessor is a processor that can consume traces.
type TracesProcessor interface {
Component
Expand Down
41 changes: 0 additions & 41 deletions component/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,47 +34,6 @@ func UnmarshalReceiverConfig(conf *confmap.Conf, cfg ReceiverConfig) error {
return unmarshal(conf, cfg)
}

// Receiver allows the collector to receive metrics, traces and logs.
//
// Receiver receives data from a source (either from a remote source via network
// or scrapes from a local host) and pushes the data to the pipelines it is attached
// to by calling the nextConsumer.Consume*() function.
//
// # Error Handling
//
// The nextConsumer.Consume*() function may return an error to indicate that the data
// was not accepted. There are 2 types of possible errors: Permanent and non-Permanent.
// The receiver must check the type of the error using IsPermanent() helper.
//
// If the error is Permanent, then the nextConsumer.Consume*() call should not be
// retried with the same data. This typically happens when the data cannot be
// serialized by the exporter that is attached to the pipeline or when the destination
// refuses the data because it cannot decode it. The receiver must indicate to
// the source from which it received the data that the received data was bad, if the
// receiving protocol allows to do that. In case of OTLP/HTTP for example, this means
// that HTTP 400 response is returned to the sender.
//
// If the error is non-Permanent then the nextConsumer.Consume*() call may be retried
// with the same data. This may be done by the receiver itself, however typically it is
// done by the original sender, after the receiver returns a response to the sender
// indicating that the Collector is currently overloaded and the request must be
// retried. In case of OTLP/HTTP for example, this means that HTTP 429 or 503 response
// is returned.
//
// # Acknowledgment Handling
//
// The receivers that receive data via a network protocol that support acknowledgments
// MUST follow this order of operations:
// - Receive data from some sender (typically from a network).
// - Push received data to the pipeline by calling nextConsumer.Consume*() function.
// - Acknowledge successful data receipt to the sender if Consume*() succeeded or
// return a failure to the sender if Consume*() returned an error.
//
// This ensures there are strong delivery guarantees once the data is acknowledged
// by the Collector.
// Deprecated: [v0.65.0] unnecessary interface, will be removed.
type Receiver = Component

// A TracesReceiver receives traces.
// Its purpose is to translate data from any format to the collector's internal trace format.
// TracesReceiver feeds a consumer.Traces with data.
Expand Down
39 changes: 37 additions & 2 deletions receiver/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,42 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package receiver contains implementations of Receiver components.
// Package receiver defines components that allows the collector to receive metrics, traces and logs.
//
// A receiver must be added as a default component to be included in the collector.
// Receiver receives data from a source (either from a remote source via network
// or scrapes from a local host) and pushes the data to the pipelines it is attached
// to by calling the nextConsumer.Consume*() function.
//
// # Error Handling
//
// The nextConsumer.Consume*() function may return an error to indicate that the data
// was not accepted. There are 2 types of possible errors: Permanent and non-Permanent.
// The receiver must check the type of the error using IsPermanent() helper.
//
// If the error is Permanent, then the nextConsumer.Consume*() call should not be
// retried with the same data. This typically happens when the data cannot be
// serialized by the exporter that is attached to the pipeline or when the destination
// refuses the data because it cannot decode it. The receiver must indicate to
// the source from which it received the data that the received data was bad, if the
// receiving protocol allows to do that. In case of OTLP/HTTP for example, this means
// that HTTP 400 response is returned to the sender.
//
// If the error is non-Permanent then the nextConsumer.Consume*() call may be retried
// with the same data. This may be done by the receiver itself, however typically it is
// done by the original sender, after the receiver returns a response to the sender
// indicating that the Collector is currently overloaded and the request must be
// retried. In case of OTLP/HTTP for example, this means that HTTP 429 or 503 response
// is returned.
//
// # Acknowledgment Handling
//
// The receivers that receive data via a network protocol that support acknowledgments
// MUST follow this order of operations:
// - Receive data from some sender (typically from a network).
// - Push received data to the pipeline by calling nextConsumer.Consume*() function.
// - Acknowledge successful data receipt to the sender if Consume*() succeeded or
// return a failure to the sender if Consume*() returned an error.
//
// This ensures there are strong delivery guarantees once the data is acknowledged
// by the Collector.
package receiver // import "go.opentelemetry.io/collector/receiver"

0 comments on commit 5b004ba

Please sign in to comment.