Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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
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();
}
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 });
}
}
constructor(options: ExporterConfig = {}) {
this.buffer = new ExporterBuffer(this, options);
this.logger = options.logger || logger.logger();
}
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);
}
constructor (config: TracingConfig) {
this.config = config
this.buffer = new ExporterBuffer(this, {})
}