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

Tag SSH connection failures as err:Net #2406

Merged
merged 4 commits into from
Jan 2, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions flow/alerting/alerting.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,6 +456,11 @@ func (a *Alerter) LogFlowError(ctx context.Context, flowName string, err error)
if errors.As(err, &netErr) {
tags = append(tags, string(shared.ErrTypeNet))
}
// For SSH connection errors, we currently tag them as "err:Net"
if strings.Contains(errorWithStack, "ssh: rejected") || strings.Contains(errorWithStack, "dial error") {
iskakaushik marked this conversation as resolved.
Show resolved Hide resolved
tags = append(tags, "err:Net")
}

a.sendTelemetryMessage(ctx, logger, flowName, errorWithStack, telemetry.ERROR, tags...)
}

Expand Down
Loading