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

Include context in Command Events

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Monitoring
    • None
    • Not Needed

    Description

      It would be useful to include the context.Context in the CommandStartedEvent and CommandFinishedEvent structs so extra application contextual information can be included in metrics. Things such as the calling function or the source of the query would be great to include in our metrics but right now there's no way to connect these events to their original function calls. If the context was passed along then a value could be added to the context and then retrieved later from the event.

      I would be willing to contribute these changes if this is an acceptable feature. I would add a `Ctx context.context` field to `CommandStartedEvent` and `CommandFinishedEvent`.

      Attachments

        Activity

          People

            benji.rewis@mongodb.com Benji Rewis (Inactive)
            james@getadmiral.com James Hartig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: