markusthoemmes commented on a change in pull request #4023: Emit CosmosDB
request usage metric
URL:
https://github.com/apache/incubator-openwhisk/pull/4023#discussion_r218031598
##########
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:
Could you use `wireTap` here?
----------------------------------------------------------------
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