Skip to content

Commit

Permalink
add child span to test
Browse files Browse the repository at this point in the history
  • Loading branch information
moh-osman3 committed Jun 4, 2023
1 parent 2718ebe commit 37e51f5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lightstep/sdk/trace/exporters/otlp/otelcol/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,13 @@ func (t *clientTestSuite) TestD2PD() {
tracer := t.sdk.Tracer("test-tracer")
_, span := tracer.Start(ctx, "ExecuteRequest")
span.SetAttributes(attribute.String("test-attribute-1", "test-value-1"))
span.AddEvent("test event")
span.AddEvent("test event", trace.WithAttributes(attribute.String("test-event-attribute-1", "test-event-value-1")))

_, childSpan := tracer.Start(ctx, "child")
childSpan.SetAttributes(attribute.String("test-attribute-2", "test-value-2"))
childSpan.AddEvent("child test event", trace.WithAttributes(attribute.String("test-child-event-attribute-2", "test-child-event-value-2")))
childSpan.End()

span.End()

_ = t.sdk.Shutdown(ctx)
Expand Down

0 comments on commit 37e51f5

Please sign in to comment.