chetanmeh commented on a change in pull request #4023: Emit CosmosDB request
usage metric
URL:
https://github.com/apache/incubator-openwhisk/pull/4023#discussion_r218051211
##########
File path:
common/scala/src/main/scala/whisk/core/database/cosmosdb/CosmosDBArtifactStore.scala
##########
@@ -206,6 +217,10 @@ class CosmosDBArtifactStore[DocumentAbstraction <:
DocumentSerializer](protected
RxReactiveStreams.toPublisher(client.queryDocuments(collection.getSelfLink,
querySpec, newFeedOptions()))
val f = Source
.fromPublisher(publisher)
+ .map { f =>
+ collectMetrics(queryToken, f.getRequestCharge)
+ f
+ }
Review comment:
Yes `wireTap` is better operator to use. Switched to that now
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services