Skip to content

Commit e32cc3f

Browse files
committed
typo
1 parent 5d3cf19 commit e32cc3f

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

sample-app/recipe_agent_example.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ var associationProperties = map[string]string{
1515
}
1616

1717
var abTest = &model.ABTest{
18-
VarientKeys: map[string]bool{
18+
VariantKeys: map[string]bool{
1919
"variant_a": false,
2020
"variant_b": true,
2121
},

traceloop-sdk/model/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const (
99
SpanKindWorkflow SpanKind = "workflow"
1010
)
1111

12-
// The varient that is active will be added to the trace.
12+
// The variant that is active will be added to the trace.
1313
type ABTest struct {
14-
VarientKeys map[string]bool `json:"varient_keys"`
14+
VariantKeys map[string]bool `json:"variant_keys"`
1515
}

traceloop-sdk/sdk.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ func (instance *Traceloop) NewAgent(ctx context.Context, name string, agentAttrs
151151
}
152152

153153
if agentAttrs.ABTest != nil {
154-
for key, activeVarient := range agentAttrs.ABTest.VarientKeys {
155-
if activeVarient {
154+
for key, activeVariant := range agentAttrs.ABTest.VariantKeys {
155+
if activeVariant {
156156
agentAttrs.AssociationProperties["ab_testing_variant"] = key
157157
break
158158
}

traceloop-sdk/workflow.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ func (instance *Traceloop) NewWorkflow(ctx context.Context, attrs WorkflowAttrib
2626
)
2727

2828
if attrs.ABTest != nil {
29-
for key, activeVarient := range attrs.ABTest.VarientKeys {
30-
if activeVarient {
29+
for key, activeVariant := range attrs.ABTest.VariantKeys {
30+
if activeVariant {
3131
span.SetAttributes(attribute.String("traceloop.association.properties.ab_testing_variant", key))
3232
break
3333
}
@@ -79,8 +79,8 @@ func (workflow *Workflow) NewAgent(name string, associationProperties map[string
7979
}
8080

8181
if workflow.Attributes.ABTest != nil {
82-
for key, activeVarient := range workflow.Attributes.ABTest.VarientKeys {
83-
if activeVarient {
82+
for key, activeVariant := range workflow.Attributes.ABTest.VariantKeys {
83+
if activeVariant {
8484
associationProperties["ab_testing_variant"] = key
8585
}
8686
}

0 commit comments

Comments
 (0)