-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Replace deprecated use of host.ReportFatalError #30693
Conversation
} | ||
}() | ||
|
||
return nil | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -115,7 +115,7 @@ func (r *sfxReceiver) RegisterLogsConsumer(lc consumer.Logs) { | |||
// Start tells the receiver to start its processing. | |||
// By convention the consumer of the received data is set when the receiver | |||
// instance is created. | |||
func (r *sfxReceiver) Start(_ context.Context, host component.Host) error { | |||
func (r *sfxReceiver) Start(ctx context.Context, host component.Host) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not necessary - try make lint
to see if this passes.
Looks like your changelog check didn't pass. To fix this, you can refer to this portion of the CONTRIBUTING.md file:
Or
|
…ed use of host.ReportFatalError
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parameter has been renamed and make lint
now passes all the tests.
ddr.params.TelemetrySettings.ReportStatus(component.NewFatalErrorEvent(err)) | ||
} | ||
}() | ||
return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please revert whitespace changes
@@ -47,35 +47,35 @@ func newDataDogReceiver(config *Config, nextConsumer consumer.Traces, params rec | |||
} | |||
|
|||
func (ddr *datadogReceiver) Start(_ context.Context, host component.Host) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file should not be part of this PR
component: signalfxreceiver | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: Fixed an issue in the SignalFx receiver where the context parameter was not utilized properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not correct, the changes to signalfxreceiver do not include changing the context parameter.
Given that this change has no impact on user or API changelog, please delete this changelog entry and instead prefix the commit message with [chore]
or add the label Skip Changelog
to the PR.
@@ -105,7 +105,7 @@ var _ http.Handler = (*firehoseReceiver)(nil) | |||
|
|||
// Start spins up the receiver's HTTP server and makes the receiver start | |||
// its processing. | |||
func (fmr *firehoseReceiver) Start(_ context.Context, host component.Host) error { | |||
func (fmr *firehoseReceiver) Start(ctx context.Context, host component.Host) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this file changed? I thought the PR was only touching signalfxreceiver.
Closing - let's open separate PRs for each component. |
Description:
This update refactors the
Start
method of thesfxReceiver
to remove the deprecatedhost.ReportFatalError
call. The code now uses the newsettings.TelemetrySettings.ReportStatus
method withcomponent.NewFatalErrorEvent(err)
to report startup errors.Link to tracking Issue:
#30598
Testing:
The updated code has been tested to handle error scenarios during the startup of the
sfxReceiver
, and it now properly reports errors using the new telemetry settings.Documentation:
No changes to external documentation were needed as the change is internal to the
sfxReceiver
's implementation and does not affect the receiver's interface or configuration.