lightstep-tracer
Advanced tools
Comparing version 0.31.2 to 0.32.0-no-protobuf
@@ -7,2 +7,6 @@ # CHANGELOG | ||
## 0.32.0 | ||
* Add missing OpenTracing spancontext methods (#279) | ||
* Update ws and normalize-url dependencies. | ||
## 0.31.2 | ||
@@ -9,0 +13,0 @@ * Update to thrift v0.14.1 |
@@ -57,4 +57,3 @@ | ||
/** | ||
* optional, specifies the transport method used for communication to the Satellite. default = proto. | ||
* `proto` - use protobuf over HTTP(S) | ||
* optional, specifies the transport method used for communication to the Satellite. default = thrift. | ||
* `thrift` - use thrift | ||
@@ -61,0 +60,0 @@ */ |
@@ -14,4 +14,2 @@ 'use strict'; | ||
var proto = require('./generated_proto/collector_pb.js'); | ||
var AuthImp = function () { | ||
@@ -40,9 +38,2 @@ function AuthImp(accessToken) { | ||
} | ||
}, { | ||
key: 'toProto', | ||
value: function toProto() { | ||
var authProto = new proto.Auth(); | ||
authProto.setAccessToken(this._accessToken); | ||
return authProto; | ||
} | ||
}]); | ||
@@ -49,0 +40,0 @@ |
@@ -27,5 +27,2 @@ 'use strict'; | ||
// eslint-disable-line camelcase | ||
var googleProtobufTimestampPB = require('google-protobuf/google/protobuf/timestamp_pb.js'); | ||
var proto = require('./generated_proto/collector_pb.js'); | ||
var LogRecordImp = function () { | ||
@@ -126,33 +123,2 @@ function LogRecordImp(logFieldKeyHardLimit, logFieldValueHardLimit, timestampMicros, fields) { | ||
} | ||
}, { | ||
key: 'toProto', | ||
value: function toProto() { | ||
var _this2 = this; | ||
this._clearOverLimits(); | ||
var log = new proto.Log(); | ||
var ts = new googleProtobufTimestampPB.Timestamp(); | ||
var secs = Math.floor(this._timestampMicros / 1000000); | ||
var nanos = this._timestampMicros % 1000000 * 1000; | ||
ts.setSeconds(secs); | ||
ts.setNanos(nanos); | ||
log.setTimestamp(ts); | ||
var keyValues = []; | ||
(0, _each3.default)(this._fields, function (value, key) { | ||
if (!key || !value) { | ||
return; | ||
} | ||
var keyStr = _this2.getFieldKey(key); | ||
var valStr = _this2.getFieldValue(value); | ||
var keyValue = new proto.KeyValue(); | ||
keyValue.setKey(keyStr); | ||
keyValue.setStringValue(valStr); | ||
keyValues.push(keyValue); | ||
}); | ||
log.setFieldsList(keyValues); | ||
return log; | ||
} | ||
}]); | ||
@@ -159,0 +125,0 @@ |
@@ -27,4 +27,2 @@ 'use strict'; | ||
var proto = require('./generated_proto/collector_pb'); | ||
var ReportImp = function () { | ||
@@ -95,30 +93,2 @@ function ReportImp(runtime, oldestMicros, youngestMicros, spanRecords, internalLogs, counters, timestampOffsetMicros) { | ||
} | ||
}, { | ||
key: 'toProto', | ||
value: function toProto(auth) { | ||
var spansList = []; | ||
(0, _each3.default)(this._spanRecords, function (spanRecord) { | ||
spansList.push(spanRecord._toProto()); | ||
}); | ||
var countsList = []; | ||
(0, _each3.default)(this._counters, function (count) { | ||
var metricSample = new proto.MetricsSample(); | ||
metricSample.setName(count.name); | ||
metricSample.setIntValue(count.int64_value); | ||
metricSample.setDoubleValue(count.double_value); | ||
countsList.push(metricSample); | ||
}); | ||
var internalMetrics = new proto.InternalMetrics(); | ||
internalMetrics.setCountsList(countsList); | ||
var reportProto = new proto.ReportRequest(); | ||
reportProto.setAuth(auth.toProto()); | ||
reportProto.setReporter(this._runtime.toProto()); | ||
reportProto.setSpansList(spansList); | ||
reportProto.setTimestampOffsetMicros(this._timestampOffsetMicros.toString(10)); | ||
reportProto.setInternalMetrics(internalMetrics); | ||
return reportProto; | ||
} | ||
}]); | ||
@@ -125,0 +95,0 @@ |
@@ -21,6 +21,2 @@ 'use strict'; | ||
var _util = require('./util/util'); | ||
var _util2 = _interopRequireDefault(_util); | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | ||
@@ -32,5 +28,2 @@ | ||
var proto = require('./generated_proto/collector_pb'); | ||
var packageObject = require('../../package.json'); | ||
var RuntimeImp = function () { | ||
@@ -66,48 +59,2 @@ function RuntimeImp(runtimeGUID, startMicros, componentName, attributes) { | ||
} | ||
}, { | ||
key: 'toProto', | ||
value: function toProto() { | ||
var tracerVersion = new proto.KeyValue(); | ||
tracerVersion.setKey('lightstep.tracer_version'); | ||
tracerVersion.setStringValue(packageObject.version); | ||
var tracerPlatform = new proto.KeyValue(); | ||
tracerPlatform.setKey('lightstep.tracer_platform'); | ||
tracerPlatform.setStringValue(this._attributes['lightstep.tracer_platform']); | ||
var tracerPlatformVersion = new proto.KeyValue(); | ||
tracerPlatformVersion.setKey('lightstep.tracer_platform_version'); | ||
tracerPlatformVersion.setStringValue(this._attributes['lightstep.tracer_platform_version']); | ||
var componentName = new proto.KeyValue(); | ||
componentName.setKey('lightstep.component_name'); | ||
componentName.setStringValue(this._componentName); | ||
var commandLine = new proto.KeyValue(); | ||
commandLine.setKey('lightstep.command_line'); | ||
commandLine.setStringValue(this._attributes['lightstep.command_line']); | ||
var hostname = new proto.KeyValue(); | ||
hostname.setKey('lightstep.hostname'); | ||
hostname.setStringValue(this._attributes['lightstep.hostname']); | ||
var reporterId = _util2.default.hexToDec(this._runtimeGUID); | ||
var tracerTags = []; | ||
(0, _each3.default)(this._attributes, function (val, key) { | ||
var ttag = new proto.KeyValue(); | ||
ttag.setKey(key); | ||
ttag.setStringValue(val); | ||
tracerTags.push(ttag); | ||
}); | ||
var reporterTags = [tracerVersion, tracerPlatform, componentName, commandLine, hostname, tracerPlatformVersion]; | ||
var allTags = reporterTags.concat(tracerTags); | ||
var reporterProto = new proto.Reporter(); | ||
reporterProto.setReporterId(reporterId); | ||
reporterProto.setTagsList(allTags); | ||
return reporterProto; | ||
} | ||
}]); | ||
@@ -114,0 +61,0 @@ |
@@ -33,2 +33,12 @@ 'use strict'; | ||
} | ||
}, { | ||
key: 'toTraceId', | ||
value: function toTraceId() { | ||
return this._traceGUID; | ||
} | ||
}, { | ||
key: 'toSpanId', | ||
value: function toSpanId() { | ||
return this._guid; | ||
} | ||
@@ -35,0 +45,0 @@ // ---------------------------------------------------------------------- // |
@@ -51,5 +51,2 @@ 'use strict'; | ||
var googleProtobufTimestampPB = require('google-protobuf/google/protobuf/timestamp_pb'); | ||
var proto = require('./generated_proto/collector_pb'); | ||
var SpanImp = function (_opentracing$Span) { | ||
@@ -302,59 +299,2 @@ _inherits(SpanImp, _opentracing$Span); | ||
} | ||
}, { | ||
key: '_toProto', | ||
value: function _toProto() { | ||
var _this3 = this; | ||
var spanContextProto = new proto.SpanContext(); | ||
spanContextProto.setTraceId(_util2.default.hexToDec(this.traceGUID())); | ||
spanContextProto.setSpanId(_util2.default.hexToDec(this.guid())); | ||
var spanProto = new proto.Span(); | ||
spanProto.setSpanContext(spanContextProto); | ||
spanProto.setOperationName(this._operationName); | ||
var startTimestamp = new googleProtobufTimestampPB.Timestamp(); | ||
var startSeconds = Math.floor(this._beginMicros / 1000000); | ||
var startNanos = this._beginMicros % 1000000 * 1000; | ||
startTimestamp.setSeconds(startSeconds); | ||
startTimestamp.setNanos(startNanos); | ||
spanProto.setStartTimestamp(startTimestamp); | ||
spanProto.setDurationMicros((this._endMicros - this._beginMicros).toString()); | ||
var logs = []; | ||
(0, _each3.default)(this._log_records, function (logRecord) { | ||
var logProto = logRecord.toProto(); | ||
_this3._tracerImp._counters['logs.keys.over_limit'] += logRecord.getNumKeysOverLimit(); | ||
_this3._tracerImp._counters['logs.values.over_limit'] += logRecord.getNumValuesOverLimit(); | ||
logs.push(logProto); | ||
}); | ||
spanProto.setLogsList(logs); | ||
var parentSpanGUID = void 0; | ||
var tags = []; | ||
(0, _each3.default)(this._tags, function (value, key) { | ||
var strValue = coerce.toString(value); | ||
var strKey = coerce.toString(key); | ||
var tag = new proto.KeyValue(); | ||
if (strKey === 'parent_span_guid') { | ||
parentSpanGUID = strValue; | ||
} | ||
tag.setKey(strKey); | ||
tag.setStringValue(strValue); | ||
tags.push(tag); | ||
}); | ||
spanProto.setTagsList(tags); | ||
if (parentSpanGUID !== undefined) { | ||
var ref = new proto.Reference(); | ||
ref.setRelationship(proto.Reference.Relationship.CHILD_OF); | ||
var parentSpanContext = new proto.SpanContext(); | ||
parentSpanContext.setSpanId(_util2.default.hexToDec(parentSpanGUID)); | ||
ref.setSpanContext(parentSpanContext); | ||
spanProto.setReferencesList([ref]); | ||
} | ||
return spanProto; | ||
} | ||
}]); | ||
@@ -361,0 +301,0 @@ |
@@ -198,6 +198,2 @@ 'use strict'; | ||
switch (_this._options.transport) { | ||
case 'proto': | ||
_this._transport = new _platform_abstraction_layer.ProtoTransport(logger); | ||
_this._info('Using protobuf over HTTP transport per user-defined option.'); | ||
break; | ||
case 'thrift': | ||
@@ -208,4 +204,4 @@ _this._transport = new _platform_abstraction_layer.ThriftTransport(logger); | ||
default: | ||
_this._transport = new _platform_abstraction_layer.ProtoTransport(logger); | ||
_this._info('Using protobuf over HTTP transport as no user-defined option was supplied.'); | ||
_this._transport = new _platform_abstraction_layer.ThriftTransport(logger); | ||
_this._info('Using thrift transport per user-defined option.'); | ||
} | ||
@@ -286,3 +282,3 @@ } | ||
this.addOption('disable_clock_skew_correction', { type: 'bool', defaultValue: false }); | ||
this.addOption('transport', { type: 'string', defaultValue: 'proto' }); | ||
this.addOption('transport', { type: 'string', defaultValue: 'thrift' }); | ||
@@ -289,0 +285,0 @@ // Non-standard, may be deprecated |
@@ -12,6 +12,4 @@ 'use strict'; | ||
ThriftTransport: require('./imp/platform/browser/transport_httpthrift.js'), | ||
ProtoTransport: require('./imp/platform/browser/transport_httpproto.js'), | ||
thrift: require('./imp/platform/browser/thrift.js'), | ||
crouton_thrift: require('./imp/platform/browser/crouton_thrift.js'), | ||
proto: require('./imp/generated_proto/collector_pb.js') | ||
crouton_thrift: require('./imp/platform/browser/crouton_thrift.js') | ||
}; | ||
@@ -22,8 +20,6 @@ } else { | ||
ThriftTransport: require('./imp/platform/node/transport_httpthrift.js'), | ||
ProtoTransport: require('./imp/platform/node/transport_httpproto.js'), | ||
// Note: THRIFT-5029 requires us to use a non-standard require | ||
// TODO: remove non-standard require after https://github.com/apache/thrift/pull/1947 merges | ||
thrift: require('thrift/lib/nodejs/lib/thrift'), | ||
crouton_thrift: require('./imp/platform/node/crouton_thrift.js'), | ||
proto: require('./imp/generated_proto/collector_pb.js') | ||
crouton_thrift: require('./imp/platform/node/crouton_thrift.js') | ||
}; | ||
@@ -30,0 +26,0 @@ } |
{ | ||
"name": "lightstep-tracer", | ||
"version": "0.31.2", | ||
"version": "0.32.0-no-protobuf", | ||
"main": "index.js", | ||
@@ -24,3 +24,2 @@ "types": "index.d.ts", | ||
"eventemitter3": "1.1.1", | ||
"google-protobuf": "3.6.1", | ||
"hex2dec": "1.0.1", | ||
@@ -27,0 +26,0 @@ "opentracing": "^0.14.4", |
@@ -161,5 +161,4 @@ # lightstep-tracer | ||
### Release process using circleCI | ||
1. Run command | ||
1. Run command (patch, minor, major) | ||
```commandline | ||
@@ -169,3 +168,10 @@ make release RELEASE_TYPE=patch | ||
### Release process using circleCI with custom version | ||
1. Run command | ||
```commandline | ||
make release RELEASE_TYPE=v3.2.1-no-protobuf | ||
``` | ||
2. It will create a tag "v3.2.1-no-protobuf" for version "3.2.1" | ||
## License | ||
@@ -172,0 +178,0 @@ |
// eslint-disable-next-line camelcase | ||
import { crouton_thrift } from '../platform_abstraction_layer'; | ||
let proto = require('./generated_proto/collector_pb.js'); | ||
export default class AuthImp { | ||
@@ -24,8 +22,2 @@ constructor(accessToken) { | ||
} | ||
toProto() { | ||
let authProto = new proto.Auth(); | ||
authProto.setAccessToken(this._accessToken); | ||
return authProto; | ||
} | ||
} |
@@ -5,5 +5,2 @@ import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase | ||
// eslint-disable-line camelcase | ||
let googleProtobufTimestampPB = require('google-protobuf/google/protobuf/timestamp_pb.js'); | ||
let proto = require('./generated_proto/collector_pb.js'); | ||
export default class LogRecordImp { | ||
@@ -93,30 +90,2 @@ constructor(logFieldKeyHardLimit, logFieldValueHardLimit, timestampMicros, fields) { | ||
} | ||
toProto() { | ||
this._clearOverLimits(); | ||
let log = new proto.Log(); | ||
let ts = new googleProtobufTimestampPB.Timestamp(); | ||
let secs = Math.floor(this._timestampMicros / 1000000); | ||
let nanos = (this._timestampMicros % 1000000) * 1000; | ||
ts.setSeconds(secs); | ||
ts.setNanos(nanos); | ||
log.setTimestamp(ts); | ||
let keyValues = []; | ||
_each(this._fields, (value, key) => { | ||
if (!key || !value) { | ||
return; | ||
} | ||
let keyStr = this.getFieldKey(key); | ||
let valStr = this.getFieldValue(value); | ||
let keyValue = new proto.KeyValue(); | ||
keyValue.setKey(keyStr); | ||
keyValue.setStringValue(valStr); | ||
keyValues.push(keyValue); | ||
}); | ||
log.setFieldsList(keyValues); | ||
return log; | ||
} | ||
} |
@@ -5,4 +5,2 @@ import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase | ||
let proto = require('./generated_proto/collector_pb'); | ||
export default class ReportImp { | ||
@@ -64,29 +62,2 @@ constructor(runtime, oldestMicros, youngestMicros, spanRecords, internalLogs, counters, timestampOffsetMicros) { | ||
} | ||
toProto(auth) { | ||
let spansList = []; | ||
_each(this._spanRecords, (spanRecord) => { | ||
spansList.push(spanRecord._toProto()); | ||
}); | ||
let countsList = []; | ||
_each(this._counters, (count) => { | ||
let metricSample = new proto.MetricsSample(); | ||
metricSample.setName(count.name); | ||
metricSample.setIntValue(count.int64_value); | ||
metricSample.setDoubleValue(count.double_value); | ||
countsList.push(metricSample); | ||
}); | ||
let internalMetrics = new proto.InternalMetrics(); | ||
internalMetrics.setCountsList(countsList); | ||
let reportProto = new proto.ReportRequest(); | ||
reportProto.setAuth(auth.toProto()); | ||
reportProto.setReporter(this._runtime.toProto()); | ||
reportProto.setSpansList(spansList); | ||
reportProto.setTimestampOffsetMicros(this._timestampOffsetMicros.toString(10)); | ||
reportProto.setInternalMetrics(internalMetrics); | ||
return reportProto; | ||
} | ||
} |
import { crouton_thrift } from '../platform_abstraction_layer'; // eslint-disable-line camelcase | ||
import _each from '../_each'; // eslint-disable-line camelcase | ||
import * as coerce from './coerce'; | ||
import util from './util/util'; | ||
let proto = require('./generated_proto/collector_pb'); | ||
const packageObject = require('../../package.json'); | ||
export default class RuntimeImp { | ||
@@ -35,47 +31,2 @@ constructor(runtimeGUID, startMicros, componentName, attributes) { | ||
} | ||
toProto() { | ||
let tracerVersion = new proto.KeyValue(); | ||
tracerVersion.setKey('lightstep.tracer_version'); | ||
tracerVersion.setStringValue(packageObject.version); | ||
let tracerPlatform = new proto.KeyValue(); | ||
tracerPlatform.setKey('lightstep.tracer_platform'); | ||
tracerPlatform.setStringValue(this._attributes['lightstep.tracer_platform']); | ||
let tracerPlatformVersion = new proto.KeyValue(); | ||
tracerPlatformVersion.setKey('lightstep.tracer_platform_version'); | ||
tracerPlatformVersion.setStringValue(this._attributes['lightstep.tracer_platform_version']); | ||
let componentName = new proto.KeyValue(); | ||
componentName.setKey('lightstep.component_name'); | ||
componentName.setStringValue(this._componentName); | ||
let commandLine = new proto.KeyValue(); | ||
commandLine.setKey('lightstep.command_line'); | ||
commandLine.setStringValue(this._attributes['lightstep.command_line']); | ||
let hostname = new proto.KeyValue(); | ||
hostname.setKey('lightstep.hostname'); | ||
hostname.setStringValue(this._attributes['lightstep.hostname']); | ||
let reporterId = util.hexToDec(this._runtimeGUID); | ||
let tracerTags = []; | ||
_each(this._attributes, (val, key) => { | ||
let ttag = new proto.KeyValue(); | ||
ttag.setKey(key); | ||
ttag.setStringValue(val); | ||
tracerTags.push(ttag); | ||
}); | ||
let reporterTags = [tracerVersion, tracerPlatform, componentName, commandLine, hostname, tracerPlatformVersion]; | ||
let allTags = reporterTags.concat(tracerTags); | ||
let reporterProto = new proto.Reporter(); | ||
reporterProto.setReporterId(reporterId); | ||
reporterProto.setTagsList(allTags); | ||
return reporterProto; | ||
} | ||
} |
@@ -16,2 +16,10 @@ import _each from '../_each'; | ||
toTraceId() { | ||
return this._traceGUID; | ||
} | ||
toSpanId() { | ||
return this._guid; | ||
} | ||
// ---------------------------------------------------------------------- // | ||
@@ -18,0 +26,0 @@ // LightStep Extensions |
@@ -9,5 +9,2 @@ import * as opentracing from 'opentracing'; | ||
let googleProtobufTimestampPB = require('google-protobuf/google/protobuf/timestamp_pb'); | ||
let proto = require('./generated_proto/collector_pb'); | ||
export default class SpanImp extends opentracing.Span { | ||
@@ -230,56 +227,2 @@ // ---------------------------------------------------------------------- // | ||
} | ||
_toProto() { | ||
let spanContextProto = new proto.SpanContext(); | ||
spanContextProto.setTraceId(util.hexToDec(this.traceGUID())); | ||
spanContextProto.setSpanId(util.hexToDec(this.guid())); | ||
let spanProto = new proto.Span(); | ||
spanProto.setSpanContext(spanContextProto); | ||
spanProto.setOperationName(this._operationName); | ||
let startTimestamp = new googleProtobufTimestampPB.Timestamp(); | ||
let startSeconds = Math.floor(this._beginMicros / 1000000); | ||
let startNanos = (this._beginMicros % 1000000) * 1000; | ||
startTimestamp.setSeconds(startSeconds); | ||
startTimestamp.setNanos(startNanos); | ||
spanProto.setStartTimestamp(startTimestamp); | ||
spanProto.setDurationMicros((this._endMicros - this._beginMicros).toString()); | ||
let logs = []; | ||
_each(this._log_records, (logRecord) => { | ||
let logProto = logRecord.toProto(); | ||
this._tracerImp._counters['logs.keys.over_limit'] += logRecord.getNumKeysOverLimit(); | ||
this._tracerImp._counters['logs.values.over_limit'] += logRecord.getNumValuesOverLimit(); | ||
logs.push(logProto); | ||
}); | ||
spanProto.setLogsList(logs); | ||
let parentSpanGUID; | ||
let tags = []; | ||
_each(this._tags, (value, key) => { | ||
let strValue = coerce.toString(value); | ||
let strKey = coerce.toString(key); | ||
let tag = new proto.KeyValue(); | ||
if (strKey === 'parent_span_guid') { | ||
parentSpanGUID = strValue; | ||
} | ||
tag.setKey(strKey); | ||
tag.setStringValue(strValue); | ||
tags.push(tag); | ||
}); | ||
spanProto.setTagsList(tags); | ||
if (parentSpanGUID !== undefined) { | ||
let ref = new proto.Reference(); | ||
ref.setRelationship(proto.Reference.Relationship.CHILD_OF); | ||
let parentSpanContext = new proto.SpanContext(); | ||
parentSpanContext.setSpanId(util.hexToDec(parentSpanGUID)); | ||
ref.setSpanContext(parentSpanContext); | ||
spanProto.setReferencesList([ref]); | ||
} | ||
return spanProto; | ||
} | ||
} |
@@ -11,3 +11,3 @@ //============================================================================// | ||
import _each from '../_each'; | ||
import { Platform, ProtoTransport, ThriftTransport } from '../platform_abstraction_layer'; | ||
import { Platform, ThriftTransport } from '../platform_abstraction_layer'; | ||
import AuthImp from './auth_imp'; | ||
@@ -143,6 +143,2 @@ import RuntimeImp from './runtime_imp'; | ||
switch (this._options.transport) { | ||
case 'proto': | ||
this._transport = new ProtoTransport(logger); | ||
this._info('Using protobuf over HTTP transport per user-defined option.'); | ||
break; | ||
case 'thrift': | ||
@@ -153,4 +149,4 @@ this._transport = new ThriftTransport(logger); | ||
default: | ||
this._transport = new ProtoTransport(logger); | ||
this._info('Using protobuf over HTTP transport as no user-defined option was supplied.'); | ||
this._transport = new ThriftTransport(logger); | ||
this._info('Using thrift transport per user-defined option.'); | ||
} | ||
@@ -241,3 +237,3 @@ } | ||
this.addOption('disable_clock_skew_correction', { type: 'bool', defaultValue: false }); | ||
this.addOption('transport', { type: 'string', defaultValue: 'proto' }); | ||
this.addOption('transport', { type: 'string', defaultValue: 'thrift' }); | ||
@@ -244,0 +240,0 @@ // Non-standard, may be deprecated |
@@ -10,6 +10,4 @@ /* global PLATFORM_BROWSER */ | ||
ThriftTransport : require('./imp/platform/browser/transport_httpthrift.js'), | ||
ProtoTransport : require('./imp/platform/browser/transport_httpproto.js'), | ||
thrift : require('./imp/platform/browser/thrift.js'), | ||
crouton_thrift : require('./imp/platform/browser/crouton_thrift.js'), | ||
proto : require('./imp/generated_proto/collector_pb.js'), | ||
}; | ||
@@ -20,3 +18,2 @@ } else { | ||
ThriftTransport : require('./imp/platform/node/transport_httpthrift.js'), | ||
ProtoTransport : require('./imp/platform/node/transport_httpproto.js'), | ||
// Note: THRIFT-5029 requires us to use a non-standard require | ||
@@ -26,4 +23,3 @@ // TODO: remove non-standard require after https://github.com/apache/thrift/pull/1947 merges | ||
crouton_thrift : require('./imp/platform/node/crouton_thrift.js'), | ||
proto : require('./imp/generated_proto/collector_pb.js'), | ||
}; | ||
} |
@@ -21,2 +21,22 @@ describe("SpanContext", function() { | ||
}); | ||
describe("SpanContext#toTraceId", function() { | ||
it('is a method', function() { | ||
var span = Tracer.startSpan('test'); | ||
var spanContext = span.context(); | ||
span.finish(); | ||
expect(spanContext.toSpanId).to.be.a("function"); | ||
}); | ||
}); | ||
describe("SpanContext#toSpanId", function() { | ||
it('is a method', function() { | ||
var span = Tracer.startSpan('test'); | ||
var spanContext = span.context(); | ||
span.finish(); | ||
expect(spanContext.toTraceId).to.be.a("function"); | ||
}); | ||
}); | ||
}); |
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 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
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
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
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
6
180
28
2719195
190
45494
33
- Removedgoogle-protobuf@3.6.1
- Removedgoogle-protobuf@3.6.1(transitive)