XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Gone away
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Not Needed
    • None
    • Not Needed
    • None
    • None
    • None
    • None
    • None
    • None

      After implementing NODE-1390 there is no apparent way to propagate a user defined context to commandStart and commandSuccess events.

      Use case:

      Log all MongoDB operations within a HTTP request. HTTP request is the context here.

       

      It seems that it was possible to provide custom operationId per find/update/etc query. The operationId might be used later in commandStart/Success event handlers to get access to some context object which is associated with the operationId.

      It would be nice to have an ability to associate a custom context object with the operation commands. Here is how it's done in Elasticsearch client: https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/6.x/observability.html#_context_object.

       

      Maybe there is some workaround at the moment?

            Assignee:
            Unassigned
            Reporter:
            Aliaksei Tuzik
            None
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: