Skip to content

Commit d422669

Browse files
authored
chore: don't error log when context in canceled (#4583)
This context will be canceled when alloy is shutting down. By then reporter have been runnig and just exists.
1 parent 4bdc9b4 commit d422669

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/alloycli/cmd_run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ func (fr *alloyRun) Run(cmd *cobra.Command, configPath string) error {
429429
}
430430
go func() {
431431
err := reporter.Start(ctx, getEnabledComponentsFunc(f))
432-
if err != nil {
432+
if err != nil && !errors.Is(err, context.Canceled) {
433433
level.Error(l).Log("msg", "failed to start reporter", "err", err)
434434
}
435435
}()

0 commit comments

Comments
 (0)