datadabllp

instrumenting a Node.js application

Jul 18th, 2024
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const apm = require('elastic-apm-node').start({
  2.   serviceName: 'my-service-name',
  3.   serverUrl: 'http://localhost:8200',
  4. })
  5.  
  6. const express = require('express')
  7. const app = express()
  8.  
  9. app.get('/', function (req, res) {
  10.   res.send('Hello World!')
  11. })
  12.  
  13. app.listen(3000)
  14.  
Advertisement
Add Comment
Please, Sign In to add comment