-
Type: Improvement
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Monitoring
-
None
The event monitoring API currently provides a means of accepting context, but does not provide a means of storing request-specific context.
The driver already maintains a map, but does not expose it in any way to users. Any monitoring code that wishes to associate a request's started and finished events must therefore maintain its own map.
Ideally the event monitoring API would provide a method for storing and retrieving arbitrary data against the request. This could be added in a backwards-compatible manner by utilising the existing context parameter, e.g.
package event func SetValue(ctx context.Context, key, value interface{}) func GetValue(ctx context.Context, key interface{}) (interface{}, bool)