Skip to content

Latest commit

 

History

History

mock-infinite-tracing-server

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Mock Infinite Tracing gRPC Server

This is a gRPC server used to test our infinite tracing with the Node.js agent.

Setup

To setup gRPC, run

npm install
node index.js

Test

Once the gPRC server is started, you can use it in an example application and set the following in newrelic.js

exports.config = {
    license_key: <your-license-key>,
    infinite_tracing: {
        trace_observer: {
            host: 'localhost',
            port: 50051,
            insecure: true
        },
        span_events: {
            force_capture_trace: true
        }
    }
}

As you use the application the mock gPRC server will log to console the number of spans seen.

Testing errors

You can have the mock server respond with an error every n calls. The agent has client retries built in and this can verify it is working. Below is an example that fails every 10th call:

NR_FAILS=true NR_FAIL_N_CALLS=10 node index.js