googleapis / google-cloud-go

Google Cloud Client Libraries for Go.
https://cloud.google.com/go/docs/reference
Apache License 2.0
3.77k stars 1.29k forks source link

datastore: add attribute to trace #1798

Open nktks opened 4 years ago

nktks commented 4 years ago

Is your feature request related to a problem? Please describe. When use stackdriver exporter and call datastore client public func (like datastore *Client.Get ), child span ( like cloud.google.com/go/datastore.*) added to our parent context(span). But, added child span has no information like called datastore.Key, datastore.Query, etc... It's more convenient if we can know which key or query related to child span.

Describe the solution you'd like How about calling *Span.AddAttributes when child span started in datastore package?

Describe alternatives you've considered

Additional context

tbpg commented 4 years ago

I like this idea! Assigning to the right team to see if we've considered doing this across all supported languages, or if we'd like to.