[GODRIVER-1761] CommandFinishedEvent have not db name property Created: 01/Oct/20  Updated: 29/Sep/22  Resolved: 30/Oct/20

Status: Closed
Project: Go Driver
Component/s: Monitoring
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Dmitriy Telepnev Assignee: Divjot Arora (Inactive)
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by GODRIVER-2558 Add field Database with CommandFinish... Closed
Related
related to DRIVERS-2452 Add databaseName property to command ... Implementing
is related to DRIVERS-1409 Add CommandStartedEvent to CommandSuc... Closed

 Description   

For monitoring we need to know operation database name. It needed in case, if you have application, which make few different queries into few databases, and, sometimes, app processing speed can degrade.

If i use default monitor - i need to store CommandStartedEvent and when i get CommandSucceededEvent i must enrich this event.

 



 Comments   
Comment by Kevin Albertson [ 30/Nov/20 ]

Nice, thank you for sharing!

Comment by Dmitriy Telepnev [ 26/Nov/20 ]

@Kevin Albertson, @Divjot Arora it's a good idea! until it will be fixed, we solve our problem https://github.com/DmitryTelepnev/mongo-command-monitor

May be it will be useful, we collect 

  • total number of started queries with "app", "database", "collection", "command" labels
  • total number of finished queries with "app", "database", "collection", "command" labels
  • mongo query duration with "app", "database", "collection", "command" labels
Comment by Kevin Albertson [ 30/Oct/20 ]

Hi Dmitriy Telepnev, thank you for the report and the pull request!

The API for command monitoring is part of the Command Monitoring specification. The proposed change was discussed in DRIVERS-1409. The team has decided to pursue a more general solution. Once the specification is amended, we will implement the change in the Go driver. Please watch DRIVERS-1409 for updates.

Comment by Dmitriy Telepnev [ 01/Oct/20 ]

https://github.com/mongodb/mongo-go-driver/pull/513 

i added database name into CommandFinishedEvent. Can you review, please?

Generated at Thu Feb 08 08:37:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.