Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-837

Provide a means of associating data with a monitored event

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 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)

       

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            axw Andrew Wilkins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: