Skip to content

Commit

Permalink
fixup! feat: add basic OT tracing for incoming requests
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Nov 25, 2021
1 parent 2e721a3 commit f89b9a8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions impl/graphsync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,9 @@ func TestMakeRequestToNetwork(t *testing.T) {
require.Equal(t, td.extensionData, returnedData, "Failed to encode extension")

tracing := collectTracing(t)
// single, incomplete trace expected, we stop short of executing the request
require.ElementsMatch(t, []string{"request->newRequest"}, tracing.TracesToStrings())
// single trace expected, likely incomplete but but the executor may slip in and begin executing before end of test
traces := tracing.TracesToStrings()
require.True(t, reflect.DeepEqual([]string{"request->newRequest"}, traces) || reflect.DeepEqual([]string{"request->newRequest->executeTask"}, traces))

// make sure the attributes are what we expect
requestSpans := tracing.FindSpans("request")
Expand Down

0 comments on commit f89b9a8

Please sign in to comment.