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

Create helpers which integrate with OpenTelemetry for diagnose collection #11454

Merged
merged 18 commits into from
Apr 29, 2021
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
Prev Previous commit
Next Next commit
Last comments
  • Loading branch information
sgmiller committed Apr 28, 2021
commit 14abc7f422ec4304cdef612e1dcf1d358beaf48c
6 changes: 6 additions & 0 deletions vault/diagnose/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,20 @@ func Warn(ctx context.Context, msg string) {
span.AddEvent(warningEventName, trace.WithAttributes(messageKey.String(msg)))
}

// SpotOk adds an Ok result without adding a new Span. This should be used for instantaneous checks with no
// possible sub-spans
func SpotOk(ctx context.Context, checkName, message string) {
addSpotCheckResult(ctx, spotCheckOkEventName, checkName, message)
}

// SpotWarn adds a Warning result without adding a new Span. This should be used for instantaneous checks with no
// possible sub-spans
func SpotWarn(ctx context.Context, checkName, message string) {
addSpotCheckResult(ctx, spotCheckWarnEventName, checkName, message)
}

// SpotError adds an Error result without adding a new Span. This should be used for instantaneous checks with no
// possible sub-spans
func SpotError(ctx context.Context, checkName string, err error) error {
var message string
if err != nil {
Expand Down