@@ -92,13 +92,13 @@ def _exercise_mongo(db):
9292@validate_span_events (
9393 count = 1 ,
9494 exact_agents = {
95- "db.operation" : "test. insert" ,
95+ "db.operation" : "insert" ,
9696 "db.collection" : MONGODB_COLLECTION ,
9797 "db.instance" : "test" ,
9898 "peer.hostname" : INSTANCE_METRIC_HOST ,
9999 "peer.address" : f"{ INSTANCE_METRIC_HOST } :{ MONGODB_PORT } " ,
100100 },
101- exact_intrinsics = {"name" : f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test. insert" },
101+ exact_intrinsics = {"name" : f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /insert" },
102102)
103103@validate_transaction_metrics (
104104 "test_motor_instance_info" , rollup_metrics = [(INSTANCE_METRIC_NAME , 1 )], background_task = True
@@ -115,21 +115,21 @@ def test_collection_instance_info(loop, tracer_provider):
115115# Common Metrics for tests that use _exercise_mongo().
116116
117117_test_pymongo_client_scoped_metrics = [
118- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test. insert" , 6 ),
119- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test. find" , 5 ),
120- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test. aggregate" , 3 ),
121- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test. count" , 1 ),
122- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test. update" , 3 ),
123- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test. delete" , 2 ),
124- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test. distinct" , 1 ),
125- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test.createIndexes " , 2 ),
126- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test.listIndexes " , 2 ),
127- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test.dropIndexes " , 2 ),
128- (f"Datastore/operation/Mongodb/test.getMore " , 1 ),
129- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /test.findAndModify " , 3 ),
130- (f"Datastore/operation/Mongodb/test.listCollections " , 1 ),
131- (f"Datastore/statement/Mongodb/test.{ MONGODB_COLLECTION } /admin.renameCollection " , 1 ),
132- (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } _renamed/test. drop" , 1 ),
118+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /insert" , 6 ),
119+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /find" , 5 ),
120+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /aggregate" , 3 ),
121+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /count" , 1 ),
122+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /update" , 3 ),
123+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /delete" , 2 ),
124+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /distinct" , 1 ),
125+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /createindexes " , 2 ),
126+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /listindexes " , 2 ),
127+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /dropindexes " , 2 ),
128+ (f"Datastore/operation/Mongodb/getmore " , 1 ),
129+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } /findandmodify " , 3 ),
130+ (f"Datastore/operation/Mongodb/listcollections " , 1 ),
131+ (f"Datastore/statement/Mongodb/test.{ MONGODB_COLLECTION } /renamecollection " , 1 ), # admin commands use name given by OTel
132+ (f"Datastore/statement/Mongodb/{ MONGODB_COLLECTION } _renamed/drop" , 1 ),
133133]
134134
135135_test_pymongo_client_rollup_metrics = [
@@ -138,18 +138,18 @@ def test_collection_instance_info(loop, tracer_provider):
138138 ("Datastore/Mongodb/all" , 35 ),
139139 ("Datastore/Mongodb/allOther" , 35 ),
140140 (INSTANCE_METRIC_NAME , 35 ),
141- ("Datastore/operation/Mongodb/test. insert" , 6 ),
142- ("Datastore/operation/Mongodb/test. find" , 5 ),
143- ("Datastore/operation/Mongodb/test. aggregate" , 3 ),
144- ("Datastore/operation/Mongodb/test. count" , 1 ),
145- ("Datastore/operation/Mongodb/test. update" , 3 ),
146- ("Datastore/operation/Mongodb/test. delete" , 2 ),
147- ("Datastore/operation/Mongodb/test. distinct" , 1 ),
148- ("Datastore/operation/Mongodb/test.createIndexes " , 2 ),
149- ("Datastore/operation/Mongodb/test.listIndexes " , 2 ),
150- ("Datastore/operation/Mongodb/test.dropIndexes " , 2 ),
151- ("Datastore/operation/Mongodb/test.findAndModify " , 3 ),
152- ("Datastore/operation/Mongodb/admin.renameCollection " , 1 ),
141+ ("Datastore/operation/Mongodb/insert" , 6 ),
142+ ("Datastore/operation/Mongodb/find" , 5 ),
143+ ("Datastore/operation/Mongodb/aggregate" , 3 ),
144+ ("Datastore/operation/Mongodb/count" , 1 ),
145+ ("Datastore/operation/Mongodb/update" , 3 ),
146+ ("Datastore/operation/Mongodb/delete" , 2 ),
147+ ("Datastore/operation/Mongodb/distinct" , 1 ),
148+ ("Datastore/operation/Mongodb/createindexes " , 2 ),
149+ ("Datastore/operation/Mongodb/listindexes " , 2 ),
150+ ("Datastore/operation/Mongodb/dropindexes " , 2 ),
151+ ("Datastore/operation/Mongodb/findandmodify " , 3 ),
152+ ("Datastore/operation/Mongodb/renamecollection " , 1 ),
153153]
154154_test_pymongo_client_rollup_metrics .extend (_test_pymongo_client_scoped_metrics )
155155
0 commit comments