How to use the librato-node.timing function in librato-node

To help you get started, we’ve selected a few librato-node examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ello / webapp / src / server / iso.js View on Github external
currentToken().then((token) => {
    librato.timing('iso.render_time', (libratoDone) => {
      // Kick off the render
      console.log(`[${requestId}][render] Enqueueing render`)
      const renderOpts = {
        accessToken: token.token.access_token,
        expiresAt: token.token.expires_at,
        originalUrl: req.originalUrl,
        url: req.url,
        timingHeader,
        requestId,
      }

      const job = queue
        .create('render', renderOpts)
        .ttl(1.1 * preRenderTimeout) // So we don't lose the job mid-timeout
        .removeOnComplete(true)
        .save()

librato-node

A node.js client for Librato Metrics (http://metrics.librato.com/)

MIT
Latest version published 4 years ago

Package Health Score

46 / 100
Full package analysis