github.com/mier85/go-sensor@v1.30.1-0.20220920111756-9bf41b3bc7e0/tags.go (about) 1 // (c) Copyright IBM Corp. 2021 2 // (c) Copyright Instana Inc. 2020 3 4 package instana 5 6 import ot "github.com/opentracing/opentracing-go" 7 8 const ( 9 batchSizeTag = "batch_size" 10 suppressTracingTag = "suppress_tracing" 11 syntheticCallTag = "synthetic_call" 12 ) 13 14 // BatchSize returns an opentracing.Tag to mark the span as a batched span representing 15 // similar span categories. An example of such span would be batch writes to a queue, 16 // a database, etc. If the batch size less than 2, then this option has no effect 17 func BatchSize(n int) ot.Tag { 18 return ot.Tag{Key: batchSizeTag, Value: n} 19 } 20 21 // SuppressTracing returns an opentracing.Tag to mark the span and any of its child spans 22 // as not to be sent to the agent 23 func SuppressTracing() ot.Tag { 24 return ot.Tag{Key: suppressTracingTag, Value: true} 25 } 26 27 func syntheticCall() ot.Tag { 28 return ot.Tag{Key: syntheticCallTag, Value: true} 29 }