How to use the @opencensus/core.ExporterBuffer function in @opencensus/core

To help you get started, we’ve selected a few @opencensus/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 census-instrumentation / opencensus-node / packages / opencensus-exporter-ocagent / src / ocagent.ts View on Github external
constructor(options: OCAgentExporterOptions) {
    // Get the complete set of options from the defaults and inputs
    this.config = Object.assign({}, DEFAULT_OPTIONS, options);
    this.logger = this.config.logger as Logger;

    // Create buffer
    this.buffer = new ExporterBuffer(this, this.config);

    /**
     * Get node properties
     */
    this.exporterVersion = require('../../package.json').version;
    this.coreVersion = coreVersion;
    this.hostName = os.hostname();
    this.processStartTimeMillis = Date.now() - process.uptime() * 1000;

    /**
     * Generate grpc services from the proto files.
     */
    const traceServiceProtoPath =
      'opencensus/proto/agent/trace/v1/trace_service.proto';
    const includeDirs = [__dirname + '/protos'];
    // tslint:disable-next-line:no-any
github census-instrumentation / opencensus-node / packages / opencensus-exporter-zipkin / src / zipkin.ts View on Github external
constructor(options: ZipkinExporterOptions) {
    this.zipkinUrl =
      (options.url && url.parse(options.url)) ||
      url.parse(ZipkinTraceExporter.DEFAULT_URL);
    this.serviceName = options.serviceName;
    this.buffer = new ExporterBuffer(this, options);
    this.logger = options.logger || logger.logger();
  }
github census-instrumentation / opencensus-node / packages / opencensus-exporter-stackdriver / src / stackdriver-cloudtrace.ts View on Github external
constructor(options: StackdriverExporterOptions) {
    this.projectId = options.projectId;
    this.logger = options.logger || logger.logger();
    this.exporterBuffer = new ExporterBuffer(this, options);
    this.RESOURCE_LABELS = getResourceLabels(
      getDefaultResource(this.projectId)
    );
    if (options.credentials) {
      auth = new GoogleAuth({ credentials: options.credentials });
    }
  }
github census-instrumentation / opencensus-node / packages / opencensus-exporter-object / src / object.ts View on Github external
constructor(options: ExporterConfig = {}) {
    this.buffer = new ExporterBuffer(this, options);
    this.logger = options.logger || logger.logger();
  }
github census-instrumentation / opencensus-node / packages / opencensus-exporter-instana / src / instana.ts View on Github external
constructor(options: InstanaExporterOptions = {}) {
    this.agentHost =
      options.agentHost || process.env.INSTANA_AGENT_HOST || '127.0.0.1';
    this.agentPort =
      options.agentPort || Number(process.env.INSTANA_AGENT_PORT) || 42699;
    this.transmissionTimeout = options.transmissionTimeout || 10000;
    this.logger = options.logger || logger.logger();
    this.exporterBuffer = new ExporterBuffer(this, options);
  }
github keymetrics / pm2-io-apm / src / census / exporter.ts View on Github external
constructor (config: TracingConfig) {
    this.config = config
    this.buffer = new ExporterBuffer(this, {})
  }