oboe-heroku 0.8.0.1 → 0.8.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/ext/oboe_metal/src/libs/liboboe-1.0.so.1.3.1 +0 -0
- data/ext/oboe_metal/src/libs/liboboe.a +0 -0
- data/ext/oboe_metal/src/libs/liboboe.la +1 -1
- data/ext/oboe_metal/src/{oboe.h → oboe/oboe.h} +10 -4
- data/ext/oboe_metal/src/{oboe_debug.h → oboe/oboe_debug.h} +0 -0
- data/ext/oboe_metal/src/oboe.hpp +8 -8
- data/ext/oboe_metal/src/oboe_wrap.cxx +29 -46
- data/lib/heroku_metal.rb +6 -14
- data/lib/oboe-heroku/version.rb +1 -1
- data/oboe-heroku.gemspec +1 -1
- metadata +6 -6
Binary file
|
Binary file
|
@@ -17,7 +17,7 @@ old_library='liboboe.a'
|
|
17
17
|
inherited_linker_flags=''
|
18
18
|
|
19
19
|
# Libraries that this one depends upon.
|
20
|
-
dependency_libs=' -
|
20
|
+
dependency_libs=' -L/tmp/local/lib -lfb303 /tmp/local/lib/libthrift.la -L/tmp/local//lib /tmp/local/lib/libthriftnb.la /tmp/local/lib/libthriftz.la -lssl -lrt -lboost_thread -lboost_date_time -lpthread -lcrypto /tmp/local/lib/libevent.la -levent'
|
21
21
|
|
22
22
|
# Names of additional weak libraries provided by this library
|
23
23
|
weak_library_names=''
|
@@ -47,6 +47,10 @@ extern "C" {
|
|
47
47
|
#define OBOE_REPORTER_PROTOCOL_FILE "file"
|
48
48
|
#define OBOE_REPORTER_PROTOCOL_UDP "udp"
|
49
49
|
#define OBOE_REPORTER_PROTOCOL_SSL "ssl"
|
50
|
+
#define OBOE_REPORTER_PROTOCOL_DEFAULT OBOE_REPORTER_PROTOCOL_UDP
|
51
|
+
|
52
|
+
/** Maximum reasonable length of an arguments string for configuring a reporter. */
|
53
|
+
#define OBOE_REPORTER_ARGS_SIZE 4000
|
50
54
|
|
51
55
|
// structs
|
52
56
|
|
@@ -335,9 +339,12 @@ int oboe_sample_request(const char *layer, const char *in_xtrace, oboe_settings_
|
|
335
339
|
/**
|
336
340
|
* Check if this request should be sampled.
|
337
341
|
*
|
338
|
-
* Checks for sample rate flags and settings for the specified layer, considers
|
339
|
-
* special features in the X-Trace and
|
340
|
-
*
|
342
|
+
* Checks for sample rate flags and settings for the specified layer, considers
|
343
|
+
* the current tracing mode and any special features in the X-Trace and
|
344
|
+
* X-TV-Meta HTTP headers, and, if appropriate, rolls the virtual dice to
|
345
|
+
* decide if this request should be sampled.
|
346
|
+
*
|
347
|
+
* This is designed to be called once per layer per request.
|
341
348
|
*
|
342
349
|
* This replaces oboe_sample_request with a version that uses the settings
|
343
350
|
* configuration kept in thread-local storage and takes the X-TV-Meta HTTP
|
@@ -384,7 +391,6 @@ extern int oboe_config_check_version(int version, int revision);
|
|
384
391
|
extern int oboe_config_get_version();
|
385
392
|
|
386
393
|
/**
|
387
|
-
<<<<<<< HEAD
|
388
394
|
* Prototype for a logger call-back function.
|
389
395
|
*
|
390
396
|
* A logging function of this form can be added to the logger chain using
|
File without changes
|
data/ext/oboe_metal/src/oboe.hpp
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
#define OBOE_HPP
|
9
9
|
|
10
10
|
#include <string>
|
11
|
-
#include <oboe.h>
|
11
|
+
#include <oboe/oboe.h>
|
12
12
|
|
13
13
|
|
14
14
|
class Event;
|
@@ -116,19 +116,19 @@ public:
|
|
116
116
|
}
|
117
117
|
|
118
118
|
/**
|
119
|
-
*
|
119
|
+
* Check if the current request should be traced based on the current settings.
|
120
120
|
*
|
121
|
-
*
|
122
|
-
*
|
123
|
-
*
|
121
|
+
* If in_xtrace is empty, then sampling will be considered as a new trace.
|
122
|
+
* Otherwise sampling will be considered as adding to the current trace.
|
123
|
+
* Different layers may have special rules. Also special rules for AppView
|
124
|
+
* Web synthetic traces apply if in_tv_meta is given a non-empty string.
|
124
125
|
*
|
125
|
-
*
|
126
|
-
* always is enabled then return true independent of the other conditions.
|
126
|
+
* This is designed to be called once per layer per request.
|
127
127
|
*
|
128
128
|
* @param layer Name of the layer being considered for tracing
|
129
129
|
* @param in_xtrace Incoming X-Trace ID (NULL or empty string if not present)
|
130
130
|
* @param in_tv_meta AppView Web ID from X-TV-Meta HTTP header or higher layer (NULL or empty string if not present).
|
131
|
-
* @return True if
|
131
|
+
* @return True if the request should be traced; otherwise false.
|
132
132
|
*/
|
133
133
|
static bool sampleRequest(
|
134
134
|
std::string layer,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/* ----------------------------------------------------------------------------
|
2
2
|
* This file was automatically generated by SWIG (http://www.swig.org).
|
3
|
-
* Version 2.0.
|
3
|
+
* Version 2.0.11
|
4
4
|
*
|
5
5
|
* This file is not intended to be easily readable and contains a number of
|
6
6
|
* coding conventions designed to improve portability and efficiency. Do not make
|
@@ -422,7 +422,7 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
|
422
422
|
return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
423
423
|
}
|
424
424
|
#else /* no cast-rank mode */
|
425
|
-
# define SWIG_AddCast
|
425
|
+
# define SWIG_AddCast(r) (r)
|
426
426
|
# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
|
427
427
|
#endif
|
428
428
|
|
@@ -486,18 +486,18 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
|
|
486
486
|
|
487
487
|
/*
|
488
488
|
Check type equivalence in a name list like <name1>|<name2>|...
|
489
|
-
Return 0 if
|
489
|
+
Return 0 if equal, -1 if nb < tb, 1 if nb > tb
|
490
490
|
*/
|
491
491
|
SWIGRUNTIME int
|
492
|
-
|
493
|
-
int equiv =
|
492
|
+
SWIG_TypeCmp(const char *nb, const char *tb) {
|
493
|
+
int equiv = 1;
|
494
494
|
const char* te = tb + strlen(tb);
|
495
495
|
const char* ne = nb;
|
496
|
-
while (
|
496
|
+
while (equiv != 0 && *ne) {
|
497
497
|
for (nb = ne; *ne; ++ne) {
|
498
498
|
if (*ne == '|') break;
|
499
499
|
}
|
500
|
-
equiv =
|
500
|
+
equiv = SWIG_TypeNameComp(nb, ne, tb, te);
|
501
501
|
if (*ne) ++ne;
|
502
502
|
}
|
503
503
|
return equiv;
|
@@ -505,24 +505,13 @@ SWIG_TypeEquiv(const char *nb, const char *tb) {
|
|
505
505
|
|
506
506
|
/*
|
507
507
|
Check type equivalence in a name list like <name1>|<name2>|...
|
508
|
-
Return 0 if equal,
|
508
|
+
Return 0 if not equal, 1 if equal
|
509
509
|
*/
|
510
510
|
SWIGRUNTIME int
|
511
|
-
|
512
|
-
|
513
|
-
const char* te = tb + strlen(tb);
|
514
|
-
const char* ne = nb;
|
515
|
-
while (!equiv && *ne) {
|
516
|
-
for (nb = ne; *ne; ++ne) {
|
517
|
-
if (*ne == '|') break;
|
518
|
-
}
|
519
|
-
equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
|
520
|
-
if (*ne) ++ne;
|
521
|
-
}
|
522
|
-
return equiv;
|
511
|
+
SWIG_TypeEquiv(const char *nb, const char *tb) {
|
512
|
+
return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
|
523
513
|
}
|
524
514
|
|
525
|
-
|
526
515
|
/*
|
527
516
|
Check the typename
|
528
517
|
*/
|
@@ -1398,7 +1387,7 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
|
|
1398
1387
|
|
1399
1388
|
/* Runtime API */
|
1400
1389
|
|
1401
|
-
#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule()
|
1390
|
+
#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata)
|
1402
1391
|
#define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer)
|
1403
1392
|
|
1404
1393
|
|
@@ -1552,7 +1541,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
|
|
1552
1541
|
downcast methods. */
|
1553
1542
|
if (obj != Qnil) {
|
1554
1543
|
VALUE value = rb_iv_get(obj, "@__swigtype__");
|
1555
|
-
char* type_name = RSTRING_PTR(value);
|
1544
|
+
const char* type_name = RSTRING_PTR(value);
|
1556
1545
|
|
1557
1546
|
if (strcmp(type->name, type_name) == 0) {
|
1558
1547
|
return obj;
|
@@ -1734,7 +1723,7 @@ SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) {
|
|
1734
1723
|
}
|
1735
1724
|
|
1736
1725
|
SWIGRUNTIME swig_module_info *
|
1737
|
-
SWIG_Ruby_GetModule(void)
|
1726
|
+
SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata))
|
1738
1727
|
{
|
1739
1728
|
VALUE pointer;
|
1740
1729
|
swig_module_info *ret = 0;
|
@@ -1774,7 +1763,7 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
|
|
1774
1763
|
SWIGINTERN
|
1775
1764
|
int SWIG_Ruby_isCallable( VALUE proc )
|
1776
1765
|
{
|
1777
|
-
if ( rb_respond_to( proc, swig_call_id )
|
1766
|
+
if ( rb_respond_to( proc, swig_call_id ) )
|
1778
1767
|
return 1;
|
1779
1768
|
return 0;
|
1780
1769
|
}
|
@@ -1787,7 +1776,7 @@ int SWIG_Ruby_isCallable( VALUE proc )
|
|
1787
1776
|
SWIGINTERN
|
1788
1777
|
int SWIG_Ruby_arity( VALUE proc, int minimal )
|
1789
1778
|
{
|
1790
|
-
if ( rb_respond_to( proc, swig_arity_id )
|
1779
|
+
if ( rb_respond_to( proc, swig_arity_id ) )
|
1791
1780
|
{
|
1792
1781
|
VALUE num = rb_funcall( proc, swig_arity_id, 0 );
|
1793
1782
|
int arity = NUM2INT(num);
|
@@ -1842,7 +1831,7 @@ static VALUE mOboe_metal;
|
|
1842
1831
|
#define SWIG_RUBY_THREAD_END_BLOCK
|
1843
1832
|
|
1844
1833
|
|
1845
|
-
#define SWIGVERSION
|
1834
|
+
#define SWIGVERSION 0x020011
|
1846
1835
|
#define SWIG_VERSION SWIGVERSION
|
1847
1836
|
|
1848
1837
|
|
@@ -1896,11 +1885,7 @@ SWIGINTERN int
|
|
1896
1885
|
SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
|
1897
1886
|
{
|
1898
1887
|
if (TYPE(obj) == T_STRING) {
|
1899
|
-
#if defined(StringValuePtr)
|
1900
1888
|
char *cstr = StringValuePtr(obj);
|
1901
|
-
#else
|
1902
|
-
char *cstr = STR2CSTR(obj);
|
1903
|
-
#endif
|
1904
1889
|
size_t size = RSTRING_LEN(obj) + 1;
|
1905
1890
|
if (cptr) {
|
1906
1891
|
if (alloc) {
|
@@ -1999,7 +1984,7 @@ SWIG_ruby_failed(void)
|
|
1999
1984
|
}
|
2000
1985
|
|
2001
1986
|
|
2002
|
-
/*@SWIG:/
|
1987
|
+
/*@SWIG:/tmp/local/share/swig/2.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2003
1988
|
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
|
2004
1989
|
{
|
2005
1990
|
VALUE obj = args[0];
|
@@ -2047,7 +2032,7 @@ SWIG_AsVal_int (VALUE obj, int *val)
|
|
2047
2032
|
|
2048
2033
|
|
2049
2034
|
|
2050
|
-
/*@SWIG:/
|
2035
|
+
/*@SWIG:/tmp/local/share/swig/2.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
|
2051
2036
|
SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
|
2052
2037
|
{
|
2053
2038
|
VALUE obj = args[0];
|
@@ -2075,7 +2060,7 @@ SWIG_AsVal_double (VALUE obj, double *val)
|
|
2075
2060
|
return SWIG_TypeError;
|
2076
2061
|
}
|
2077
2062
|
|
2078
|
-
swig_class SwigClassMetadata;
|
2063
|
+
static swig_class SwigClassMetadata;
|
2079
2064
|
|
2080
2065
|
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
2081
2066
|
SWIGINTERN VALUE
|
@@ -2260,7 +2245,7 @@ fail:
|
|
2260
2245
|
}
|
2261
2246
|
|
2262
2247
|
|
2263
|
-
swig_class SwigClassContext;
|
2248
|
+
static swig_class SwigClassContext;
|
2264
2249
|
|
2265
2250
|
SWIGINTERN VALUE
|
2266
2251
|
_wrap_Context_setTracingMode(int argc, VALUE *argv, VALUE self) {
|
@@ -2605,7 +2590,7 @@ free_Context(Context *arg1) {
|
|
2605
2590
|
delete arg1;
|
2606
2591
|
}
|
2607
2592
|
|
2608
|
-
swig_class SwigClassEvent;
|
2593
|
+
static swig_class SwigClassEvent;
|
2609
2594
|
|
2610
2595
|
SWIGINTERN void
|
2611
2596
|
free_Event(Event *arg1) {
|
@@ -3052,7 +3037,7 @@ fail:
|
|
3052
3037
|
}
|
3053
3038
|
|
3054
3039
|
|
3055
|
-
swig_class SwigClassReporter;
|
3040
|
+
static swig_class SwigClassReporter;
|
3056
3041
|
|
3057
3042
|
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
3058
3043
|
SWIGINTERN VALUE
|
@@ -3239,7 +3224,7 @@ fail:
|
|
3239
3224
|
}
|
3240
3225
|
|
3241
3226
|
|
3242
|
-
swig_class SwigClassSslReporter;
|
3227
|
+
static swig_class SwigClassSslReporter;
|
3243
3228
|
|
3244
3229
|
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
3245
3230
|
SWIGINTERN VALUE
|
@@ -3415,7 +3400,7 @@ fail:
|
|
3415
3400
|
}
|
3416
3401
|
|
3417
3402
|
|
3418
|
-
swig_class SwigClassUdpReporter;
|
3403
|
+
static swig_class SwigClassUdpReporter;
|
3419
3404
|
|
3420
3405
|
SWIGINTERN VALUE
|
3421
3406
|
_wrap_new_UdpReporter__SWIG_0(int argc, VALUE *argv, VALUE self) {
|
@@ -3668,7 +3653,7 @@ fail:
|
|
3668
3653
|
}
|
3669
3654
|
|
3670
3655
|
|
3671
|
-
swig_class SwigClassFileReporter;
|
3656
|
+
static swig_class SwigClassFileReporter;
|
3672
3657
|
|
3673
3658
|
#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
|
3674
3659
|
SWIGINTERN VALUE
|
@@ -3844,7 +3829,7 @@ fail:
|
|
3844
3829
|
}
|
3845
3830
|
|
3846
3831
|
|
3847
|
-
swig_class SwigClassDebugLogger;
|
3832
|
+
static swig_class SwigClassDebugLogger;
|
3848
3833
|
|
3849
3834
|
SWIGINTERN VALUE
|
3850
3835
|
_wrap_DebugLogger_log(int argc, VALUE *argv, VALUE self) {
|
@@ -3983,7 +3968,7 @@ fail:
|
|
3983
3968
|
}
|
3984
3969
|
|
3985
3970
|
|
3986
|
-
swig_class SwigClassDebugLog;
|
3971
|
+
static swig_class SwigClassDebugLog;
|
3987
3972
|
|
3988
3973
|
SWIGINTERN VALUE
|
3989
3974
|
_wrap_DebugLog_getLevelName(int argc, VALUE *argv, VALUE self) {
|
@@ -4289,7 +4274,7 @@ free_DebugLog(DebugLog *arg1) {
|
|
4289
4274
|
delete arg1;
|
4290
4275
|
}
|
4291
4276
|
|
4292
|
-
swig_class SwigClassConfig;
|
4277
|
+
static swig_class SwigClassConfig;
|
4293
4278
|
|
4294
4279
|
SWIGINTERN VALUE
|
4295
4280
|
_wrap_Config_checkVersion(int argc, VALUE *argv, VALUE self) {
|
@@ -4520,8 +4505,6 @@ SWIG_InitializeModule(void *clientdata) {
|
|
4520
4505
|
swig_module_info *module_head, *iter;
|
4521
4506
|
int found, init;
|
4522
4507
|
|
4523
|
-
clientdata = clientdata;
|
4524
|
-
|
4525
4508
|
/* check to see if the circular list has been setup, if not, set it up */
|
4526
4509
|
if (swig_module.next==0) {
|
4527
4510
|
/* Initialize the swig_module */
|
@@ -4559,7 +4542,7 @@ SWIG_InitializeModule(void *clientdata) {
|
|
4559
4542
|
module_head->next = &swig_module;
|
4560
4543
|
}
|
4561
4544
|
|
4562
|
-
/* When multiple
|
4545
|
+
/* When multiple interpreters are used, a module could have already been initialized in
|
4563
4546
|
a different interpreter, but not yet have a pointer in this interpreter.
|
4564
4547
|
In this case, we do not want to continue adding types... everything should be
|
4565
4548
|
set up already */
|
data/lib/heroku_metal.rb
CHANGED
@@ -54,30 +54,22 @@ module Oboe
|
|
54
54
|
Oboe::Config[:tracing_mode].to_s == "always"
|
55
55
|
end
|
56
56
|
|
57
|
-
def continue?
|
58
|
-
Oboe::Context.isValid and not Oboe.never?
|
59
|
-
end
|
60
|
-
|
61
57
|
def never?
|
62
58
|
Oboe::Config[:tracing_mode].to_s == "never"
|
63
59
|
end
|
64
60
|
|
65
|
-
def now?
|
66
|
-
Oboe::Context.isValid and not Oboe.never?
|
67
|
-
end
|
68
|
-
|
69
61
|
def passthrough?
|
70
62
|
["always", "through"].include?(Oboe::Config[:tracing_mode])
|
71
63
|
end
|
72
64
|
|
73
|
-
def sample?
|
74
|
-
|
65
|
+
def sample?(opts = {})
|
66
|
+
# Assure defaults since SWIG enforces Strings
|
67
|
+
opts[:layer] ||= ''
|
68
|
+
opts[:xtrace] ||= ''
|
69
|
+
opts['X-TV-Meta'] ||= ''
|
70
|
+
Oboe::Context.sampleRequest(opts[:layer], opts[:xtrace], opts['X-TV-Meta'])
|
75
71
|
end
|
76
72
|
|
77
|
-
def start?
|
78
|
-
not Oboe::Context.isValid and Oboe.always?
|
79
|
-
end
|
80
|
-
|
81
73
|
def through?
|
82
74
|
Oboe::Config[:tracing_mode] == "through"
|
83
75
|
end
|
data/lib/oboe-heroku/version.rb
CHANGED
data/oboe-heroku.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: oboe-heroku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.0.
|
4
|
+
version: 0.8.0.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-09-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: oboe
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
requirements:
|
20
20
|
- - ! '>='
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: 2.1.
|
22
|
+
version: 2.1.3
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -27,7 +27,7 @@ dependencies:
|
|
27
27
|
requirements:
|
28
28
|
- - ! '>='
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 2.1.
|
30
|
+
version: 2.1.3
|
31
31
|
description: The oboe-heroku gem provides TraceView instrumentation for Ruby and Ruby
|
32
32
|
frameworks on Heroku.
|
33
33
|
email: traceviewsupport@appneta.com
|
@@ -60,9 +60,9 @@ files:
|
|
60
60
|
- ext/oboe_metal/src/libs/libthriftnb.la
|
61
61
|
- ext/oboe_metal/src/libs/libthriftz-0.9.0.so
|
62
62
|
- ext/oboe_metal/src/libs/libthriftz.la
|
63
|
-
- ext/oboe_metal/src/oboe.h
|
64
63
|
- ext/oboe_metal/src/oboe.hpp
|
65
|
-
- ext/oboe_metal/src/
|
64
|
+
- ext/oboe_metal/src/oboe/oboe.h
|
65
|
+
- ext/oboe_metal/src/oboe/oboe_debug.h
|
66
66
|
- ext/oboe_metal/src/oboe_wrap.cxx
|
67
67
|
- lib/heroku_metal.rb
|
68
68
|
- lib/oboe-heroku.rb
|