You've already forked opentelemetry-go
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:
@ -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
|
||||
})
|
||||
|
Reference in New Issue
Block a user