Skip to content

Instantly share code, notes, and snippets.

@tamros
Created March 28, 2019 10:10
Show Gist options
  • Save tamros/756e2101b83a57d3e9c0fd165dd9e940 to your computer and use it in GitHub Desktop.
Save tamros/756e2101b83a57d3e9c0fd165dd9e940 to your computer and use it in GitHub Desktop.
var app = require('express')()
app.get('/', function (req, res) {
var err = new Error('Error generated')
apm.captureError(err)
//start to
var span = apm.startSpan('Random wait')
if (span) span.end()
res.send('Hello Elastic Lovers')
var floatVal = 3.1
//created error
my_error()
})
app.listen(3000, () => console.log('Server running on port 3000'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment