1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-07-13 01:00:22 +02:00

Add SetStatus, SpanContext and IsRecordingEvent (#12)

* Add span apis.
- SetStatus
- SpanContext
- IsRecordingEvent

* fix formatting.

* use grpc/codes.Code

* change Option to SpanOption

* fix format errors.
This commit is contained in:
rghetia
2019-06-19 10:44:46 -07:00
committed by GitHub
parent 063035e9e0
commit 3c3532fb04
11 changed files with 191 additions and 46 deletions

View File

@ -24,6 +24,8 @@ import (
"github.com/open-telemetry/opentelemetry-go/api/trace"
"github.com/open-telemetry/opentelemetry-go/plugin/httptrace"
"google.golang.org/grpc/codes"
_ "github.com/open-telemetry/opentelemetry-go/exporter/loader"
)
@ -59,6 +61,7 @@ func main() {
}
body, err = ioutil.ReadAll(res.Body)
res.Body.Close()
trace.Active(ctx).SetStatus(codes.OK)
return err
})