Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Track errors when recording spans#290

Open
ChimeraCoder wants to merge 3 commits intomasterfrom
aditya-trace-buff-chan
Open

Track errors when recording spans#290
ChimeraCoder wants to merge 3 commits intomasterfrom
aditya-trace-buff-chan

Conversation

@ChimeraCoder
Copy link
Copy Markdown
Contributor

@ChimeraCoder ChimeraCoder commented Oct 16, 2017

Summary

If we're encountering an error when recording a span, we want to know about it! This helps us catch situations like dropping spans due to the channel buffer being full.

Motivation

Test plan

Rollout/monitoring/revert plan

r? @asf-stripe
cc @stripe/observability

@stripe-ci
Copy link
Copy Markdown

Gerald Rule: Copy Observability on Veneur and Unilog pull requests

cc @stripe/observability
cc @stripe/observability-stripe

Copy link
Copy Markdown
Contributor

@asf-stripe asf-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think only one blocker on this. Otherwise: AWESOME

Comment thread trace/trace.go
cl.statsMtx.Lock()
defer cl.statsMtx.Unlock()
tags := []string{fmt.Sprintf("error:%s", err.Error())}
cl.stats.Incr("veneur.trace.record.errors_total", tags, 0.1)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the metrics prefix that we set on our statsd client will cause the metric to be reported as veneur.veneur.trace.<...>. I wonder if SetErrorStats should have a sister method to set the metric name, too.

Comment thread trace/client.go
}
}

type IncrClient interface {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can/should this interface get docs?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants