lightstep-tracer
Advanced tools
Comparing version 0.20.10 to 0.20.13
@@ -119,4 +119,5 @@ 'use strict'; | ||
var ts = new googleProtobufTimestampPB.Timestamp(); | ||
var secs = Math.floor(this._timestampMicros / 1000000); | ||
var nanos = this._timestampMicros % 1000000; | ||
var millis = Math.floor(this._timestampMicros / 1000); | ||
var secs = Math.floor(millis / 1000); | ||
var nanos = millis % 1000 * 1000000; | ||
ts.setSeconds(secs); | ||
@@ -123,0 +124,0 @@ ts.setNanos(nanos); |
@@ -119,2 +119,3 @@ 'use strict'; | ||
reportProto.setTimestampOffsetMicros(this._timestampOffsetMicros); | ||
reportProto.setInternalMetrics(internalMetrics); | ||
return reportProto; | ||
@@ -121,0 +122,0 @@ } |
@@ -284,2 +284,3 @@ 'use strict'; | ||
var spanContextProto = new proto.SpanContext(); | ||
spanContextProto.setTraceId(converter.hexToDec(this.traceGUID())); | ||
@@ -293,4 +294,5 @@ spanContextProto.setSpanId(converter.hexToDec(this.guid())); | ||
var startTimestamp = new googleProtobufTimestampPB.Timestamp(); | ||
var startSeconds = Math.floor(this._beginMicros / 1000000); | ||
var startNanos = this._beginMicros % 1000000; | ||
var startMillis = Math.floor(this._beginMicros / 1000); | ||
var startSeconds = Math.floor(startMillis / 1000); | ||
var startNanos = startMillis % 1000 * 1000000; | ||
startTimestamp.setSeconds(startSeconds); | ||
@@ -333,2 +335,3 @@ startTimestamp.setNanos(startNanos); | ||
} | ||
return spanProto; | ||
@@ -335,0 +338,0 @@ } |
@@ -132,6 +132,6 @@ 'use strict'; | ||
if (!_this._transport) { | ||
if (opts.transport && opts.transport === 'thrift') { | ||
if (opts.transport && opts.transport === 'proto') { | ||
_this._transport = new _platform_abstraction_layer.ProtoTransport(logger); | ||
} else { | ||
_this._transport = new _platform_abstraction_layer.ThriftTransport(logger); | ||
} else { | ||
_this._transport = new _platform_abstraction_layer.ProtoTransport(logger); | ||
} | ||
@@ -1218,3 +1218,3 @@ } | ||
_this13._debug('Report flushed for last ' + reportWindowSeconds + ' seconds', { | ||
spans_reported: report.span_records.length | ||
spans_reported: report.getSpanRecords().length | ||
}); | ||
@@ -1221,0 +1221,0 @@ } |
{ | ||
"name": "lightstep-tracer", | ||
"version": "0.20.10", | ||
"version": "0.20.13", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -95,2 +95,3 @@ # lightstep-tracer | ||
* `error_throttle_millis` `int` *optional*, *default=60000* - when `verbosity` is set to `1`, this the minimum time between logged errors. | ||
* `transport` `string` *optional*, *default=thrift* - when `transport` is set to `proto`, the Tracer will use Proto over HTTP as a transport rather than Thrift. | ||
@@ -97,0 +98,0 @@ ### SpanImp |
@@ -82,4 +82,5 @@ import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase | ||
let ts = new googleProtobufTimestampPB.Timestamp(); | ||
let secs = Math.floor(this._timestampMicros / 1000000); | ||
let nanos = this._timestampMicros % 1000000; | ||
let millis = Math.floor(this._timestampMicros / 1000); | ||
let secs = Math.floor(millis / 1000); | ||
let nanos = (millis % 1000) * 1000000; | ||
ts.setSeconds(secs); | ||
@@ -86,0 +87,0 @@ ts.setNanos(nanos); |
@@ -86,4 +86,5 @@ import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase | ||
reportProto.setTimestampOffsetMicros(this._timestampOffsetMicros); | ||
reportProto.setInternalMetrics(internalMetrics); | ||
return reportProto; | ||
} | ||
} |
@@ -212,2 +212,3 @@ import * as coerce from './coerce.js'; | ||
let spanContextProto = new proto.SpanContext(); | ||
spanContextProto.setTraceId(converter.hexToDec(this.traceGUID())); | ||
@@ -221,4 +222,5 @@ spanContextProto.setSpanId(converter.hexToDec(this.guid())); | ||
let startTimestamp = new googleProtobufTimestampPB.Timestamp(); | ||
let startSeconds = Math.floor(this._beginMicros / 1000000); | ||
let startNanos = this._beginMicros % 1000000; | ||
let startMillis = Math.floor(this._beginMicros / 1000); | ||
let startSeconds = Math.floor(startMillis / 1000); | ||
let startNanos = (startMillis % 1000) * 1000000; | ||
startTimestamp.setSeconds(startSeconds); | ||
@@ -261,4 +263,5 @@ startTimestamp.setNanos(startNanos); | ||
} | ||
return spanProto; | ||
} | ||
} |
@@ -84,6 +84,6 @@ //============================================================================// | ||
if (!this._transport) { | ||
if (opts.transport && opts.transport === 'thrift') { | ||
if (opts.transport && opts.transport === 'proto') { | ||
this._transport = new ProtoTransport(logger); | ||
} else { | ||
this._transport = new ThriftTransport(logger); | ||
} else { | ||
this._transport = new ProtoTransport(logger); | ||
} | ||
@@ -1101,3 +1101,3 @@ } | ||
this._debug(`Report flushed for last ${reportWindowSeconds} seconds`, { | ||
spans_reported : report.span_records.length, | ||
spans_reported : report.getSpanRecords().length, | ||
}); | ||
@@ -1104,0 +1104,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
118
31
4910823
179
66187