Tabnine Logo For Javascript
Agent._conf
Code IndexAdd Tabnine to your IDE (free)

How to use
_conf
function
in
Agent

Best JavaScript code snippets using elastic-apm-node.Agent._conf(Showing top 2 results out of 315)

origin: elastic/apm-agent-nodejs-opentracing

test('#startSpan() - not sampled', setup(function (t) {
 const agent = getAgent()
 agent._conf.transactionSampleRate = 0

 const tracer = new Tracer(agent)
 const span1 = tracer.startSpan()

 t.ok(span1, 'should return span')
 t.ok(span1._span, 'should hold reference to span/transaction')
 t.equal(span1._isTransaction, true, 'first span should be a transaction')
 t.equal(span1._span.sampled, false)

 const span2 = tracer.startSpan()

 t.ok(span2 instanceof UnsampledSpan)

 agent._conf.transactionSampleRate = 1

 t.end()
}))
origin: elastic/apm-agent-nodejs-opentracing

test('#inject(noop, http, {})', setup(function (t) {
 const agent = getAgent()
 agent._conf.transactionSampleRate = 0

 const tracer = new Tracer(agent)

 const span1 = tracer.startSpan('foo')
 t.equal(span1._isTransaction, true)
 t.equal(span1._span.sampled, false)

 const span2 = tracer.startSpan('foo')
 t.ok(span2 instanceof UnsampledSpan)

 const carrier = {}

 tracer.inject(span2, opentracing.FORMAT_HTTP_HEADERS, carrier)

 t.equal(carrier['elastic-apm-traceparent'], span1.context().toString())

 agent._conf.transactionSampleRate = 1

 t.end()
}))
elastic-apm-node(npm)Agent_conf

Most used elastic-apm-node functions

  • Agent._conf
  • Agent._instrumentation
  • Agent.addTags
  • Agent.setCustomContext
  • Agent.setUserContext

Popular in JavaScript

  • axios
    Promise based HTTP client for the browser and node.js
  • cheerio
    Tiny, fast, and elegant implementation of core jQuery designed specifically for the server
  • readable-stream
    Streams3, a user-land copy of the stream library from Node.js
  • lodash
    Lodash modular utilities.
  • ws
    Simple to use, blazing fast and thoroughly tested websocket client and server for Node.js
  • yargs
    yargs the modern, pirate-themed, successor to optimist.
  • redis
    Redis client library
  • mongodb
    The official MongoDB driver for Node.js
  • handlebars
    Handlebars provides the power necessary to let you build semantic templates effectively with no frustration
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now