Cherry pick v1.7 into master
This commit is contained in:
parent
a09dfa3ce1
commit
b6498cdcbc
73 changed files with 6573 additions and 186 deletions
13
vendor/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer/option.go
generated
vendored
13
vendor/gopkg.in/DataDog/dd-trace-go.v1/ddtrace/tracer/option.go
generated
vendored
|
@ -154,10 +154,19 @@ func FinishTime(t time.Time) FinishOption {
|
|||
}
|
||||
}
|
||||
|
||||
// WithError adds the given error to the span before marking it as finished. If it is
|
||||
// nil it will be disregarded.
|
||||
// WithError marks the span as having had an error. It uses the information from
|
||||
// err to set tags such as the error message, error type and stack trace.
|
||||
func WithError(err error) FinishOption {
|
||||
return func(cfg *ddtrace.FinishConfig) {
|
||||
cfg.Error = err
|
||||
}
|
||||
}
|
||||
|
||||
// NoDebugStack prevents any error presented using the WithError finishing option
|
||||
// from generating a stack trace. This is useful in situations where errors are frequent
|
||||
// and performance is critical.
|
||||
func NoDebugStack() FinishOption {
|
||||
return func(cfg *ddtrace.FinishConfig) {
|
||||
cfg.NoDebugStack = true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue