lightstep-tracer
Version:
> ❗ **This instrumentation is no longer recommended**. Please review [documentation on setting up and configuring the OpenTelemetry Node.js Launcher](https://github.com/lightstep/otel-launcher-node) or [OpenTelemetry JS (Browser)](https://github.com/open-
1,716 lines (1,685 loc) • 47 kB
JavaScript
//
// GENERATED FILE - DO NOT EDIT DIRECTLY
//
// See scripts/build_browser_thrift_lib.js
//
//
(function() {
var Thrift = {};
var crouton_thrift = {};
//
// Autogenerated by Thrift Compiler (0.9.2)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
if (typeof crouton_thrift === 'undefined') {
crouton_thrift = {};
}
crouton_thrift.KeyValue = function(args) {
this.Key = null;
this.Value = null;
if (args) {
if (args.Key !== undefined) {
this.Key = args.Key;
} else {
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field Key is unset!');
}
if (args.Value !== undefined) {
this.Value = args.Value;
} else {
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field Value is unset!');
}
}
};
crouton_thrift.KeyValue.prototype = {};
crouton_thrift.KeyValue.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRING) {
this.Key = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.Value = input.readString().value;
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.KeyValue.prototype.write = false && function(output) {
output.writeStructBegin('KeyValue');
if (this.Key !== null && this.Key !== undefined) {
output.writeFieldBegin('Key', Thrift.Type.STRING, 1);
output.writeString(this.Key);
output.writeFieldEnd();
}
if (this.Value !== null && this.Value !== undefined) {
output.writeFieldBegin('Value', Thrift.Type.STRING, 2);
output.writeString(this.Value);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.NamedCounter = function(args) {
this.Name = null;
this.Value = null;
if (args) {
if (args.Name !== undefined) {
this.Name = args.Name;
} else {
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field Name is unset!');
}
if (args.Value !== undefined) {
this.Value = args.Value;
} else {
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field Value is unset!');
}
}
};
crouton_thrift.NamedCounter.prototype = {};
crouton_thrift.NamedCounter.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRING) {
this.Name = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I64) {
this.Value = input.readI64().value;
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.NamedCounter.prototype.write = false && function(output) {
output.writeStructBegin('NamedCounter');
if (this.Name !== null && this.Name !== undefined) {
output.writeFieldBegin('Name', Thrift.Type.STRING, 1);
output.writeString(this.Name);
output.writeFieldEnd();
}
if (this.Value !== null && this.Value !== undefined) {
output.writeFieldBegin('Value', Thrift.Type.I64, 2);
output.writeI64(this.Value);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.Runtime = function(args) {
this.guid = null;
this.start_micros = null;
this.group_name = null;
this.attrs = null;
if (args) {
if (args.guid !== undefined) {
this.guid = args.guid;
}
if (args.start_micros !== undefined) {
this.start_micros = args.start_micros;
}
if (args.group_name !== undefined) {
this.group_name = args.group_name;
}
if (args.attrs !== undefined) {
this.attrs = args.attrs;
}
}
};
crouton_thrift.Runtime.prototype = {};
crouton_thrift.Runtime.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRING) {
this.guid = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I64) {
this.start_micros = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.group_name = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.LIST) {
var _size0 = 0;
var _rtmp34;
this.attrs = [];
var _etype3 = 0;
_rtmp34 = input.readListBegin();
_etype3 = _rtmp34.etype;
_size0 = _rtmp34.size;
for (var _i5 = 0; _i5 < _size0; ++_i5)
{
var elem6 = null;
elem6 = new crouton_thrift.KeyValue();
elem6.read(input);
this.attrs.push(elem6);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.Runtime.prototype.write = false && function(output) {
output.writeStructBegin('Runtime');
if (this.guid !== null && this.guid !== undefined) {
output.writeFieldBegin('guid', Thrift.Type.STRING, 1);
output.writeString(this.guid);
output.writeFieldEnd();
}
if (this.start_micros !== null && this.start_micros !== undefined) {
output.writeFieldBegin('start_micros', Thrift.Type.I64, 2);
output.writeI64(this.start_micros);
output.writeFieldEnd();
}
if (this.group_name !== null && this.group_name !== undefined) {
output.writeFieldBegin('group_name', Thrift.Type.STRING, 3);
output.writeString(this.group_name);
output.writeFieldEnd();
}
if (this.attrs !== null && this.attrs !== undefined) {
output.writeFieldBegin('attrs', Thrift.Type.LIST, 4);
output.writeListBegin(Thrift.Type.STRUCT, this.attrs.length);
for (var iter7 in this.attrs)
{
if (this.attrs.hasOwnProperty(iter7))
{
iter7 = this.attrs[iter7];
iter7.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.LogRecord = function(args) {
this.timestamp_micros = null;
this.fields = null;
this.runtime_guid = null;
this.span_guid = null;
this.stable_name = null;
this.message = null;
this.level = null;
this.thread_id = null;
this.filename = null;
this.line_number = null;
this.stack_frames = null;
this.payload_json = null;
this.error_flag = null;
if (args) {
if (args.timestamp_micros !== undefined) {
this.timestamp_micros = args.timestamp_micros;
}
if (args.fields !== undefined) {
this.fields = args.fields;
}
if (args.runtime_guid !== undefined) {
this.runtime_guid = args.runtime_guid;
}
if (args.span_guid !== undefined) {
this.span_guid = args.span_guid;
}
if (args.stable_name !== undefined) {
this.stable_name = args.stable_name;
}
if (args.message !== undefined) {
this.message = args.message;
}
if (args.level !== undefined) {
this.level = args.level;
}
if (args.thread_id !== undefined) {
this.thread_id = args.thread_id;
}
if (args.filename !== undefined) {
this.filename = args.filename;
}
if (args.line_number !== undefined) {
this.line_number = args.line_number;
}
if (args.stack_frames !== undefined) {
this.stack_frames = args.stack_frames;
}
if (args.payload_json !== undefined) {
this.payload_json = args.payload_json;
}
if (args.error_flag !== undefined) {
this.error_flag = args.error_flag;
}
}
};
crouton_thrift.LogRecord.prototype = {};
crouton_thrift.LogRecord.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.I64) {
this.timestamp_micros = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 13:
if (ftype == Thrift.Type.LIST) {
var _size8 = 0;
var _rtmp312;
this.fields = [];
var _etype11 = 0;
_rtmp312 = input.readListBegin();
_etype11 = _rtmp312.etype;
_size8 = _rtmp312.size;
for (var _i13 = 0; _i13 < _size8; ++_i13)
{
var elem14 = null;
elem14 = new crouton_thrift.KeyValue();
elem14.read(input);
this.fields.push(elem14);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.runtime_guid = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.span_guid = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.STRING) {
this.stable_name = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.STRING) {
this.message = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 6:
if (ftype == Thrift.Type.STRING) {
this.level = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 7:
if (ftype == Thrift.Type.I64) {
this.thread_id = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 8:
if (ftype == Thrift.Type.STRING) {
this.filename = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 9:
if (ftype == Thrift.Type.I64) {
this.line_number = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 10:
if (ftype == Thrift.Type.LIST) {
var _size15 = 0;
var _rtmp319;
this.stack_frames = [];
var _etype18 = 0;
_rtmp319 = input.readListBegin();
_etype18 = _rtmp319.etype;
_size15 = _rtmp319.size;
for (var _i20 = 0; _i20 < _size15; ++_i20)
{
var elem21 = null;
elem21 = input.readString().value;
this.stack_frames.push(elem21);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 11:
if (ftype == Thrift.Type.STRING) {
this.payload_json = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 12:
if (ftype == Thrift.Type.BOOL) {
this.error_flag = input.readBool().value;
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.LogRecord.prototype.write = false && function(output) {
output.writeStructBegin('LogRecord');
if (this.timestamp_micros !== null && this.timestamp_micros !== undefined) {
output.writeFieldBegin('timestamp_micros', Thrift.Type.I64, 1);
output.writeI64(this.timestamp_micros);
output.writeFieldEnd();
}
if (this.fields !== null && this.fields !== undefined) {
output.writeFieldBegin('fields', Thrift.Type.LIST, 13);
output.writeListBegin(Thrift.Type.STRUCT, this.fields.length);
for (var iter22 in this.fields)
{
if (this.fields.hasOwnProperty(iter22))
{
iter22 = this.fields[iter22];
iter22.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.runtime_guid !== null && this.runtime_guid !== undefined) {
output.writeFieldBegin('runtime_guid', Thrift.Type.STRING, 2);
output.writeString(this.runtime_guid);
output.writeFieldEnd();
}
if (this.span_guid !== null && this.span_guid !== undefined) {
output.writeFieldBegin('span_guid', Thrift.Type.STRING, 3);
output.writeString(this.span_guid);
output.writeFieldEnd();
}
if (this.stable_name !== null && this.stable_name !== undefined) {
output.writeFieldBegin('stable_name', Thrift.Type.STRING, 4);
output.writeString(this.stable_name);
output.writeFieldEnd();
}
if (this.message !== null && this.message !== undefined) {
output.writeFieldBegin('message', Thrift.Type.STRING, 5);
output.writeString(this.message);
output.writeFieldEnd();
}
if (this.level !== null && this.level !== undefined) {
output.writeFieldBegin('level', Thrift.Type.STRING, 6);
output.writeString(this.level);
output.writeFieldEnd();
}
if (this.thread_id !== null && this.thread_id !== undefined) {
output.writeFieldBegin('thread_id', Thrift.Type.I64, 7);
output.writeI64(this.thread_id);
output.writeFieldEnd();
}
if (this.filename !== null && this.filename !== undefined) {
output.writeFieldBegin('filename', Thrift.Type.STRING, 8);
output.writeString(this.filename);
output.writeFieldEnd();
}
if (this.line_number !== null && this.line_number !== undefined) {
output.writeFieldBegin('line_number', Thrift.Type.I64, 9);
output.writeI64(this.line_number);
output.writeFieldEnd();
}
if (this.stack_frames !== null && this.stack_frames !== undefined) {
output.writeFieldBegin('stack_frames', Thrift.Type.LIST, 10);
output.writeListBegin(Thrift.Type.STRING, this.stack_frames.length);
for (var iter23 in this.stack_frames)
{
if (this.stack_frames.hasOwnProperty(iter23))
{
iter23 = this.stack_frames[iter23];
output.writeString(iter23);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.payload_json !== null && this.payload_json !== undefined) {
output.writeFieldBegin('payload_json', Thrift.Type.STRING, 11);
output.writeString(this.payload_json);
output.writeFieldEnd();
}
if (this.error_flag !== null && this.error_flag !== undefined) {
output.writeFieldBegin('error_flag', Thrift.Type.BOOL, 12);
output.writeBool(this.error_flag);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.TraceJoinId = function(args) {
this.TraceKey = null;
this.Value = null;
if (args) {
if (args.TraceKey !== undefined) {
this.TraceKey = args.TraceKey;
} else {
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field TraceKey is unset!');
}
if (args.Value !== undefined) {
this.Value = args.Value;
} else {
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field Value is unset!');
}
}
};
crouton_thrift.TraceJoinId.prototype = {};
crouton_thrift.TraceJoinId.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRING) {
this.TraceKey = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.Value = input.readString().value;
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.TraceJoinId.prototype.write = false && function(output) {
output.writeStructBegin('TraceJoinId');
if (this.TraceKey !== null && this.TraceKey !== undefined) {
output.writeFieldBegin('TraceKey', Thrift.Type.STRING, 1);
output.writeString(this.TraceKey);
output.writeFieldEnd();
}
if (this.Value !== null && this.Value !== undefined) {
output.writeFieldBegin('Value', Thrift.Type.STRING, 2);
output.writeString(this.Value);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.SpanRecord = function(args) {
this.span_guid = null;
this.trace_guid = null;
this.runtime_guid = null;
this.span_name = null;
this.join_ids = null;
this.oldest_micros = null;
this.youngest_micros = null;
this.attributes = null;
this.error_flag = null;
this.log_records = null;
if (args) {
if (args.span_guid !== undefined) {
this.span_guid = args.span_guid;
}
if (args.trace_guid !== undefined) {
this.trace_guid = args.trace_guid;
}
if (args.runtime_guid !== undefined) {
this.runtime_guid = args.runtime_guid;
}
if (args.span_name !== undefined) {
this.span_name = args.span_name;
}
if (args.join_ids !== undefined) {
this.join_ids = args.join_ids;
}
if (args.oldest_micros !== undefined) {
this.oldest_micros = args.oldest_micros;
}
if (args.youngest_micros !== undefined) {
this.youngest_micros = args.youngest_micros;
}
if (args.attributes !== undefined) {
this.attributes = args.attributes;
}
if (args.error_flag !== undefined) {
this.error_flag = args.error_flag;
}
if (args.log_records !== undefined) {
this.log_records = args.log_records;
}
}
};
crouton_thrift.SpanRecord.prototype = {};
crouton_thrift.SpanRecord.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRING) {
this.span_guid = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 11:
if (ftype == Thrift.Type.STRING) {
this.trace_guid = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRING) {
this.runtime_guid = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.STRING) {
this.span_name = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.LIST) {
var _size24 = 0;
var _rtmp328;
this.join_ids = [];
var _etype27 = 0;
_rtmp328 = input.readListBegin();
_etype27 = _rtmp328.etype;
_size24 = _rtmp328.size;
for (var _i29 = 0; _i29 < _size24; ++_i29)
{
var elem30 = null;
elem30 = new crouton_thrift.TraceJoinId();
elem30.read(input);
this.join_ids.push(elem30);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.I64) {
this.oldest_micros = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 6:
if (ftype == Thrift.Type.I64) {
this.youngest_micros = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 8:
if (ftype == Thrift.Type.LIST) {
var _size31 = 0;
var _rtmp335;
this.attributes = [];
var _etype34 = 0;
_rtmp335 = input.readListBegin();
_etype34 = _rtmp335.etype;
_size31 = _rtmp335.size;
for (var _i36 = 0; _i36 < _size31; ++_i36)
{
var elem37 = null;
elem37 = new crouton_thrift.KeyValue();
elem37.read(input);
this.attributes.push(elem37);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 9:
if (ftype == Thrift.Type.BOOL) {
this.error_flag = input.readBool().value;
} else {
input.skip(ftype);
}
break;
case 10:
if (ftype == Thrift.Type.LIST) {
var _size38 = 0;
var _rtmp342;
this.log_records = [];
var _etype41 = 0;
_rtmp342 = input.readListBegin();
_etype41 = _rtmp342.etype;
_size38 = _rtmp342.size;
for (var _i43 = 0; _i43 < _size38; ++_i43)
{
var elem44 = null;
elem44 = new crouton_thrift.LogRecord();
elem44.read(input);
this.log_records.push(elem44);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.SpanRecord.prototype.write = false && function(output) {
output.writeStructBegin('SpanRecord');
if (this.span_guid !== null && this.span_guid !== undefined) {
output.writeFieldBegin('span_guid', Thrift.Type.STRING, 1);
output.writeString(this.span_guid);
output.writeFieldEnd();
}
if (this.trace_guid !== null && this.trace_guid !== undefined) {
output.writeFieldBegin('trace_guid', Thrift.Type.STRING, 11);
output.writeString(this.trace_guid);
output.writeFieldEnd();
}
if (this.runtime_guid !== null && this.runtime_guid !== undefined) {
output.writeFieldBegin('runtime_guid', Thrift.Type.STRING, 2);
output.writeString(this.runtime_guid);
output.writeFieldEnd();
}
if (this.span_name !== null && this.span_name !== undefined) {
output.writeFieldBegin('span_name', Thrift.Type.STRING, 3);
output.writeString(this.span_name);
output.writeFieldEnd();
}
if (this.join_ids !== null && this.join_ids !== undefined) {
output.writeFieldBegin('join_ids', Thrift.Type.LIST, 4);
output.writeListBegin(Thrift.Type.STRUCT, this.join_ids.length);
for (var iter45 in this.join_ids)
{
if (this.join_ids.hasOwnProperty(iter45))
{
iter45 = this.join_ids[iter45];
iter45.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.oldest_micros !== null && this.oldest_micros !== undefined) {
output.writeFieldBegin('oldest_micros', Thrift.Type.I64, 5);
output.writeI64(this.oldest_micros);
output.writeFieldEnd();
}
if (this.youngest_micros !== null && this.youngest_micros !== undefined) {
output.writeFieldBegin('youngest_micros', Thrift.Type.I64, 6);
output.writeI64(this.youngest_micros);
output.writeFieldEnd();
}
if (this.attributes !== null && this.attributes !== undefined) {
output.writeFieldBegin('attributes', Thrift.Type.LIST, 8);
output.writeListBegin(Thrift.Type.STRUCT, this.attributes.length);
for (var iter46 in this.attributes)
{
if (this.attributes.hasOwnProperty(iter46))
{
iter46 = this.attributes[iter46];
iter46.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.error_flag !== null && this.error_flag !== undefined) {
output.writeFieldBegin('error_flag', Thrift.Type.BOOL, 9);
output.writeBool(this.error_flag);
output.writeFieldEnd();
}
if (this.log_records !== null && this.log_records !== undefined) {
output.writeFieldBegin('log_records', Thrift.Type.LIST, 10);
output.writeListBegin(Thrift.Type.STRUCT, this.log_records.length);
for (var iter47 in this.log_records)
{
if (this.log_records.hasOwnProperty(iter47))
{
iter47 = this.log_records[iter47];
iter47.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.Auth = function(args) {
this.access_token = null;
if (args) {
if (args.access_token !== undefined) {
this.access_token = args.access_token;
}
}
};
crouton_thrift.Auth.prototype = {};
crouton_thrift.Auth.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRING) {
this.access_token = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.Auth.prototype.write = false && function(output) {
output.writeStructBegin('Auth');
if (this.access_token !== null && this.access_token !== undefined) {
output.writeFieldBegin('access_token', Thrift.Type.STRING, 1);
output.writeString(this.access_token);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.Timing = function(args) {
this.receive_micros = null;
this.transmit_micros = null;
if (args) {
if (args.receive_micros !== undefined) {
this.receive_micros = args.receive_micros;
}
if (args.transmit_micros !== undefined) {
this.transmit_micros = args.transmit_micros;
}
}
};
crouton_thrift.Timing.prototype = {};
crouton_thrift.Timing.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.I64) {
this.receive_micros = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I64) {
this.transmit_micros = input.readI64().value;
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.Timing.prototype.write = false && function(output) {
output.writeStructBegin('Timing');
if (this.receive_micros !== null && this.receive_micros !== undefined) {
output.writeFieldBegin('receive_micros', Thrift.Type.I64, 1);
output.writeI64(this.receive_micros);
output.writeFieldEnd();
}
if (this.transmit_micros !== null && this.transmit_micros !== undefined) {
output.writeFieldBegin('transmit_micros', Thrift.Type.I64, 2);
output.writeI64(this.transmit_micros);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.SampleCount = function(args) {
this.oldest_micros = null;
this.youngest_micros = null;
this.count = null;
if (args) {
if (args.oldest_micros !== undefined) {
this.oldest_micros = args.oldest_micros;
}
if (args.youngest_micros !== undefined) {
this.youngest_micros = args.youngest_micros;
}
if (args.count !== undefined) {
this.count = args.count;
}
}
};
crouton_thrift.SampleCount.prototype = {};
crouton_thrift.SampleCount.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.I64) {
this.oldest_micros = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I64) {
this.youngest_micros = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.I64) {
this.count = input.readI64().value;
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.SampleCount.prototype.write = false && function(output) {
output.writeStructBegin('SampleCount');
if (this.oldest_micros !== null && this.oldest_micros !== undefined) {
output.writeFieldBegin('oldest_micros', Thrift.Type.I64, 1);
output.writeI64(this.oldest_micros);
output.writeFieldEnd();
}
if (this.youngest_micros !== null && this.youngest_micros !== undefined) {
output.writeFieldBegin('youngest_micros', Thrift.Type.I64, 2);
output.writeI64(this.youngest_micros);
output.writeFieldEnd();
}
if (this.count !== null && this.count !== undefined) {
output.writeFieldBegin('count', Thrift.Type.I64, 3);
output.writeI64(this.count);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.MetricsSample = function(args) {
this.name = null;
this.int64_value = null;
this.double_value = null;
if (args) {
if (args.name !== undefined) {
this.name = args.name;
} else {
throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
}
if (args.int64_value !== undefined) {
this.int64_value = args.int64_value;
}
if (args.double_value !== undefined) {
this.double_value = args.double_value;
}
}
};
crouton_thrift.MetricsSample.prototype = {};
crouton_thrift.MetricsSample.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRING) {
this.name = input.readString().value;
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.I64) {
this.int64_value = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.DOUBLE) {
this.double_value = input.readDouble().value;
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.MetricsSample.prototype.write = false && function(output) {
output.writeStructBegin('MetricsSample');
if (this.name !== null && this.name !== undefined) {
output.writeFieldBegin('name', Thrift.Type.STRING, 1);
output.writeString(this.name);
output.writeFieldEnd();
}
if (this.int64_value !== null && this.int64_value !== undefined) {
output.writeFieldBegin('int64_value', Thrift.Type.I64, 2);
output.writeI64(this.int64_value);
output.writeFieldEnd();
}
if (this.double_value !== null && this.double_value !== undefined) {
output.writeFieldBegin('double_value', Thrift.Type.DOUBLE, 3);
output.writeDouble(this.double_value);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.Metrics = function(args) {
this.counts = null;
this.gauges = null;
if (args) {
if (args.counts !== undefined) {
this.counts = args.counts;
}
if (args.gauges !== undefined) {
this.gauges = args.gauges;
}
}
};
crouton_thrift.Metrics.prototype = {};
crouton_thrift.Metrics.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.LIST) {
var _size48 = 0;
var _rtmp352;
this.counts = [];
var _etype51 = 0;
_rtmp352 = input.readListBegin();
_etype51 = _rtmp352.etype;
_size48 = _rtmp352.size;
for (var _i53 = 0; _i53 < _size48; ++_i53)
{
var elem54 = null;
elem54 = new crouton_thrift.MetricsSample();
elem54.read(input);
this.counts.push(elem54);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.LIST) {
var _size55 = 0;
var _rtmp359;
this.gauges = [];
var _etype58 = 0;
_rtmp359 = input.readListBegin();
_etype58 = _rtmp359.etype;
_size55 = _rtmp359.size;
for (var _i60 = 0; _i60 < _size55; ++_i60)
{
var elem61 = null;
elem61 = new crouton_thrift.MetricsSample();
elem61.read(input);
this.gauges.push(elem61);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.Metrics.prototype.write = false && function(output) {
output.writeStructBegin('Metrics');
if (this.counts !== null && this.counts !== undefined) {
output.writeFieldBegin('counts', Thrift.Type.LIST, 1);
output.writeListBegin(Thrift.Type.STRUCT, this.counts.length);
for (var iter62 in this.counts)
{
if (this.counts.hasOwnProperty(iter62))
{
iter62 = this.counts[iter62];
iter62.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.gauges !== null && this.gauges !== undefined) {
output.writeFieldBegin('gauges', Thrift.Type.LIST, 2);
output.writeListBegin(Thrift.Type.STRUCT, this.gauges.length);
for (var iter63 in this.gauges)
{
if (this.gauges.hasOwnProperty(iter63))
{
iter63 = this.gauges[iter63];
iter63.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.ReportRequest = function(args) {
this.runtime = null;
this.span_records = null;
this.log_records = null;
this.timestamp_offset_micros = null;
this.oldest_micros = null;
this.youngest_micros = null;
this.counters = null;
this.internal_logs = null;
this.internal_metrics = null;
if (args) {
if (args.runtime !== undefined) {
this.runtime = args.runtime;
}
if (args.span_records !== undefined) {
this.span_records = args.span_records;
}
if (args.log_records !== undefined) {
this.log_records = args.log_records;
}
if (args.timestamp_offset_micros !== undefined) {
this.timestamp_offset_micros = args.timestamp_offset_micros;
}
if (args.oldest_micros !== undefined) {
this.oldest_micros = args.oldest_micros;
}
if (args.youngest_micros !== undefined) {
this.youngest_micros = args.youngest_micros;
}
if (args.counters !== undefined) {
this.counters = args.counters;
}
if (args.internal_logs !== undefined) {
this.internal_logs = args.internal_logs;
}
if (args.internal_metrics !== undefined) {
this.internal_metrics = args.internal_metrics;
}
}
};
crouton_thrift.ReportRequest.prototype = {};
crouton_thrift.ReportRequest.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.STRUCT) {
this.runtime = new crouton_thrift.Runtime();
this.runtime.read(input);
} else {
input.skip(ftype);
}
break;
case 3:
if (ftype == Thrift.Type.LIST) {
var _size64 = 0;
var _rtmp368;
this.span_records = [];
var _etype67 = 0;
_rtmp368 = input.readListBegin();
_etype67 = _rtmp368.etype;
_size64 = _rtmp368.size;
for (var _i69 = 0; _i69 < _size64; ++_i69)
{
var elem70 = null;
elem70 = new crouton_thrift.SpanRecord();
elem70.read(input);
this.span_records.push(elem70);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 4:
if (ftype == Thrift.Type.LIST) {
var _size71 = 0;
var _rtmp375;
this.log_records = [];
var _etype74 = 0;
_rtmp375 = input.readListBegin();
_etype74 = _rtmp375.etype;
_size71 = _rtmp375.size;
for (var _i76 = 0; _i76 < _size71; ++_i76)
{
var elem77 = null;
elem77 = new crouton_thrift.LogRecord();
elem77.read(input);
this.log_records.push(elem77);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 5:
if (ftype == Thrift.Type.I64) {
this.timestamp_offset_micros = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 7:
if (ftype == Thrift.Type.I64) {
this.oldest_micros = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 8:
if (ftype == Thrift.Type.I64) {
this.youngest_micros = input.readI64().value;
} else {
input.skip(ftype);
}
break;
case 9:
if (ftype == Thrift.Type.LIST) {
var _size78 = 0;
var _rtmp382;
this.counters = [];
var _etype81 = 0;
_rtmp382 = input.readListBegin();
_etype81 = _rtmp382.etype;
_size78 = _rtmp382.size;
for (var _i83 = 0; _i83 < _size78; ++_i83)
{
var elem84 = null;
elem84 = new crouton_thrift.NamedCounter();
elem84.read(input);
this.counters.push(elem84);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 10:
if (ftype == Thrift.Type.LIST) {
var _size85 = 0;
var _rtmp389;
this.internal_logs = [];
var _etype88 = 0;
_rtmp389 = input.readListBegin();
_etype88 = _rtmp389.etype;
_size85 = _rtmp389.size;
for (var _i90 = 0; _i90 < _size85; ++_i90)
{
var elem91 = null;
elem91 = new crouton_thrift.LogRecord();
elem91.read(input);
this.internal_logs.push(elem91);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 11:
if (ftype == Thrift.Type.STRUCT) {
this.internal_metrics = new crouton_thrift.Metrics();
this.internal_metrics.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.ReportRequest.prototype.write = false && function(output) {
output.writeStructBegin('ReportRequest');
if (this.runtime !== null && this.runtime !== undefined) {
output.writeFieldBegin('runtime', Thrift.Type.STRUCT, 1);
this.runtime.write(output);
output.writeFieldEnd();
}
if (this.span_records !== null && this.span_records !== undefined) {
output.writeFieldBegin('span_records', Thrift.Type.LIST, 3);
output.writeListBegin(Thrift.Type.STRUCT, this.span_records.length);
for (var iter92 in this.span_records)
{
if (this.span_records.hasOwnProperty(iter92))
{
iter92 = this.span_records[iter92];
iter92.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.log_records !== null && this.log_records !== undefined) {
output.writeFieldBegin('log_records', Thrift.Type.LIST, 4);
output.writeListBegin(Thrift.Type.STRUCT, this.log_records.length);
for (var iter93 in this.log_records)
{
if (this.log_records.hasOwnProperty(iter93))
{
iter93 = this.log_records[iter93];
iter93.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.timestamp_offset_micros !== null && this.timestamp_offset_micros !== undefined) {
output.writeFieldBegin('timestamp_offset_micros', Thrift.Type.I64, 5);
output.writeI64(this.timestamp_offset_micros);
output.writeFieldEnd();
}
if (this.oldest_micros !== null && this.oldest_micros !== undefined) {
output.writeFieldBegin('oldest_micros', Thrift.Type.I64, 7);
output.writeI64(this.oldest_micros);
output.writeFieldEnd();
}
if (this.youngest_micros !== null && this.youngest_micros !== undefined) {
output.writeFieldBegin('youngest_micros', Thrift.Type.I64, 8);
output.writeI64(this.youngest_micros);
output.writeFieldEnd();
}
if (this.counters !== null && this.counters !== undefined) {
output.writeFieldBegin('counters', Thrift.Type.LIST, 9);
output.writeListBegin(Thrift.Type.STRUCT, this.counters.length);
for (var iter94 in this.counters)
{
if (this.counters.hasOwnProperty(iter94))
{
iter94 = this.counters[iter94];
iter94.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.internal_logs !== null && this.internal_logs !== undefined) {
output.writeFieldBegin('internal_logs', Thrift.Type.LIST, 10);
output.writeListBegin(Thrift.Type.STRUCT, this.internal_logs.length);
for (var iter95 in this.internal_logs)
{
if (this.internal_logs.hasOwnProperty(iter95))
{
iter95 = this.internal_logs[iter95];
iter95.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.internal_metrics !== null && this.internal_metrics !== undefined) {
output.writeFieldBegin('internal_metrics', Thrift.Type.STRUCT, 11);
this.internal_metrics.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.Command = function(args) {
this.disable = null;
if (args) {
if (args.disable !== undefined) {
this.disable = args.disable;
}
}
};
crouton_thrift.Command.prototype = {};
crouton_thrift.Command.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.BOOL) {
this.disable = input.readBool().value;
} else {
input.skip(ftype);
}
break;
case 0:
input.skip(ftype);
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.Command.prototype.write = false && function(output) {
output.writeStructBegin('Command');
if (this.disable !== null && this.disable !== undefined) {
output.writeFieldBegin('disable', Thrift.Type.BOOL, 1);
output.writeBool(this.disable);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
crouton_thrift.ReportResponse = function(args) {
this.commands = null;
this.timing = null;
if (args) {
if (args.commands !== undefined) {
this.commands = args.commands;
}
if (args.timing !== undefined) {
this.timing = args.timing;
}
}
};
crouton_thrift.ReportResponse.prototype = {};
crouton_thrift.ReportResponse.prototype.read = false && function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
var ftype = ret.ftype;
var fid = ret.fid;
if (ftype == Thrift.Type.STOP) {
break;
}
switch (fid)
{
case 1:
if (ftype == Thrift.Type.LIST) {
var _size96 = 0;
var _rtmp3100;
this.commands = [];
var _etype99 = 0;
_rtmp3100 = input.readListBegin();
_etype99 = _rtmp3100.etype;
_size96 = _rtmp3100.size;
for (var _i101 = 0; _i101 < _size96; ++_i101)
{
var elem102 = null;
elem102 = new crouton_thrift.Command();
elem102.read(input);
this.commands.push(elem102);
}
input.readListEnd();
} else {
input.skip(ftype);
}
break;
case 2:
if (ftype == Thrift.Type.STRUCT) {
this.timing = new crouton_thrift.Timing();
this.timing.read(input);
} else {
input.skip(ftype);
}
break;
default:
input.skip(ftype);
}
input.readFieldEnd();
}
input.readStructEnd();
return;
};
crouton_thrift.ReportResponse.prototype.write = false && function(output) {
output.writeStructBegin('ReportResponse');
if (this.commands !== null && this.commands !== undefined) {
output.writeFieldBegin('commands', Thrift.Type.LIST, 1);
output.writeListBegin(Thrift.Type.STRUCT, this.commands.length);
for (var iter103 in this.commands)
{
if (this.commands.hasOwnProperty(iter103))
{
iter103 = this.commands[iter103];
iter103.write(output);
}
}
output.writeListEnd();
output.writeFieldEnd();
}
if (this.timing !== null && this.timing !== undefined) {
output.writeFieldBegin('timing', Thrift.Type.STRUCT, 2);
this.timing.write(output);
output.writeFieldEnd();
}
output.writeFieldStop();
output.writeStructEnd();
return;
};
module.exports.crouton_thrift = crouton_thrift;
module.exports.Thrift = {}
})();