dendrite/internal/tracing_test.go
2023-03-03 17:56:41 +01:00

20 lines
320 B
Go

package internal
import (
"context"
"testing"
"github.com/stretchr/testify/assert"
)
func TestTracing(t *testing.T) {
inCtx := context.Background()
tr, ctx := StartRegion(inCtx, "testing")
assert.NotNil(t, ctx)
assert.NotEqual(t, inCtx, ctx)
assert.NotNil(t, tr)
tr.SetTag("key", "value")
defer tr.End()
}