opencensus-go icon indicating copy to clipboard operation
opencensus-go copied to clipboard

provide better documentation of tags

Open groob opened this issue 6 years ago • 4 comments

I don't quite get tags. Are they similar to prometheus labels? Do they work with traces? Or only stats? How are they match existing exporter nomenclature?

The documentation states:

Tags provide additional cardinality to the OpenCensus instrumentation data.

I use Stackdriver and tried adding a few tags to my trace context, but had no way to see this data in my GCP trace view. Turns out they're called "Labels" in stackdriver and labels are populated using the trace. SetSpanAttributes function.

Better documentation on tags as well as how various Census concepts relate to existing exporters would help a lot.

groob avatar Jan 24 '18 14:01 groob

Thanks for the feedback. Tags are not related to traces, they are related to stats. For example they turn into Prometheus labels. Span attributes / Stackdriver trace labels are a totally different thing.

Agree that each exporter should document the mapping from Census concepts to backend that they implement.

semistrict avatar Jan 24 '18 15:01 semistrict

/cc @bogdandrutu

We should also determine whether we want to apply the tags as attributes on spans.

rakyll avatar Jan 25 '18 06:01 rakyll

+1 this is confusing! I thought that OpenCensus tags were passed as Datadog APM Trace metadata, but OpenCensus attributes are actually the key-values that are passed as Datadog APM Trace metadata.

This is further confusing because the OpenCensus Datadog exporter calls its metadata tags in the library: https://github.com/DataDog/opencensus-go-exporter-datadog/blob/2bef335f5ffffcfa296102765c21882a9158e52a/span.go#L81-L83

julianvmodesto avatar Dec 28 '18 06:12 julianvmodesto

/cc @bogdandrutu

We should also determine whether we want to apply the tags as attributes on spans.

Has there been further discussion of this?

tmc avatar Mar 24 '19 13:03 tmc