def add(self,
registry: CollectorRegistry) -> aiohttp.web.Response:
'''
Add works like replace, but only metrics with the same name as the
newly pushed metrics are replaced.
'''
async with aiohttp.ClientSession(loop=self.loop) as session:
payload = self.formatter.marshall(registry)
resp = await session.post(
self.path, data=payload, headers=self.headers)
await resp.release()
return resp
评论列表
文章目录