@opencensus/exporter-zipkin
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -16,3 +16,3 @@ /** | ||
*/ | ||
import { Exporter, ExporterBuffer, ExporterConfig, RootSpan, Span } from '@opencensus/core'; | ||
import { Exporter, ExporterBuffer, ExporterConfig, Span } from '@opencensus/core'; | ||
import { Logger } from '@opencensus/core'; | ||
@@ -56,7 +56,7 @@ export declare const MICROS_PER_MILLI = 1000; | ||
* Is called whenever a span is ended. | ||
* @param root the ended span | ||
* @param span the ended span | ||
*/ | ||
onEndSpan(root: RootSpan): void; | ||
onEndSpan(span: Span): void; | ||
/** Not used for this exporter */ | ||
onStartSpan(root: RootSpan): void; | ||
onStartSpan(span: Span): void; | ||
/** | ||
@@ -69,3 +69,3 @@ * Send a trace to zipkin service | ||
* Mount a list (array) of spans translated to Zipkin format | ||
* @param rootSpans Rootspan array to be translated | ||
* @param rootSpans Span array to be translated | ||
*/ | ||
@@ -76,6 +76,5 @@ private mountSpanList; | ||
* @param span Span to be translated | ||
* @param rootSpan Only necessary if the span has rootSpan | ||
*/ | ||
translateSpan(span: Span | RootSpan): TranslatedSpan; | ||
/** Converts OpenCensus Attributes ans Status to Zipkin Tags format. */ | ||
translateSpan(span: Span): TranslatedSpan; | ||
/** Converts OpenCensus Attributes and Status to Zipkin Tags format. */ | ||
private createTags; | ||
@@ -89,5 +88,5 @@ /** | ||
* Send the rootSpans to zipkin service | ||
* @param rootSpans RootSpan array | ||
* @param rootSpans Span array | ||
*/ | ||
publish(rootSpans: RootSpan[]): Promise<any>; | ||
publish(rootSpans: Span[]): Promise<any>; | ||
} |
@@ -41,9 +41,9 @@ "use strict"; | ||
* Is called whenever a span is ended. | ||
* @param root the ended span | ||
* @param span the ended span | ||
*/ | ||
onEndSpan(root) { | ||
this.buffer.addToBuffer(root); | ||
onEndSpan(span) { | ||
this.buffer.addToBuffer(span); | ||
} | ||
/** Not used for this exporter */ | ||
onStartSpan(root) { } | ||
onStartSpan(span) { } | ||
/** | ||
@@ -95,3 +95,3 @@ * Send a trace to zipkin service | ||
* Mount a list (array) of spans translated to Zipkin format | ||
* @param rootSpans Rootspan array to be translated | ||
* @param rootSpans Span array to be translated | ||
*/ | ||
@@ -113,6 +113,5 @@ mountSpanList(rootSpans) { | ||
* @param span Span to be translated | ||
* @param rootSpan Only necessary if the span has rootSpan | ||
*/ | ||
translateSpan(span) { | ||
const spanTraslated = { | ||
const spanTranslated = { | ||
traceId: span.traceId, | ||
@@ -127,3 +126,3 @@ name: span.name, | ||
debug: true, | ||
shared: true, | ||
shared: !span.parentSpanId, | ||
localEndpoint: { serviceName: this.serviceName }, | ||
@@ -134,7 +133,7 @@ tags: this.createTags(span.attributes, span.status), | ||
if (span.parentSpanId) { | ||
spanTraslated.parentId = span.parentSpanId; | ||
spanTranslated.parentId = span.parentSpanId; | ||
} | ||
return spanTraslated; | ||
return spanTranslated; | ||
} | ||
/** Converts OpenCensus Attributes ans Status to Zipkin Tags format. */ | ||
/** Converts OpenCensus Attributes and Status to Zipkin Tags format. */ | ||
createTags(attributes, status) { | ||
@@ -175,3 +174,3 @@ const tags = {}; | ||
* Send the rootSpans to zipkin service | ||
* @param rootSpans RootSpan array | ||
* @param rootSpans Span array | ||
*/ | ||
@@ -178,0 +177,0 @@ publish(rootSpans) { |
{ | ||
"name": "@opencensus/exporter-zipkin", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "OpenCensus Zipkin Exporter allows the user to send collected traces with OpenCensus Node.js to Zipkin.", | ||
@@ -57,5 +57,5 @@ "main": "build/src/index.js", | ||
"gts": "^0.9.0", | ||
"mocha": "^6.0.0", | ||
"mocha": "^6.1.0", | ||
"nock": "^10.0.0", | ||
"nyc": "13.3.0", | ||
"nyc": "14.0.0", | ||
"ts-mocha": "^6.0.0", | ||
@@ -66,4 +66,4 @@ "ts-node": "^8.0.0", | ||
"dependencies": { | ||
"@opencensus/core": "^0.0.11" | ||
"@opencensus/core": "^0.0.12" | ||
} | ||
} |
26408
303
+ Added@opencensus/core@0.0.12(transitive)
- Removed@opencensus/core@0.0.11(transitive)
Updated@opencensus/core@^0.0.12