add abilit to skip span recording
Some checks failed
build / test (push) Failing after 1m32s
codeql / analyze (go) (push) Failing after 1m42s
build / lint (push) Successful in 9m16s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2024-05-04 19:24:10 +03:00
parent 905910e8ce
commit e9933df477
3 changed files with 18 additions and 8 deletions

View File

@@ -124,6 +124,10 @@ func (os *otSpan) Finish(opts ...tracer.SpanOption) {
o(&options)
}
if !options.Record {
return
}
l := len(options.Labels)
for idx := 0; idx < l; idx++ {
switch lt := options.Labels[idx].(type) {