Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@opencensus/exporter-stackdriver

Package Overview
Dependencies
Maintainers
7
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opencensus/exporter-stackdriver - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

build/src/stackdriver-monitoring-utils.d.ts

10

build/src/stackdriver-cloudtrace-utils.js

@@ -50,3 +50,5 @@ "use strict";

const attributesBuilder = createAttributesBuilder(attributes, droppedAttributesCount);
attributesBuilder.attributeMap[AGENT_LABEL_KEY] = AGENT_LABEL_VALUE;
if (attributesBuilder.attributeMap) {
attributesBuilder.attributeMap[AGENT_LABEL_KEY] = AGENT_LABEL_VALUE;
}
attributesBuilder.attributeMap =

@@ -80,4 +82,6 @@ Object.assign({}, attributesBuilder.attributeMap, resourceLabels);

messageEvent: {
id: messageEvent.id,
type: createMessageEventType(messageEvent.type)
id: String(messageEvent.id),
type: createMessageEventType(messageEvent.type),
uncompressedSize: String(messageEvent.uncompressedSize || 0),
compressedSize: String(messageEvent.compressedSize || 0)
}

@@ -84,0 +88,0 @@ })));

@@ -50,5 +50,5 @@ /**

* authenticates the client and calls a method to send the spans data.
* @param stackdriverTraces
* @param stackdriverSpans The spans to export
*/
private authorize;
}

@@ -78,3 +78,3 @@ "use strict";

// RootSpan data
spanList.push(this.createSpan(rootSpan, resourceLabel));
spanList.push(this.createSpan(rootSpan, resourceLabel, rootSpan.numberOfChildren));
rootSpan.spans.forEach(span => {

@@ -88,3 +88,3 @@ // Builds spans data

}
createSpan(span, resourceLabels) {
createSpan(span, resourceLabels, numberOfChildren = 0) {
const spanName = `projects/${this.projectId}/traces/${span.traceId}/spans/${span.id}`;

@@ -102,4 +102,4 @@ const spanBuilder = {

sameProcessAsParentSpan: !span.remoteParent,
childSpanCount: null,
stackTrace: null,
childSpanCount: numberOfChildren,
stackTrace: undefined,
};

@@ -109,3 +109,3 @@ if (span.parentSpanId) {

}
if (span.status.message) {
if (span.status.message && spanBuilder.status) {
spanBuilder.status.message = span.status.message;

@@ -143,3 +143,3 @@ }

* authenticates the client and calls a method to send the spans data.
* @param stackdriverTraces
* @param stackdriverSpans The spans to export
*/

@@ -146,0 +146,0 @@ authorize(stackdriverSpans) {

@@ -24,3 +24,3 @@ /**

private displayNamePrefix;
private onMetricUploadError;
private onMetricUploadError?;
private timer;

@@ -65,3 +65,3 @@ static readonly DEFAULT_DISPLAY_NAME_PREFIX: string;

*/
close(): void;
stop(): void;
/**

@@ -68,0 +68,0 @@ * Gets the Google Application Credentials from the environment variables

@@ -30,3 +30,3 @@ "use strict";

const common_utils_1 = require("./common-utils");
const stackdriver_stats_utils_1 = require("./stackdriver-stats-utils");
const stackdriver_monitoring_utils_1 = require("./stackdriver-monitoring-utils");
const OC_USER_AGENT = {

@@ -55,3 +55,5 @@ product: 'opencensus-node',

this.logger = options.logger || core_1.logger.logger();
this.onMetricUploadError = options.onMetricUploadError;
if (options.onMetricUploadError) {
this.onMetricUploadError = options.onMetricUploadError;
}
this.DEFAULT_RESOURCE = common_utils_1.getDefaultResource(this.projectId);

@@ -135,3 +137,3 @@ }

for (const metric of metricsList) {
timeSeries.push(...stackdriver_stats_utils_1.createTimeSeriesList(metric, monitoredResource, this.metricPrefix));
timeSeries.push(...stackdriver_monitoring_utils_1.createTimeSeriesList(metric, monitoredResource, this.metricPrefix));
}

@@ -164,3 +166,3 @@ if (timeSeries.length === 0) {

name: `projects/${this.projectId}`,
resource: stackdriver_stats_utils_1.createMetricDescriptorData(metricDescriptor, this.metricPrefix, this.displayNamePrefix),
resource: stackdriver_monitoring_utils_1.createMetricDescriptorData(metricDescriptor, this.metricPrefix, this.displayNamePrefix),
auth: authClient

@@ -180,3 +182,3 @@ };

*/
close() {
stop() {
clearInterval(this.timer);

@@ -183,0 +185,0 @@ }

{
"name": "@opencensus/exporter-stackdriver",
"version": "0.0.9",
"version": "0.0.10",
"description": "OpenCensus Exporter Stackdriver allows user to send collected traces to Stackdriver",

@@ -9,3 +9,3 @@ "main": "build/src/index.js",

"scripts": {
"test": "nyc mocha build/test/**/*.js",
"test": "nyc ts-mocha -p ./tsconfig.json test/**/*.ts",
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json",

@@ -17,3 +17,2 @@ "clean": "rimraf build/*",

"prepare": "npm run compile",
"pretest": "npm run compile; cp -r ./test/fixtures ./build/test/",
"posttest": "npm run check"

@@ -42,2 +41,13 @@ },

],
"nyc": {
"extension": [
".ts",
".tsx"
],
"exclude": [
"**/*.d.ts",
"build/**/**/*.js"
],
"all": true
},
"publishConfig": {

@@ -52,16 +62,15 @@ "access": "public"

"gts": "^0.9.0",
"mocha": "^5.0.4",
"ncp": "^2.0.0",
"mocha": "^6.0.0",
"nock": "^10.0.0",
"nyc": "^13.0.0",
"ts-node": "^7.0.1",
"ts-mocha": "^6.0.0",
"ts-node": "^8.0.0",
"typescript": "~3.1.0"
},
"dependencies": {
"@opencensus/core": "^0.0.9",
"@opencensus/resource-util": "^0.0.9",
"@opencensus/core": "^0.0.10",
"@opencensus/resource-util": "^0.0.10",
"google-auth-library": "^3.0.0",
"googleapis": "37.2.0",
"hex2dec": "^1.1.0"
"googleapis": "38.0.0"
}
}

@@ -33,3 +33,3 @@ # OpenCensus Stackdriver Exporter for Node.js

// Add your project id to the Stackdriver options
var exporter = new StackdriverTraceExporter({projectId: "your-project-id"});
const exporter = new StackdriverTraceExporter({projectId: "your-project-id"});

@@ -36,0 +36,0 @@ tracing.registerExporter(exporter).start();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc