|
alm, I believe this information is included in the result of the mongos currentOp operation. Below is sample output I got from running currentOp from one shell while another shell was running a long-running find operation. I've elided everything except the relevant returned entry. Note the presence of the "appName" field in the currentOp output.
If this is not the behavior you are requesting, please re-open this ticket, but AFAICT, this works as designed.
MongoDB Enterprise mongos> db.currentOp().inprog[1]
|
{
|
"desc" : "conn10",
|
"threadId" : "139725075818240",
|
"connectionId" : 10,
|
"client_s" : "127.0.0.1:47666",
|
"appName" : "MongoDB Shell",
|
"active" : true,
|
"opid" : "shard0000:1467",
|
"secs_running" : 18,
|
"microsecs_running" : NumberLong(18105219),
|
"op" : "query",
|
"ns" : "test.foo",
|
"query" : {
|
"find" : "foo",
|
"filter" : {
|
"$where" : "sleep(100000)"
|
},
|
"shardVersion" : [
|
Timestamp(0, 0),
|
ObjectId("000000000000000000000000")
|
]
|
},
|
"planSummary" : "COLLSCAN",
|
"numYields" : 0,
|
"locks" : {
|
"Global" : "r",
|
"Database" : "r",
|
"Collection" : "r"
|
},
|
"waitingForLock" : false,
|
"lockStats" : {
|
"Global" : {
|
"acquireCount" : {
|
"r" : NumberLong(2)
|
}
|
},
|
"Database" : {
|
"acquireCount" : {
|
"r" : NumberLong(1)
|
}
|
},
|
"Collection" : {
|
"acquireCount" : {
|
"r" : NumberLong(1)
|
}
|
}
|
}
|
}
|
|
|
I'm confused, alm, are you looking for output in the mongos log or in the result of currentOp? You say currentOp in your description, but you describe log output there, also.
|