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

Remove deprecated funcs and types from component #9283

Merged
merged 2 commits into from
Jan 24, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 20 additions & 0 deletions .chloggen/depcomponent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use this changelog template to create an entry for release notes.

# 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 funcs and types"

# One or more tracking issues or pull requests related to the change
issues: [9283]

# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [api]
3 changes: 0 additions & 3 deletions component/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ func NewFatalErrorEvent(err error) *StatusEvent {
return ev
}

// Deprecated: [v0.92.0] use directly func(*StatusEvent) error.
type StatusFunc = func(*StatusEvent) error

// AggregateStatus will derive a status for the given input using the following rules in order:
// 1. If all instances have the same status, there is nothing to aggregate, return it.
// 2. If any instance encounters a fatal error, the component is in a Fatal Error state.
Expand Down
7 changes: 0 additions & 7 deletions component/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ type TelemetrySettings struct {
// Resource contains the resource attributes for the collector's telemetry.
Resource pcommon.Resource

// ReportComponentStatus allows a component to report runtime changes in status. The service
// will automatically report status for a component during startup and shutdown. Components can
// use this method to report status after start and before shutdown.
// Deprecated: [v0.92.0] This function will be removed in a future release.
// Use ReportStatus instead.
ReportComponentStatus func(*StatusEvent) error

// ReportStatus allows a component to report runtime changes in status. The service
// will automatically report status for a component during startup and shutdown. Components can
// use this method to report status after start and before shutdown.
Expand Down
6 changes: 1 addition & 5 deletions service/internal/servicetelemetry/telemetry_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ func (s TelemetrySettings) ToComponentTelemetrySettings(id *component.InstanceID
MeterProvider: s.MeterProvider,
MetricsLevel: s.MetricsLevel,
Resource: s.Resource,
ReportComponentStatus: func(event *component.StatusEvent) error {
statusFunc(event)
return nil
},
ReportStatus: statusFunc,
ReportStatus: statusFunc,
}
}