nodejs-exporter-client

1.0.2 • Public • Published

nodejs-exporter-client


Install

npm i nodejs-exporter-client

Example

const reporter = require('nodejs-exporter-client')

const reporter1 = new reporter('http://localhost:9091/pushGateway')

async function test () {
  let exampleData = {
    'host': 'host01',
    'serviceName': 'phm-app-server',
    'type': 'reqCounter',
    'data': {
      'path': '/api1',
      'method': 'GET',
      'code': '200'
    }
  }

  let res = await reporter1.push(exampleData)
  console.log(res)

  let res2 = await reporter1.push(JSON.stringify(exampleData))
  console.log(res2)
}

Readme

Keywords

none

Package Sidebar

Install

npm i nodejs-exporter-client

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

2.26 kB

Total Files

4

Last publish

Collaborators

  • w958660278