[CDRIVER-769] APM Internal API Created: 30/Jul/15  Updated: 27/Aug/21  Resolved: 28/Mar/16

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.4.0

Type: Bug Priority: Major - P3
Reporter: Hannes Magnusson Assignee: A. Jesse Jiryu Davis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on CDRIVER-1117 Delete mongoc_cluster_run_command_rpc Closed
is depended on by PHPC-349 Application Performance Monitoring (APM) Closed
is depended on by DRIVERS-247 Implement APM Spec Closed
Related
related to CDRIVER-4139 Using MONGOC_WRITE_CONCERN_W_ERRORS_I... Backlog
related to CDRIVER-1204 Implement APM for mongoc_client_comma... Closed
related to CDRIVER-1064 find / getMore commands' batchSize mu... Closed
related to CDRIVER-1084 bson_reader_reset() Closed
related to CDRIVER-1890 Allow mongoc_client_set_apm_callbacks... Closed
is related to DRIVERS-211 New commands for find, getMore, and k... Closed
is related to CDRIVER-400 mongoc notification system / observer Closed
is related to CDRIVER-1890 Allow mongoc_client_set_apm_callbacks... Closed

 Description   

Done:

  • Actual command-started events
  • Simulate command-started events by upconverting legacy writes
  • Report operation_id and request_id with command-started events
  • Make an internal function mongoc_apm_command_started_init (&event, lots of params...).
  • Refactor upconversion code with actual write-command code in _mongoc_write_command
  • Remove $readPreference from command-started event (tests should now pass with 3.2 on all topologies)
  • Simulate command-started events by upconverting legacy query and getmore (tests should now pass on all server version)
  • Remove mongoc_cluster_run_command_rpc
  • Test mongoc_apm_command_failed_get_error
  • Command-succeed events (merge those parts of spec tests into our repo)
  • Command-failed events (merge those parts of spec tests into our repo)
  • Document all new functions and structs, note that callbacks must copy event data to modify it, or to keep it after the callback invocation
  • Write an APM Guide in the docs
  • Prohibit setting APM callbacks directly on a pooled client, only allow setting them on the pool (head-start on CDRIVER-938)
  • Test that multi-batch inserts report different request_ids and the same operation_ids, in both legacy and write-command mode


 Comments   
Comment by Githook User [ 01/Sep/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 update APM command-monitoring docs
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/1f01f44ef2d512ac0adb40ca477f62dc7ac06f25

Comment by Githook User [ 16/May/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 uninit'ed free in APM
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/60e60a432909e268496ebea8122fa1340426f456

Comment by Githook User [ 28/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 fix request_id for legacy writes
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/379eed2c7eb383bb9c4fbe6f3ab0e1ab26a0b88d

Comment by Githook User [ 28/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 test operation_id
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/df2fcb00bf151dd765c881bceba1f642f65e3fc8

Comment by Githook User [ 22/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 update APM callback tests
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/26494954a150e3b35870f68a71e3101e8dccda17

Comment by Githook User [ 22/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 callbacks can be set only once
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/e0eed4a2d1d72d99213db049488703b79a379e94

Comment by Githook User [ 17/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 legacy write err isn't failure
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f0c92e039bc7ad08367a545b9f3fa510e8862e1a

Comment by Githook User [ 17/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 reenable APM example

reverts d0f37f3bba2188c4c1abe5972fc996810624ec4e
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/b06a51720c4d5dbeafaffefe37236aee71be22af

Comment by Githook User [ 17/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 new symbols for command monitoring
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/e7206969625b4e89b2de1690361471e9a85994a9

Comment by Githook User [ 17/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 test apm_command_failed_get_error
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0c56291de85272d2f7a943a2e18e608e29623372

Comment by Hannes Magnusson [ 15/Mar/16 ]

I've disabled the example since it didn't link properly.

Comment by Githook User [ 15/Mar/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-769: Temporarly disable the example
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d0f37f3bba2188c4c1abe5972fc996810624ec4e

Comment by Githook User [ 15/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 application performance monitoring docs
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/4e64efdaa72745056425766d7aee88f46b91f9b7

Comment by Githook User [ 15/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 use cluster.request_id instead of extra param
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/d29ca371fc30d64395a0c7be5fcb69f7becc4f7d

Comment by Githook User [ 15/Mar/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 command-failed events
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/28bfda2555ee208d7c2363d6c330d456267523a9

Comment by Githook User [ 19/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 get cmd name even if it's wrapped in $query
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/bef75648a41107fad2ab6d799e671aa111b5839d

Comment by Githook User [ 16/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 don't assign in an assert
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/6dc55afd06439dd29f75346f3786a1405d14bbf9

Comment by Githook User [ 16/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-1117 delete mongoc_cluster_run_command_rpc

I introduced the function for CDRIVER-838 to implement "find"/"getMore"
commands – the cursor was built to send and receive RPCs, so it was
easier to stick a find or getMore command into an RPC and send it,
instead of using the standard command path from the cursor code.

This causes some duplication, however, and it makes it very hard to
consistently record command events originating from cursors and those
that don't (CDRIVER-769).

Remove mongoc_cluster_run_command_rpc and use the standard command path.
When a cursor runs a command, it no longer stores the reply in its rpc
struct; instead it stores the reply in a bson_t on its iface_data.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/dd115e8e2c22eb68dc1b47bbc57740520ee42244

Comment by Githook User [ 15/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 delete TODOs

These are not actually good refactoring opportunities.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/0eca977410bd39f70304f44c62f302361ba6b2e5

Comment by Githook User [ 13/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 command-succeeded events
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/859bc9bc4551b88bae4d67aafc8c25386ddc4ab4

Comment by Githook User [ 13/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 leaks in apm test
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/71a365c93da3f5d834434c3ce7968087aa203166

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 monitor legacy queries
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f4717b33a138a7fe1b73b46e55255e55c6ee3aa4

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 no read prefs in command-started event
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/53f408fe7811973d85d33c284f854e433075f239

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 add init fns to mongoc-apm-private.h
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/dfe8d6e48bb10bceee0284e36b896aa63ffd570f

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 fix APM tests for replica sets
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/b9bda8b37253ba4e6ec85271a4782a87796fe625

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 refactor write command option formatting
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/75da27949c6ef731c4523ccc3c29e679b20327f7

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 command-failed event's error is const
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/1bb4905ac66fb6765aeedcb82926a0fe583158b5

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 APM event initializers
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/94080b9b031ec160b783b7f1932a9ed1d226f022

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 request and op ids for APM

Also upconvert legacy writes to commands.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/f4830144f22dbb221e0c7d140e763404ae47f41e

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 skip APM tests for some server versions
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/63b0a24af76304bde91b22072e84cded9eba2c3d

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 fix "getMore" reporting
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/da6563d69498e8ab1de0f6341f9140b762f3fe47

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 command-monitoring test for "find" cmd
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/6304d77c40a49e6e33ecb0797adfacd16dad1555

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 distribute command-monitoring test files
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/3c5a24d5cdebc32f455333b80c23236afcb9e56c

Comment by Githook User [ 09/Feb/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 command-started events

Not yet reported for legacy opcodes.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/e1428e82ccc3a21cc4adf4f4ca2f4c4f1cc49316

Comment by Githook User [ 04/Jan/16 ]

Author:

{u'username': u'ajdavis', u'name': u'A. Jesse Jiryu Davis', u'email': u'jesse@mongodb.com'}

Message: CDRIVER-769 start APM interface
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/34c2eb24bca0bbc04ad3f779713bee35a4f95d8e

Generated at Wed Feb 07 21:10:34 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.