How to use the elastic-apm-node.currentTraceparent function in elastic-apm-node

To help you get started, we’ve selected a few elastic-apm-node examples, based on popular ways it is used in public projects.

github kschingiz / meteor-elastic-apm / __tests__ / mocks / agent.js View on Github external
function newAgent() {
  agent.currentTransaction = undefined;
  agent.currentSpan = undefined;
  agent.currentTraceparent = undefined;

  agent.captureError = jest.fn();
  agent.startSpan = jest.fn(() => ({
    end: jest.fn()
  }));
  agent.startTransaction = jest.fn(() => ({
    end: jest.fn()
  }));

  return agent;
}