@opentelemetry/exporter-zipkin
Advanced tools
Comparing version 0.7.0 to 0.8.0
@@ -17,1 +17,2 @@ /*! | ||
export * from './zipkin'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -16,3 +16,3 @@ /*! | ||
*/ | ||
import * as types from '@opentelemetry/api'; | ||
import * as api from '@opentelemetry/api'; | ||
import { ReadableSpan } from '@opentelemetry/tracing'; | ||
@@ -29,6 +29,7 @@ import * as zipkinTypes from './types'; | ||
/** Converts OpenTelemetry Attributes and Status to Zipkin Tags format. */ | ||
export declare function _toZipkinTags(attributes: types.Attributes, status: types.Status, statusCodeTagName: string, statusDescriptionTagName: string, resource: Resource): zipkinTypes.Tags; | ||
export declare function _toZipkinTags(attributes: api.Attributes, status: api.Status, statusCodeTagName: string, statusDescriptionTagName: string, resource: Resource): zipkinTypes.Tags; | ||
/** | ||
* Converts OpenTelemetry Events to Zipkin Annotations format. | ||
*/ | ||
export declare function _toZipkinAnnotations(events: types.TimedEvent[]): zipkinTypes.Annotation[]; | ||
export declare function _toZipkinAnnotations(events: api.TimedEvent[]): zipkinTypes.Annotation[]; | ||
//# sourceMappingURL=transform.d.ts.map |
@@ -18,12 +18,12 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const types = require("@opentelemetry/api"); | ||
const api = require("@opentelemetry/api"); | ||
const core_1 = require("@opentelemetry/core"); | ||
const zipkinTypes = require("./types"); | ||
const ZIPKIN_SPAN_KIND_MAPPING = { | ||
[types.SpanKind.CLIENT]: zipkinTypes.SpanKind.CLIENT, | ||
[types.SpanKind.SERVER]: zipkinTypes.SpanKind.SERVER, | ||
[types.SpanKind.CONSUMER]: zipkinTypes.SpanKind.CONSUMER, | ||
[types.SpanKind.PRODUCER]: zipkinTypes.SpanKind.PRODUCER, | ||
[api.SpanKind.CLIENT]: zipkinTypes.SpanKind.CLIENT, | ||
[api.SpanKind.SERVER]: zipkinTypes.SpanKind.SERVER, | ||
[api.SpanKind.CONSUMER]: zipkinTypes.SpanKind.CONSUMER, | ||
[api.SpanKind.PRODUCER]: zipkinTypes.SpanKind.PRODUCER, | ||
// When absent, the span is local. | ||
[types.SpanKind.INTERNAL]: undefined, | ||
[api.SpanKind.INTERNAL]: undefined, | ||
}; | ||
@@ -60,3 +60,3 @@ exports.statusCodeTagName = 'ot.status_code'; | ||
} | ||
tags[statusCodeTagName] = String(types.CanonicalCode[status.code]); | ||
tags[statusCodeTagName] = String(api.CanonicalCode[status.code]); | ||
if (status.message) { | ||
@@ -63,0 +63,0 @@ tags[statusDescriptionTagName] = status.message; |
@@ -16,3 +16,3 @@ /*! | ||
*/ | ||
import * as types from '@opentelemetry/api'; | ||
import * as api from '@opentelemetry/api'; | ||
/** | ||
@@ -22,3 +22,3 @@ * Exporter config | ||
export interface ExporterConfig { | ||
logger?: types.Logger; | ||
logger?: api.Logger; | ||
serviceName: string; | ||
@@ -168,1 +168,2 @@ url?: string; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
@@ -17,1 +17,2 @@ /*! | ||
export declare const OT_REQUEST_HEADER = "x-opentelemetry-outgoing-request"; | ||
//# sourceMappingURL=utils.d.ts.map |
@@ -16,2 +16,3 @@ /*! | ||
*/ | ||
export declare const VERSION = "0.7.0"; | ||
export declare const VERSION = "0.8.0"; | ||
//# sourceMappingURL=version.d.ts.map |
@@ -19,3 +19,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.7.0'; | ||
exports.VERSION = '0.8.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -16,4 +16,4 @@ /*! | ||
*/ | ||
import { ExportResult } from '@opentelemetry/core'; | ||
import { SpanExporter, ReadableSpan } from '@opentelemetry/tracing'; | ||
import { ExportResult } from '@opentelemetry/base'; | ||
import * as zipkinTypes from './types'; | ||
@@ -53,1 +53,2 @@ /** | ||
} | ||
//# sourceMappingURL=zipkin.d.ts.map |
@@ -22,3 +22,2 @@ "use strict"; | ||
const core_1 = require("@opentelemetry/core"); | ||
const base_1 = require("@opentelemetry/base"); | ||
const transform_1 = require("./transform"); | ||
@@ -53,3 +52,3 @@ const utils_1 = require("./utils"); | ||
if (this._isShutdown) { | ||
setTimeout(() => resultCallback(base_1.ExportResult.FAILED_NOT_RETRYABLE)); | ||
setTimeout(() => resultCallback(core_1.ExportResult.FAILED_NOT_RETRYABLE)); | ||
return; | ||
@@ -92,3 +91,3 @@ } | ||
this._logger.debug('Zipkin send with empty spans'); | ||
return done(base_1.ExportResult.SUCCESS); | ||
return done(core_1.ExportResult.SUCCESS); | ||
} | ||
@@ -106,11 +105,11 @@ const { request } = this._reqOpts.protocol === 'http:' ? http : https; | ||
if (statusCode < 400) { | ||
return done(base_1.ExportResult.SUCCESS); | ||
return done(core_1.ExportResult.SUCCESS); | ||
// Consider 4xx as failed non-retriable. | ||
} | ||
else if (statusCode < 500) { | ||
return done(base_1.ExportResult.FAILED_NOT_RETRYABLE); | ||
return done(core_1.ExportResult.FAILED_NOT_RETRYABLE); | ||
// Consider 5xx as failed retriable. | ||
} | ||
else { | ||
return done(base_1.ExportResult.FAILED_RETRYABLE); | ||
return done(core_1.ExportResult.FAILED_RETRYABLE); | ||
} | ||
@@ -121,3 +120,3 @@ }); | ||
this._logger.error('Zipkin request error', err); | ||
return done(base_1.ExportResult.FAILED_RETRYABLE); | ||
return done(core_1.ExportResult.FAILED_RETRYABLE); | ||
}); | ||
@@ -124,0 +123,0 @@ // Issue request to remote service |
{ | ||
"name": "@opentelemetry/exporter-zipkin", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "OpenTelemetry Zipkin Exporter allows the user to send collected traces to Zipkin.", | ||
@@ -57,8 +57,7 @@ "main": "build/src/index.js", | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.7.0", | ||
"@opentelemetry/base": "^0.7.0", | ||
"@opentelemetry/core": "^0.7.0", | ||
"@opentelemetry/resources": "^0.7.0", | ||
"@opentelemetry/tracing": "^0.7.0" | ||
"@opentelemetry/api": "^0.8.0", | ||
"@opentelemetry/core": "^0.8.0", | ||
"@opentelemetry/resources": "^0.8.0", | ||
"@opentelemetry/tracing": "^0.8.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
39669
4
602
+ Added@opentelemetry/api@0.8.3(transitive)
+ Added@opentelemetry/context-base@0.8.3(transitive)
+ Added@opentelemetry/core@0.8.3(transitive)
+ Added@opentelemetry/resources@0.8.3(transitive)
+ Added@opentelemetry/tracing@0.8.3(transitive)
- Removed@opentelemetry/base@^0.7.0
- Removed@opentelemetry/api@0.7.0(transitive)
- Removed@opentelemetry/base@0.7.0(transitive)
- Removed@opentelemetry/context-base@0.7.0(transitive)
- Removed@opentelemetry/core@0.7.0(transitive)
- Removed@opentelemetry/resources@0.7.0(transitive)
- Removed@opentelemetry/tracing@0.7.0(transitive)
Updated@opentelemetry/api@^0.8.0
Updated@opentelemetry/core@^0.8.0