@opentelemetry/exporter-jaeger
Advanced tools
Comparing version 0.3.3 to 0.4.0
@@ -16,4 +16,4 @@ /*! | ||
*/ | ||
import { SpanExporter, ReadableSpan } from '@opentelemetry/tracing'; | ||
import { ExportResult } from '@opentelemetry/base'; | ||
import { ReadableSpan, SpanExporter } from '@opentelemetry/tracing'; | ||
import * as jaegerTypes from './types'; | ||
@@ -20,0 +20,0 @@ /** |
@@ -19,5 +19,6 @@ "use strict"; | ||
const base_1 = require("@opentelemetry/base"); | ||
const jaegerTypes = require("./types"); | ||
const core_1 = require("@opentelemetry/core"); | ||
const dgram_1 = require("dgram"); | ||
const transform_1 = require("./transform"); | ||
const jaegerTypes = require("./types"); | ||
/** | ||
@@ -36,2 +37,6 @@ * Format and sends span information to Jaeger Exporter. | ||
this._sender = new jaegerTypes.UDPSender(config); | ||
if (this._sender._client instanceof dgram_1.Socket) { | ||
// unref socket to prevent it from keeping the process running | ||
this._sender._client.unref(); | ||
} | ||
this._process = { | ||
@@ -38,0 +43,0 @@ serviceName: config.serviceName, |
@@ -18,5 +18,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const types_1 = require("@opentelemetry/types"); | ||
const api_1 = require("@opentelemetry/api"); | ||
const core_1 = require("@opentelemetry/core"); | ||
const types_2 = require("./types"); | ||
const types_1 = require("./types"); | ||
const DEFAULT_FLAGS = 0x1; | ||
@@ -31,7 +31,7 @@ /** | ||
const parentSpan = span.parentSpanId | ||
? types_2.Utils.encodeInt64(span.parentSpanId) | ||
: types_2.ThriftUtils.emptyBuffer; | ||
? types_1.Utils.encodeInt64(span.parentSpanId) | ||
: types_1.ThriftUtils.emptyBuffer; | ||
const tags = Object.keys(span.attributes).map((name) => ({ key: name, value: toTagValue(span.attributes[name]) })); | ||
tags.push({ key: 'status.code', value: span.status.code }); | ||
tags.push({ key: 'status.name', value: types_1.CanonicalCode[span.status.code] }); | ||
tags.push({ key: 'status.name', value: api_1.CanonicalCode[span.status.code] }); | ||
if (span.status.message) { | ||
@@ -42,9 +42,9 @@ tags.push({ key: 'status.message', value: span.status.message }); | ||
// Jaeger span. | ||
if (span.status.code !== types_1.CanonicalCode.OK) { | ||
if (span.status.code !== api_1.CanonicalCode.OK) { | ||
tags.push({ key: 'error', value: true }); | ||
} | ||
if (span.kind !== undefined) { | ||
tags.push({ key: 'span.kind', value: types_1.SpanKind[span.kind] }); | ||
tags.push({ key: 'span.kind', value: api_1.SpanKind[span.kind] }); | ||
} | ||
const spanTags = types_2.ThriftUtils.getThriftTags(tags); | ||
const spanTags = types_1.ThriftUtils.getThriftTags(tags); | ||
const logs = span.events.map((event) => { | ||
@@ -58,7 +58,7 @@ const fields = [{ key: 'message.id', value: event.name }]; | ||
}); | ||
const spanLogs = types_2.ThriftUtils.getThriftLogs(logs); | ||
const spanLogs = types_1.ThriftUtils.getThriftLogs(logs); | ||
return { | ||
traceIdLow: types_2.Utils.encodeInt64(traceIdLow), | ||
traceIdHigh: types_2.Utils.encodeInt64(traceIdHigh), | ||
spanId: types_2.Utils.encodeInt64(span.spanContext.spanId), | ||
traceIdLow: types_1.Utils.encodeInt64(traceIdLow), | ||
traceIdHigh: types_1.Utils.encodeInt64(traceIdHigh), | ||
spanId: types_1.Utils.encodeInt64(span.spanContext.spanId), | ||
parentSpanId: parentSpan, | ||
@@ -68,4 +68,4 @@ operationName: span.name, | ||
flags: span.spanContext.traceFlags || DEFAULT_FLAGS, | ||
startTime: types_2.Utils.encodeInt64(core_1.hrTimeToMicroseconds(span.startTime)), | ||
duration: types_2.Utils.encodeInt64(core_1.hrTimeToMicroseconds(span.duration)), | ||
startTime: types_1.Utils.encodeInt64(core_1.hrTimeToMicroseconds(span.startTime)), | ||
duration: types_1.Utils.encodeInt64(core_1.hrTimeToMicroseconds(span.duration)), | ||
tags: spanTags, | ||
@@ -81,7 +81,7 @@ logs: spanLogs, | ||
if (link.spanContext.spanId === parentSpanId) { | ||
const refType = types_2.ThriftReferenceType.CHILD_OF; | ||
const refType = types_1.ThriftReferenceType.CHILD_OF; | ||
const traceId = link.spanContext.traceId; | ||
const traceIdHigh = types_2.Utils.encodeInt64(traceId.slice(0, 16)); | ||
const traceIdLow = types_2.Utils.encodeInt64(traceId.slice(16)); | ||
const spanId = types_2.Utils.encodeInt64(link.spanContext.spanId); | ||
const traceIdHigh = types_1.Utils.encodeInt64(traceId.slice(0, 16)); | ||
const traceIdLow = types_1.Utils.encodeInt64(traceId.slice(16)); | ||
const spanId = types_1.Utils.encodeInt64(link.spanContext.spanId); | ||
return { traceIdLow, traceIdHigh, spanId, refType }; | ||
@@ -88,0 +88,0 @@ } |
@@ -17,3 +17,3 @@ /*! | ||
/// <reference types="node" /> | ||
import * as types from '@opentelemetry/types'; | ||
import * as types from '@opentelemetry/api'; | ||
/** | ||
@@ -20,0 +20,0 @@ * Options for Jaeger configuration |
@@ -16,2 +16,2 @@ /*! | ||
*/ | ||
export declare const VERSION = "0.3.3"; | ||
export declare const VERSION = "0.4.0"; |
@@ -19,3 +19,3 @@ "use strict"; | ||
// this is autogenerated file, see scripts/version-update.js | ||
exports.VERSION = '0.3.3'; | ||
exports.VERSION = '0.4.0'; | ||
//# sourceMappingURL=version.js.map |
{ | ||
"name": "@opentelemetry/exporter-jaeger", | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"description": "OpenTelemetry Exporter Jaeger allows user to send collected traces to Jaeger", | ||
@@ -10,3 +10,3 @@ "main": "build/src/index.js", | ||
"test": "nyc ts-mocha -p tsconfig.json 'test/**/*.ts'", | ||
"tdd": "yarn test -- --watch-extensions ts --watch", | ||
"tdd": "npm run test -- --watch-extensions ts --watch", | ||
"codecov": "nyc report --reporter=json && codecov -f coverage/*.json -p ../../", | ||
@@ -53,3 +53,3 @@ "clean": "rimraf build/*", | ||
"ts-node": "^8.6.2", | ||
"tslint-consistent-codestyle": "^1.15.1", | ||
"tslint-consistent-codestyle": "^1.16.0", | ||
"tslint-microsoft-contrib": "^6.2.0", | ||
@@ -59,8 +59,8 @@ "typescript": "3.7.2" | ||
"dependencies": { | ||
"@opentelemetry/base": "^0.3.3", | ||
"@opentelemetry/core": "^0.3.3", | ||
"@opentelemetry/tracing": "^0.3.3", | ||
"@opentelemetry/types": "^0.3.3", | ||
"@opentelemetry/api": "^0.4.0", | ||
"@opentelemetry/base": "^0.4.0", | ||
"@opentelemetry/core": "^0.4.0", | ||
"@opentelemetry/tracing": "^0.4.0", | ||
"jaeger-client": "^3.15.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
Network access
Supply chain riskThis module accesses the network.
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
34952
452
1
+ Added@opentelemetry/api@^0.4.0
+ Added@opentelemetry/api@0.4.0(transitive)
+ Added@opentelemetry/base@0.4.0(transitive)
+ Added@opentelemetry/core@0.4.0(transitive)
+ Added@opentelemetry/scope-base@0.4.0(transitive)
+ Added@opentelemetry/tracing@0.4.0(transitive)
- Removed@opentelemetry/types@^0.3.3
- Removed@opentelemetry/base@0.3.3(transitive)
- Removed@opentelemetry/core@0.3.3(transitive)
- Removed@opentelemetry/scope-base@0.3.3(transitive)
- Removed@opentelemetry/tracing@0.3.3(transitive)
- Removed@opentelemetry/types@0.3.3(transitive)
Updated@opentelemetry/base@^0.4.0
Updated@opentelemetry/core@^0.4.0