Skip to content

Commit

Permalink
[chore][receiver/otlp] ReportFatalError -> ReportStatus (#9331)
Browse files Browse the repository at this point in the history
**Description:**
Remove use of the deprecated method `ReportFatalError` in favor of using
`ReportStatus`.

Co-authored-by: Bogdan Drutu <[email protected]>
  • Loading branch information
atoulme and bogdandrutu authored Feb 3, 2024
1 parent bdbb5f3 commit 74485a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions receiver/otlpreceiver/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (r *otlpReceiver) startGRPCServer(host component.Host) error {
defer r.shutdownWG.Done()

if errGrpc := r.serverGRPC.Serve(gln); errGrpc != nil && !errors.Is(errGrpc, grpc.ErrServerStopped) {
host.ReportFatalError(errGrpc)
r.settings.ReportStatus(component.NewFatalErrorEvent(errGrpc))
}
}()
return nil
Expand Down Expand Up @@ -160,7 +160,7 @@ func (r *otlpReceiver) startHTTPServer(host component.Host) error {
defer r.shutdownWG.Done()

if errHTTP := r.serverHTTP.Serve(hln); errHTTP != nil && !errors.Is(errHTTP, http.ErrServerClosed) {
host.ReportFatalError(errHTTP)
r.settings.ReportStatus(component.NewFatalErrorEvent(errHTTP))
}
}()
return nil
Expand Down

0 comments on commit 74485a5

Please sign in to comment.