Skip to content

Commit

Permalink
Remove deprecated funcs and types from component (open-telemetry#9283)
Browse files Browse the repository at this point in the history
Signed-off-by: Bogdan Drutu <[email protected]>
Signed-off-by: Alex Boten <[email protected]>
Co-authored-by: Alex Boten <[email protected]>
  • Loading branch information
bogdandrutu and Alex Boten authored Jan 24, 2024
1 parent c449488 commit f13e6a3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 15 deletions.
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,
}
}

0 comments on commit f13e6a3

Please sign in to comment.