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

api(trace): change 'reference' to 'relation' (#225)

This commit is contained in:
Gustavo Silva Paiva
2019-10-21 14:15:49 -03:00
committed by rghetia
parent 1191a07836
commit 9b5f5dd13a
5 changed files with 28 additions and 28 deletions

View File

@ -102,14 +102,14 @@ type SpanOption func(*SpanOptions)
type SpanOptions struct {
Attributes []core.KeyValue
StartTime time.Time
Reference Reference
Relation Relation
Record bool
}
// Reference is used to establish relationship between newly created span and the
// Relation is used to establish relationship between newly created span and the
// other span. The other span could be related as a parent or linked or any other
// future relationship type.
type Reference struct {
type Relation struct {
core.SpanContext
RelationshipType
}
@ -171,7 +171,7 @@ func WithRecord() SpanOption {
// ChildOf. TODO: do we need this?.
func ChildOf(sc core.SpanContext) SpanOption {
return func(o *SpanOptions) {
o.Reference = Reference{
o.Relation = Relation{
SpanContext: sc,
RelationshipType: ChildOfRelationship,
}
@ -181,7 +181,7 @@ func ChildOf(sc core.SpanContext) SpanOption {
// FollowsFrom. TODO: do we need this?.
func FollowsFrom(sc core.SpanContext) SpanOption {
return func(o *SpanOptions) {
o.Reference = Reference{
o.Relation = Relation{
SpanContext: sc,
RelationshipType: FollowsFromRelationship,
}