How to use the @instana/core.uninstrumentedHttp function in @instana/core

To help you get started, we’ve selected a few @instana/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github instana / nodejs-sensor / packages / collector / src / agentConnection.js View on Github external
'use strict';

var atMostOnce = require('@instana/core').util.atMostOnce;
var buffer = require('@instana/core').util.buffer;
var fs = require('fs');
var http = require('@instana/core').uninstrumentedHttp.http;
var pathUtil = require('path');
var propertySizes = require('@instana/core').util.propertySizes;

var logger;
logger = require('./logger').getLogger('agentConnection', function(newLogger) {
  logger = newLogger;
});

var circularReferenceRemover = require('./util/removeCircular');
var agentOpts = require('./agent/opts');
var pidStore = require('./pidStore');
var cmdline = require('./cmdline');

var cpuSetFileContent = getCpuSetFileContent();

// How many extra characters are to be reserved for the inode and
github instana / nodejs-sensor / packages / collector / src / announceCycle / agentHostLookup.js View on Github external
'use strict';

var atMostOnce = require('@instana/core').util.atMostOnce;
var exec = require('child_process').exec;
var http = require('@instana/core').uninstrumentedHttp.http;

var agentOpts = require('../agent/opts');

var logger;
logger = require('../logger').getLogger('announceCycle/agentHostLookup', function(newLogger) {
  logger = newLogger;
});

// Depending on the environment in which the agent and node collector are running,
// the agent may be available under different hosts. For instance,
// when the agent and collector are running on the same host outside any container,
// the host will probably be 127.0.0.1.
//
// A custom host can be set via agent options
//
// The host differs, when the collector is running inside a Docker container and the
github instana / nodejs-sensor / packages / collector / src / agent / log.js View on Github external
'use strict';

var buffer = require('@instana/core').util.buffer;
var http = require('@instana/core').uninstrumentedHttp.http;

var agentOpts = require('./opts');

module.exports = exports = function log(logLevel, message, stackTrace) {
  var payload = {
    m: message.trim()
  };
  if (stackTrace) {
    payload.st = stackTrace.trim();
  }

  payload = buffer.fromString(JSON.stringify(payload), 'utf8');

  var req = http.request(
    {
      host: agentOpts.host,