forked from signalfx/tracing-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtracer.js
19 lines (17 loc) · 772 Bytes
/
tracer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// This module import and init() method invocation will create an
// OpenTracing-compatible tracer and initiate auto-instrumentation
// of all supported libraries and frameworks.
//
// This init() call MUST occur before any desired library is imported
// elsewhere for instrumentation to take effect globally.
const tracer = require('signalfx-tracing').init();
//const tracer = require('signalfx-tracing').init({plugins: false});
//tracer.use('hapi')
// The service name is obtained by SIGNALFX_SERVICE_NAME environment
// variable. If declaring within the init() call is preferred,
// a `service` option object property can be used:
//
// const tracer = require('signalfx-tracing')
// .init({ service: 'my-node-service' })
//
module.exports = tracer;