lightstep / lightstep-tracer-go

The Lightstep distributed tracing library for Go
https://lightstep.com
MIT License
98 stars 54 forks source link

Add the option to add default tags. #241

Closed bviolier closed 4 years ago

bviolier commented 4 years ago

Adds the ability to set default tags when creating the exporter.

iredelmeier commented 4 years ago

Thanks @bviolier! This looks great to me aside from the suggested naming change.

"Attributes" aren't really clarified in the OC spec, so here's the SpanData type: https://github.com/census-instrumentation/opencensus-go/blob/aad2c527c5defcf89b5afab7f37274304195a6b2/trace/export.go#L73-L97

bviolier commented 4 years ago

Thanks, that makes sense! I tried to actually use trace.Attribute now, but the values are private, so I can't read them back to put them in Tags, unfortunately. See updated PR, let me know if this is ok!