line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package NewFangle::FFI 0.08 { |
2
|
|
|
|
|
|
|
|
3
|
8
|
|
|
8
|
|
182445
|
use strict; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
191
|
|
4
|
8
|
|
|
8
|
|
31
|
use warnings; |
|
8
|
|
|
|
|
15
|
|
|
8
|
|
|
|
|
140
|
|
5
|
8
|
|
|
8
|
|
103
|
use 5.014; |
|
8
|
|
|
|
|
22
|
|
6
|
8
|
|
|
8
|
|
2229
|
use NewFangle::Lib; |
|
8
|
|
|
|
|
19
|
|
|
8
|
|
|
|
|
252
|
|
7
|
8
|
|
|
8
|
|
3877
|
use FFI::Platypus 1.26; |
|
8
|
|
|
|
|
44621
|
|
|
8
|
|
|
|
|
234
|
|
8
|
8
|
|
|
8
|
|
2704
|
use FFI::C 0.08; |
|
8
|
|
|
|
|
18580
|
|
|
8
|
|
|
|
|
207
|
|
9
|
8
|
|
|
8
|
|
44
|
use base qw( Exporter ); |
|
8
|
|
|
|
|
13
|
|
|
8
|
|
|
|
|
3566
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @EXPORT = qw( $ffi ); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
# ABSTRACT: Private class for NewFangle.pm |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $ffi = FFI::Platypus->new( |
17
|
|
|
|
|
|
|
api => 1, |
18
|
|
|
|
|
|
|
lib => [NewFangle::Lib->lib], |
19
|
|
|
|
|
|
|
); |
20
|
|
|
|
|
|
|
$ffi->mangler(sub { "newrelic_$_[0]" }); |
21
|
|
|
|
|
|
|
$ffi->load_custom_type('::PtrObject', 'newrelic_segment_t', 'NewFangle::Segment', |
22
|
|
|
|
|
|
|
sub { bless { ptr => $_[0] }, 'NewFangle::Segment' }); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
$ffi->type('uint64' => 'newrelic_time_us_t'); |
25
|
|
|
|
|
|
|
$ffi->type('object(NewFangle::App)' => 'newrelic_app_t'); |
26
|
|
|
|
|
|
|
$ffi->type('object(NewFangle::Transaction)' => 'newrelic_txn_t',); |
27
|
|
|
|
|
|
|
$ffi->type('object(NewFangle::CustomEvent)' => 'newrelic_custom_event_t'); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
FFI::C->ffi($ffi); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
package NewFangle::NewrelicLoglevel 0.08 { |
32
|
|
|
|
|
|
|
FFI::C->enum([ |
33
|
|
|
|
|
|
|
'error', |
34
|
|
|
|
|
|
|
'warning', |
35
|
|
|
|
|
|
|
'info', |
36
|
|
|
|
|
|
|
'debug', |
37
|
|
|
|
|
|
|
], { prefix => 'NEWRELIC_LOG_' }); |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
package NewFangle::NewrelicTransactionTracerThreshold 0.08 { |
41
|
|
|
|
|
|
|
FFI::C->enum([ |
42
|
|
|
|
|
|
|
'is_apdex_failing', |
43
|
|
|
|
|
|
|
'is_over_duration', |
44
|
|
|
|
|
|
|
], { prefix => 'NEWRELIC_THRESHOLD_' }); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
package NewFangle::NewrelicTtRecordsql 0.08 { |
48
|
|
|
|
|
|
|
FFI::C->enum([ |
49
|
|
|
|
|
|
|
'off', |
50
|
|
|
|
|
|
|
'raw', |
51
|
|
|
|
|
|
|
'obfuscated', |
52
|
|
|
|
|
|
|
], { prefix => 'NEWRELIC_SQL_' }); |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
package NewFangle::DatastoreReporting 0.08 { |
56
|
|
|
|
|
|
|
FFI::C->struct([ |
57
|
|
|
|
|
|
|
enabled => 'bool', |
58
|
|
|
|
|
|
|
record_sql => 'newrelic_tt_recordsql_t', |
59
|
|
|
|
|
|
|
threshold_us => 'newrelic_time_us_t', |
60
|
|
|
|
|
|
|
]); |
61
|
|
|
|
|
|
|
}; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
package NewFangle::NewrelicTransactionTracerConfig 0.08 { |
64
|
|
|
|
|
|
|
FFI::C->struct([ |
65
|
|
|
|
|
|
|
enabled => 'bool', |
66
|
|
|
|
|
|
|
threshold => 'newrelic_transaction_tracer_threshold_t', |
67
|
|
|
|
|
|
|
duration_us => 'newrelic_time_us_t', |
68
|
|
|
|
|
|
|
stack_trace_threshold_us => 'newrelic_time_us_t', |
69
|
|
|
|
|
|
|
datastore_reporting => 'datastore_reporting_t', |
70
|
|
|
|
|
|
|
]); |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
package NewFangle::NewrelicDatastoreSegmentConfig 0.08 { |
74
|
|
|
|
|
|
|
FFI::C->struct([ |
75
|
|
|
|
|
|
|
instance_reporting => 'bool', |
76
|
|
|
|
|
|
|
database_name_reporting => 'bool', |
77
|
|
|
|
|
|
|
]); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
package NewFangle::NewrelicDistributedTracingConfig 0.08 { |
81
|
|
|
|
|
|
|
FFI::C->struct([ |
82
|
|
|
|
|
|
|
enabled => 'bool', |
83
|
|
|
|
|
|
|
]); |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
package NewFangle::NewrelicSpanEventConfig 0.08 { |
87
|
|
|
|
|
|
|
FFI::C->struct([ |
88
|
|
|
|
|
|
|
enabled => 'bool', |
89
|
|
|
|
|
|
|
]); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
package NewFangle::NewrelicAppConfig 0.08 { |
93
|
|
|
|
|
|
|
FFI::C->struct([ |
94
|
|
|
|
|
|
|
app_name => 'string(255)', |
95
|
|
|
|
|
|
|
license_key => 'string(255)', |
96
|
|
|
|
|
|
|
redirect_collector => 'string(100)', |
97
|
|
|
|
|
|
|
log_filename => 'string(512)', |
98
|
|
|
|
|
|
|
log_level => 'newrelic_loglevel_t', |
99
|
|
|
|
|
|
|
transaction_tracer => 'newrelic_transaction_tracer_config_t', |
100
|
|
|
|
|
|
|
datastore_tracer => 'newrelic_datastore_segment_config_t', |
101
|
|
|
|
|
|
|
distributed_tracing => 'newrelic_distributed_tracing_config_t', |
102
|
|
|
|
|
|
|
span_events => 'newrelic_span_event_config_t', |
103
|
|
|
|
|
|
|
], { trim_string => 1 }); |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
}; |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
1; |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
__END__ |