1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2024-12-04 09:43:23 +02:00
opentelemetry-go/sdk
Anthony Mirabella ca3f74d976
Add Span#RecordError method to simplify adding error events to spans (#473)
* Add `Span#Error` method to simplify setting an error status and message.

* `Span#Error` should no-op on nil errors

* Record errors as a span event rather than status/attributes.

The implementation in the SDK package now relies on existing API methods.

* Add WithErrorStatus() ErrorOption to allow setting span status on error.

* Apply suggestions from code review

Co-Authored-By: Krzesimir Nowak <qdlacz@gmail.com>

* Address code review feedback

* Clean up RecordError tests

* Ensure complete and unique error type is recorded for defined types
* Avoid duplicating logic under test in tests

* Move TestError to internal/testing package, improve RecordError test scenarios

Co-authored-by: Krzesimir Nowak <qdlacz@gmail.com>
2020-02-28 13:44:53 -08:00
..
export Adds Histogram Aggregator (#433) 2020-01-21 09:15:09 -08:00
internal Namespace import path under "/otel" (#274) 2019-11-01 11:40:29 -07:00
metric Call Gosched if load an unmapped record (#469) 2020-02-10 16:20:29 -08:00
trace Add Span#RecordError method to simplify adding error events to spans (#473) 2020-02-28 13:44:53 -08:00
opentelemetry.go Namespace import path under "/otel" (#274) 2019-11-01 11:40:29 -07:00
README.md Trace sdk (#65) 2019-08-02 13:52:55 -07:00