@opentelemetry/exporter-zipkin
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -19,2 +19,3 @@ /*! | ||
import * as zipkinTypes from './types'; | ||
import { Resource } from '@opentelemetry/resources'; | ||
export declare const statusCodeTagName = "ot.status_code"; | ||
@@ -28,3 +29,3 @@ export declare const statusDescriptionTagName = "ot.status_description"; | ||
/** Converts OpenTelemetry Attributes and Status to Zipkin Tags format. */ | ||
export declare function _toZipkinTags(attributes: types.Attributes, status: types.Status, statusCodeTagName: string, statusDescriptionTagName: string): zipkinTypes.Tags; | ||
export declare function _toZipkinTags(attributes: types.Attributes, status: types.Status, statusCodeTagName: string, statusDescriptionTagName: string, resource: Resource): zipkinTypes.Tags; | ||
/** | ||
@@ -31,0 +32,0 @@ * Converts OpenTelemetry Events to Zipkin Annotations format. |
@@ -45,3 +45,3 @@ "use strict"; | ||
localEndpoint: { serviceName }, | ||
tags: _toZipkinTags(span.attributes, span.status, statusCodeTagName, statusDescriptionTagName), | ||
tags: _toZipkinTags(span.attributes, span.status, statusCodeTagName, statusDescriptionTagName, span.resource), | ||
annotations: span.events.length | ||
@@ -55,3 +55,3 @@ ? _toZipkinAnnotations(span.events) | ||
/** Converts OpenTelemetry Attributes and Status to Zipkin Tags format. */ | ||
function _toZipkinTags(attributes, status, statusCodeTagName, statusDescriptionTagName) { | ||
function _toZipkinTags(attributes, status, statusCodeTagName, statusDescriptionTagName, resource) { | ||
const tags = {}; | ||
@@ -65,2 +65,3 @@ for (const key of Object.keys(attributes)) { | ||
} | ||
Object.keys(resource.labels).forEach(name => (tags[name] = resource.labels[name])); | ||
return tags; | ||
@@ -67,0 +68,0 @@ } |
@@ -24,3 +24,2 @@ /*! | ||
url?: string; | ||
forceFlush?: boolean; | ||
statusCodeTagName?: string; | ||
@@ -27,0 +26,0 @@ statusDescriptionTagName?: string; |
@@ -16,2 +16,2 @@ /*! | ||
*/ | ||
export declare const VERSION = "0.4.0"; | ||
export declare const VERSION = "0.5.0"; |
@@ -19,3 +19,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.4.0'; | ||
exports.VERSION = '0.5.0'; | ||
//# sourceMappingURL=version.js.map |
@@ -24,3 +24,2 @@ /*! | ||
static readonly DEFAULT_URL = "http://localhost:9411/api/v2/spans"; | ||
private readonly _forceFlush; | ||
private readonly _logger; | ||
@@ -27,0 +26,0 @@ private readonly _serviceName; |
@@ -32,3 +32,2 @@ "use strict"; | ||
const urlOpts = url.parse(urlStr); | ||
this._forceFlush = config.forceFlush || true; | ||
this._logger = config.logger || new core_1.NoopLogger(); | ||
@@ -68,7 +67,2 @@ this._reqOpts = Object.assign({ | ||
this._isShutdown = true; | ||
// Make an optimistic flush. | ||
if (this._forceFlush) { | ||
// @todo get spans from span processor (batch) | ||
this._sendSpans([]); | ||
} | ||
} | ||
@@ -75,0 +69,0 @@ /** |
{ | ||
"name": "@opentelemetry/exporter-zipkin", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "OpenTelemetry Zipkin Exporter allows the user to send collected traces to Zipkin.", | ||
@@ -9,6 +9,7 @@ "main": "build/src/index.js", | ||
"scripts": { | ||
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.ts'", | ||
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.test.ts'", | ||
"tdd": "npm run test -- --watch-extensions ts --watch", | ||
"clean": "rimraf build/*", | ||
"check": "gts check", | ||
"lint": "gts check", | ||
"lint:fix": "gts fix", | ||
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", | ||
@@ -18,3 +19,2 @@ "precompile": "tsc --version", | ||
"compile": "npm run version:update && tsc -p .", | ||
"fix": "gts fix", | ||
"prepare": "npm run compile" | ||
@@ -60,7 +60,8 @@ }, | ||
"dependencies": { | ||
"@opentelemetry/api": "^0.4.0", | ||
"@opentelemetry/base": "^0.4.0", | ||
"@opentelemetry/core": "^0.4.0", | ||
"@opentelemetry/tracing": "^0.4.0" | ||
"@opentelemetry/api": "^0.5.0", | ||
"@opentelemetry/base": "^0.5.0", | ||
"@opentelemetry/core": "^0.5.0", | ||
"@opentelemetry/resources": "^0.5.0", | ||
"@opentelemetry/tracing": "^0.5.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
39592
5
603
+ Added@opentelemetry/api@0.5.2(transitive)
+ Added@opentelemetry/base@0.5.2(transitive)
+ Added@opentelemetry/context-base@0.5.2(transitive)
+ Added@opentelemetry/core@0.5.2(transitive)
+ Added@opentelemetry/resources@0.5.2(transitive)
+ Added@opentelemetry/tracing@0.5.2(transitive)
+ Addedsemver@7.6.3(transitive)
- Removed@opentelemetry/api@0.4.0(transitive)
- Removed@opentelemetry/base@0.4.0(transitive)
- Removed@opentelemetry/core@0.4.0(transitive)
- Removed@opentelemetry/scope-base@0.4.0(transitive)
- Removed@opentelemetry/tracing@0.4.0(transitive)
- Removedsemver@6.3.1(transitive)
Updated@opentelemetry/api@^0.5.0
Updated@opentelemetry/base@^0.5.0
Updated@opentelemetry/core@^0.5.0