@hypertrace/nodejsagent
Advanced tools
Comparing version 1.5.2 to 1.6.0
@@ -11,2 +11,3 @@ "use strict"; | ||
'secure': false, | ||
'cert_file': "", | ||
'trace_reporter_type': 'OTLP', | ||
@@ -13,0 +14,0 @@ 'token': '', |
@@ -29,2 +29,6 @@ "use strict"; | ||
} | ||
let reportingCertFile = (0, envSettings_1.getEnvValue)("REPORTING_CERT_FILE"); | ||
if (reportingCertFile) { | ||
reporting["cert_file"] = reportingCertFile; | ||
} | ||
let reportingToken = (0, envSettings_1.getEnvValue)('REPORTING_TOKEN'); | ||
@@ -31,0 +35,0 @@ if (reportingToken) { |
@@ -38,2 +38,4 @@ "use strict"; | ||
const api = require("@opentelemetry/api"); | ||
const grpc = require('@grpc/grpc-js'); | ||
const fs = require('fs'); | ||
const { Resource } = require('@opentelemetry/resources'); | ||
@@ -176,4 +178,8 @@ const { registerInstrumentations } = require('@opentelemetry/instrumentation'); | ||
Logging_1.logger.info(`Creating OTLP exporter reporting to: ${this.config.config.reporting.endpoint}`); | ||
const credentials = this.config.config.reporting.cert_file.length > 0 | ||
? grpc.credentials.createSsl(fs.readFileSync(this.config.config.reporting.cert_file)) | ||
: grpc.credentials.createInsecure(); | ||
return new exporter_trace_otlp_grpc_1.OTLPTraceExporter({ | ||
url: this.config.config.reporting.endpoint | ||
url: this.config.config.reporting.endpoint, | ||
credentials, | ||
}); | ||
@@ -180,0 +186,0 @@ } |
{ | ||
"name": "@hypertrace/nodejsagent", | ||
"version": "1.5.2", | ||
"version": "1.6.0", | ||
"description": "Hypertrace Node.js Agent", | ||
@@ -5,0 +5,0 @@ "author": "Traceable Inc.", |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
411978
7567
8