solarwinds_apm 6.1.1 → 7.0.0.prev1
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.
- checksums.yaml +4 -4
- data/README.md +53 -4
- data/lib/rails/generators/solarwinds_apm/templates/solarwinds_apm_initializer.rb +0 -4
- data/lib/solarwinds_apm/api/current_trace_info.rb +10 -6
- data/lib/solarwinds_apm/api/custom_instrumentation.rb +80 -0
- data/lib/solarwinds_apm/api/custom_metrics.rb +8 -25
- data/lib/solarwinds_apm/api/tracing.rb +12 -27
- data/lib/solarwinds_apm/api/transaction_name.rb +6 -10
- data/lib/solarwinds_apm/api.rb +2 -0
- data/lib/solarwinds_apm/config.rb +1 -1
- data/lib/solarwinds_apm/constants.rb +1 -0
- data/lib/solarwinds_apm/noop/api.rb +5 -2
- data/lib/solarwinds_apm/noop.rb +0 -24
- data/lib/solarwinds_apm/opentelemetry/otlp_processor.rb +90 -69
- data/lib/solarwinds_apm/opentelemetry/solarwinds_propagator.rb +0 -2
- data/lib/solarwinds_apm/opentelemetry/solarwinds_response_propagator.rb +5 -4
- data/lib/solarwinds_apm/opentelemetry.rb +5 -7
- data/lib/solarwinds_apm/otel_native_config.rb +177 -0
- data/lib/solarwinds_apm/patch/README.md +15 -0
- data/lib/solarwinds_apm/patch/tag_sql/sw_dbo_utils.rb +35 -0
- data/lib/solarwinds_apm/patch/tag_sql/sw_mysql2_patch.rb +1 -12
- data/lib/solarwinds_apm/patch/tag_sql/sw_pg_patch.rb +39 -0
- data/lib/solarwinds_apm/patch/tag_sql_patch.rb +2 -0
- data/lib/solarwinds_apm/{noop/metadata.rb → sampling/dice.rb} +19 -17
- data/lib/solarwinds_apm/sampling/http_sampler.rb +87 -0
- data/lib/solarwinds_apm/sampling/json_sampler.rb +52 -0
- data/lib/solarwinds_apm/sampling/metrics.rb +38 -0
- data/lib/solarwinds_apm/sampling/oboe_sampler.rb +348 -0
- data/lib/solarwinds_apm/sampling/sampler.rb +197 -0
- data/lib/solarwinds_apm/sampling/sampling_constants.rb +127 -0
- data/lib/solarwinds_apm/sampling/sampling_patch.rb +49 -0
- data/lib/solarwinds_apm/sampling/setting_example.txt +1 -0
- data/lib/solarwinds_apm/{noop/context.rb → sampling/settings.rb} +14 -25
- data/lib/solarwinds_apm/sampling/token_bucket.rb +126 -0
- data/lib/solarwinds_apm/sampling/trace_options.rb +100 -0
- data/lib/solarwinds_apm/{patch.rb → sampling.rb} +20 -4
- data/lib/solarwinds_apm/{noop/span.rb → support/aws_resource_detector.rb} +5 -18
- data/lib/solarwinds_apm/support/logger_formatter.rb +1 -1
- data/lib/solarwinds_apm/support/logging_log_event.rb +1 -1
- data/lib/solarwinds_apm/support/lumberjack_formatter.rb +1 -1
- data/lib/solarwinds_apm/support/otlp_endpoint.rb +99 -0
- data/lib/solarwinds_apm/support/resource_detector/aws/beanstalk.rb +51 -0
- data/lib/solarwinds_apm/support/resource_detector/aws/ec2.rb +145 -0
- data/lib/solarwinds_apm/support/resource_detector/aws/ecs.rb +173 -0
- data/lib/solarwinds_apm/support/resource_detector/aws/eks.rb +174 -0
- data/lib/solarwinds_apm/support/resource_detector/aws/lambda.rb +66 -0
- data/lib/solarwinds_apm/support/resource_detector.rb +192 -0
- data/lib/solarwinds_apm/support/service_key_checker.rb +12 -6
- data/lib/solarwinds_apm/support/transaction_settings.rb +6 -0
- data/lib/solarwinds_apm/support/txn_name_manager.rb +54 -9
- data/lib/solarwinds_apm/support/utils.rb +9 -0
- data/lib/solarwinds_apm/support.rb +3 -4
- data/lib/solarwinds_apm/version.rb +4 -4
- data/lib/solarwinds_apm.rb +27 -73
- metadata +105 -50
- data/ext/oboe_metal/extconf.rb +0 -168
- data/ext/oboe_metal/lib/liboboe-1.0-aarch64.so.sha256 +0 -1
- data/ext/oboe_metal/lib/liboboe-1.0-alpine-aarch64.so.sha256 +0 -1
- data/ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.sha256 +0 -1
- data/ext/oboe_metal/lib/liboboe-1.0-lambda-aarch64.so.sha256 +0 -1
- data/ext/oboe_metal/lib/liboboe-1.0-lambda-x86_64.so.sha256 +0 -1
- data/ext/oboe_metal/lib/liboboe-1.0-x86_64.so.sha256 +0 -1
- data/ext/oboe_metal/src/VERSION +0 -1
- data/ext/oboe_metal/src/bson/bson.h +0 -220
- data/ext/oboe_metal/src/bson/platform_hacks.h +0 -91
- data/ext/oboe_metal/src/init_solarwinds_apm.cc +0 -18
- data/ext/oboe_metal/src/oboe.h +0 -930
- data/ext/oboe_metal/src/oboe_api.cpp +0 -793
- data/ext/oboe_metal/src/oboe_api.h +0 -621
- data/ext/oboe_metal/src/oboe_debug.h +0 -17
- data/ext/oboe_metal/src/oboe_swig_wrap.cc +0 -10954
- data/lib/oboe_metal.rb +0 -187
- data/lib/solarwinds_apm/cert/star.appoptics.com.issuer.crt +0 -24
- data/lib/solarwinds_apm/oboe_init_options.rb +0 -222
- data/lib/solarwinds_apm/opentelemetry/solarwinds_exporter.rb +0 -239
- data/lib/solarwinds_apm/opentelemetry/solarwinds_processor.rb +0 -174
- data/lib/solarwinds_apm/opentelemetry/solarwinds_sampler.rb +0 -333
- data/lib/solarwinds_apm/otel_config.rb +0 -174
- data/lib/solarwinds_apm/otel_lambda_config.rb +0 -56
- data/lib/solarwinds_apm/patch/dummy_patch.rb +0 -12
- data/lib/solarwinds_apm/support/oboe_tracing_mode.rb +0 -33
- data/lib/solarwinds_apm/support/support_report.rb +0 -99
- data/lib/solarwinds_apm/support/swomarginalia/LICENSE +0 -20
- data/lib/solarwinds_apm/support/swomarginalia/README.md +0 -46
- data/lib/solarwinds_apm/support/swomarginalia/comment.rb +0 -206
- data/lib/solarwinds_apm/support/swomarginalia/formatter.rb +0 -20
- data/lib/solarwinds_apm/support/swomarginalia/load_swomarginalia.rb +0 -55
- data/lib/solarwinds_apm/support/swomarginalia/railtie.rb +0 -24
- data/lib/solarwinds_apm/support/swomarginalia/swomarginalia.rb +0 -89
- data/lib/solarwinds_apm/support/transaction_cache.rb +0 -57
- data/lib/solarwinds_apm/support/x_trace_options.rb +0 -138
@@ -1,220 +0,0 @@
|
|
1
|
-
/* bson.h */
|
2
|
-
|
3
|
-
/* Copyright 2009, 2010 10gen Inc.
|
4
|
-
*
|
5
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
* you may not use this file except in compliance with the License.
|
7
|
-
* You may obtain a copy of the License at
|
8
|
-
*
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
*
|
11
|
-
* Unless required by applicable law or agreed to in writing, software
|
12
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
* See the License for the specific language governing permissions and
|
15
|
-
* limitations under the License.
|
16
|
-
*/
|
17
|
-
|
18
|
-
#ifndef _BSON_H_
|
19
|
-
#define _BSON_H_
|
20
|
-
|
21
|
-
#define MONGO_HAVE_STDINT
|
22
|
-
#include "platform_hacks.h"
|
23
|
-
#include <time.h>
|
24
|
-
|
25
|
-
MONGO_EXTERN_C_START
|
26
|
-
|
27
|
-
typedef enum {
|
28
|
-
oboe_bson_error=-1,
|
29
|
-
oboe_bson_eoo=0,
|
30
|
-
oboe_bson_double=1,
|
31
|
-
oboe_bson_string=2,
|
32
|
-
oboe_bson_object=3,
|
33
|
-
oboe_bson_array=4,
|
34
|
-
oboe_bson_bindata=5,
|
35
|
-
oboe_bson_undefined=6,
|
36
|
-
oboe_bson_oid=7,
|
37
|
-
oboe_bson_bool=8,
|
38
|
-
oboe_bson_date=9,
|
39
|
-
oboe_bson_null=10,
|
40
|
-
oboe_bson_regex=11,
|
41
|
-
oboe_bson_dbref=12, /* deprecated */
|
42
|
-
oboe_bson_code=13,
|
43
|
-
oboe_bson_symbol=14,
|
44
|
-
oboe_bson_codewscope=15,
|
45
|
-
oboe_bson_int = 16,
|
46
|
-
oboe_bson_timestamp = 17,
|
47
|
-
oboe_bson_long = 18
|
48
|
-
} oboe_bson_type;
|
49
|
-
|
50
|
-
typedef int oboe_bson_bool_t;
|
51
|
-
|
52
|
-
typedef struct {
|
53
|
-
char * data;
|
54
|
-
oboe_bson_bool_t owned;
|
55
|
-
} oboe_bson;
|
56
|
-
|
57
|
-
typedef struct {
|
58
|
-
const char * cur;
|
59
|
-
oboe_bson_bool_t first;
|
60
|
-
} oboe_bson_iterator;
|
61
|
-
|
62
|
-
typedef struct {
|
63
|
-
char * buf;
|
64
|
-
char * cur;
|
65
|
-
int bufSize;
|
66
|
-
oboe_bson_bool_t finished;
|
67
|
-
int stack[32];
|
68
|
-
int stackPos;
|
69
|
-
} oboe_bson_buffer;
|
70
|
-
|
71
|
-
#pragma pack(1)
|
72
|
-
typedef union{
|
73
|
-
char bytes[12]; // Flawfinder: ignore
|
74
|
-
int ints[3];
|
75
|
-
} oboe_bson_oid_t;
|
76
|
-
#pragma pack()
|
77
|
-
|
78
|
-
typedef int64_t oboe_bson_date_t; /* milliseconds since epoch UTC */
|
79
|
-
|
80
|
-
/* ----------------------------
|
81
|
-
READING
|
82
|
-
------------------------------ */
|
83
|
-
|
84
|
-
|
85
|
-
oboe_bson * oboe_bson_empty(oboe_bson * obj); /* returns pointer to static empty bson object */
|
86
|
-
int oboe_bson_copy(oboe_bson* out, const oboe_bson* in); /* puts data in new buffer. NOOP if out==NULL */
|
87
|
-
oboe_bson * oboe_bson_from_buffer(oboe_bson * b, oboe_bson_buffer * buf);
|
88
|
-
oboe_bson * oboe_bson_init( oboe_bson * b , char * data , oboe_bson_bool_t mine );
|
89
|
-
oboe_bson * oboe_bson_init_safe( oboe_bson * b , char * data , oboe_bson_bool_t mine , size_t buflen);
|
90
|
-
int oboe_bson_size(const oboe_bson * b );
|
91
|
-
void oboe_bson_destroy( oboe_bson * b );
|
92
|
-
|
93
|
-
void oboe_bson_print( oboe_bson * b );
|
94
|
-
void oboe_bson_print_raw( const char * bson , int depth );
|
95
|
-
|
96
|
-
/* advances iterator to named field */
|
97
|
-
/* returns bson_eoo (which is false) if field not found */
|
98
|
-
oboe_bson_type oboe_bson_find(oboe_bson_iterator* it, const oboe_bson* obj, const char* name);
|
99
|
-
|
100
|
-
void oboe_bson_iterator_init( oboe_bson_iterator * i , const char * bson );
|
101
|
-
|
102
|
-
/* more returns true for eoo. best to loop with bson_iterator_next(&it) */
|
103
|
-
oboe_bson_bool_t oboe_bson_iterator_more( const oboe_bson_iterator * i );
|
104
|
-
oboe_bson_type oboe_bson_iterator_next( oboe_bson_iterator * i );
|
105
|
-
|
106
|
-
oboe_bson_type oboe_bson_iterator_type( const oboe_bson_iterator * i );
|
107
|
-
const char * oboe_bson_iterator_key( const oboe_bson_iterator * i );
|
108
|
-
const char * oboe_bson_iterator_value( const oboe_bson_iterator * i );
|
109
|
-
|
110
|
-
/* these convert to the right type (return 0 if non-numeric) */
|
111
|
-
double oboe_bson_iterator_double( const oboe_bson_iterator * i );
|
112
|
-
int oboe_bson_iterator_int( const oboe_bson_iterator * i );
|
113
|
-
int64_t oboe_bson_iterator_long( const oboe_bson_iterator * i );
|
114
|
-
|
115
|
-
/* false: boolean false, 0 in any type, or null */
|
116
|
-
/* true: anything else (even empty strings and objects) */
|
117
|
-
oboe_bson_bool_t oboe_bson_iterator_bool( const oboe_bson_iterator * i );
|
118
|
-
|
119
|
-
/* these assume you are using the right type */
|
120
|
-
double oboe_bson_iterator_double_raw( const oboe_bson_iterator * i );
|
121
|
-
int oboe_bson_iterator_int_raw( const oboe_bson_iterator * i );
|
122
|
-
int64_t oboe_bson_iterator_long_raw( const oboe_bson_iterator * i );
|
123
|
-
oboe_bson_bool_t oboe_bson_iterator_bool_raw( const oboe_bson_iterator * i );
|
124
|
-
oboe_bson_oid_t* oboe_bson_iterator_oid( const oboe_bson_iterator * i );
|
125
|
-
|
126
|
-
/* these can also be used with bson_code and bson_symbol*/
|
127
|
-
const char * oboe_bson_iterator_string( const oboe_bson_iterator * i );
|
128
|
-
int oboe_bson_iterator_string_len( const oboe_bson_iterator * i );
|
129
|
-
|
130
|
-
/* works with bson_code, bson_codewscope, and bson_string */
|
131
|
-
/* returns NULL for everything else */
|
132
|
-
const char * oboe_bson_iterator_code(const oboe_bson_iterator * i);
|
133
|
-
|
134
|
-
/* calls bson_empty on scope if not a bson_codewscope */
|
135
|
-
void oboe_bson_iterator_code_scope(const oboe_bson_iterator * i, oboe_bson * scope);
|
136
|
-
|
137
|
-
/* both of these only work with bson_date */
|
138
|
-
oboe_bson_date_t oboe_bson_iterator_date(const oboe_bson_iterator * i);
|
139
|
-
time_t oboe_bson_iterator_time_t(const oboe_bson_iterator * i);
|
140
|
-
|
141
|
-
int oboe_bson_iterator_bin_len( const oboe_bson_iterator * i );
|
142
|
-
char oboe_bson_iterator_bin_type( const oboe_bson_iterator * i );
|
143
|
-
const char * oboe_bson_iterator_bin_data( const oboe_bson_iterator * i );
|
144
|
-
|
145
|
-
const char * oboe_bson_iterator_regex( const oboe_bson_iterator * i );
|
146
|
-
const char * oboe_bson_iterator_regex_opts( const oboe_bson_iterator * i );
|
147
|
-
|
148
|
-
/* these work with bson_object and bson_array */
|
149
|
-
void oboe_bson_iterator_subobject(const oboe_bson_iterator * i, oboe_bson * sub);
|
150
|
-
void oboe_bson_iterator_subiterator(const oboe_bson_iterator * i, oboe_bson_iterator * sub);
|
151
|
-
|
152
|
-
/* str must be at least 24 hex chars + null byte */
|
153
|
-
void oboe_bson_oid_from_string(oboe_bson_oid_t* oid, const char* str);
|
154
|
-
void oboe_bson_oid_to_string(const oboe_bson_oid_t* oid, char* str);
|
155
|
-
void oboe_bson_oid_gen(oboe_bson_oid_t* oid);
|
156
|
-
|
157
|
-
time_t oboe_bson_oid_generated_time(oboe_bson_oid_t* oid); /* Gives the time the OID was created */
|
158
|
-
|
159
|
-
/* ----------------------------
|
160
|
-
BUILDING
|
161
|
-
------------------------------ */
|
162
|
-
|
163
|
-
oboe_bson_buffer * oboe_bson_buffer_init( oboe_bson_buffer * b );
|
164
|
-
oboe_bson_buffer * oboe_bson_ensure_space( oboe_bson_buffer * b , const int bytesNeeded );
|
165
|
-
|
166
|
-
/**
|
167
|
-
* @return the raw data. you either should free this OR call bson_destroy not both
|
168
|
-
*/
|
169
|
-
char * oboe_bson_buffer_finish( oboe_bson_buffer * b );
|
170
|
-
void oboe_bson_buffer_destroy( oboe_bson_buffer * b );
|
171
|
-
|
172
|
-
oboe_bson_buffer * oboe_bson_append_oid( oboe_bson_buffer * b , const char * name , const oboe_bson_oid_t* oid );
|
173
|
-
oboe_bson_buffer * oboe_bson_append_int( oboe_bson_buffer * b , const char * name , const int i );
|
174
|
-
oboe_bson_buffer * oboe_bson_append_long( oboe_bson_buffer * b , const char * name , const int64_t i );
|
175
|
-
oboe_bson_buffer * oboe_bson_append_double( oboe_bson_buffer * b , const char * name , const double d );
|
176
|
-
oboe_bson_buffer * oboe_bson_append_string( oboe_bson_buffer * b , const char * name , const char * str );
|
177
|
-
oboe_bson_buffer * oboe_bson_append_symbol( oboe_bson_buffer * b , const char * name , const char * str );
|
178
|
-
oboe_bson_buffer * oboe_bson_append_code( oboe_bson_buffer * b , const char * name , const char * str );
|
179
|
-
oboe_bson_buffer * oboe_bson_append_code_w_scope( oboe_bson_buffer * b , const char * name , const char * code , const oboe_bson * scope);
|
180
|
-
oboe_bson_buffer * oboe_bson_append_binary( oboe_bson_buffer * b, const char * name, char type, const char * str, int len );
|
181
|
-
oboe_bson_buffer * oboe_bson_append_bool( oboe_bson_buffer * b , const char * name , const oboe_bson_bool_t v );
|
182
|
-
oboe_bson_buffer * oboe_bson_append_null( oboe_bson_buffer * b , const char * name );
|
183
|
-
oboe_bson_buffer * oboe_bson_append_undefined( oboe_bson_buffer * b , const char * name );
|
184
|
-
oboe_bson_buffer * oboe_bson_append_regex( oboe_bson_buffer * b , const char * name , const char * pattern, const char * opts );
|
185
|
-
oboe_bson_buffer * oboe_bson_append_bson( oboe_bson_buffer * b , const char * name , const oboe_bson* bson);
|
186
|
-
oboe_bson_buffer * oboe_bson_append_element( oboe_bson_buffer * b, const char * name_or_null, const oboe_bson_iterator* elem);
|
187
|
-
|
188
|
-
/* these both append a bson_date */
|
189
|
-
oboe_bson_buffer * oboe_bson_append_date(oboe_bson_buffer * b, const char * name, oboe_bson_date_t millis);
|
190
|
-
oboe_bson_buffer * oboe_bson_append_time_t(oboe_bson_buffer * b, const char * name, time_t secs);
|
191
|
-
|
192
|
-
oboe_bson_buffer * oboe_bson_append_start_object( oboe_bson_buffer * b , const char * name );
|
193
|
-
oboe_bson_buffer * oboe_bson_append_start_array( oboe_bson_buffer * b , const char * name );
|
194
|
-
oboe_bson_buffer * oboe_bson_append_finish_object( oboe_bson_buffer * b );
|
195
|
-
|
196
|
-
void oboe_bson_numstr(char* str, int i);
|
197
|
-
void oboe_bson_incnumstr(char* str);
|
198
|
-
|
199
|
-
|
200
|
-
/* ------------------------------
|
201
|
-
ERROR HANDLING - also used in mongo code
|
202
|
-
------------------------------ */
|
203
|
-
|
204
|
-
void * oboe_bson_malloc(int size); /* checks return value */
|
205
|
-
|
206
|
-
/* bson_err_handlers shouldn't return!!! */
|
207
|
-
typedef void(*ob_bson_err_handler)(const char* errmsg);
|
208
|
-
|
209
|
-
/* returns old handler or NULL */
|
210
|
-
/* default handler prints error then exits with failure*/
|
211
|
-
ob_bson_err_handler oboe_set_bson_err_handler(ob_bson_err_handler func);
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
/* does nothing is ok != 0 */
|
216
|
-
void oboe_bson_fatal( int ok );
|
217
|
-
int oboe_bson_fatal_msg( int ok, const char* msg );
|
218
|
-
|
219
|
-
MONGO_EXTERN_C_END
|
220
|
-
#endif
|
@@ -1,91 +0,0 @@
|
|
1
|
-
/* platform_hacks.h */
|
2
|
-
/* Copyright 2009, 2010 10gen Inc.
|
3
|
-
*
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
-
* you may not use this file except in compliance with the License.
|
6
|
-
* You may obtain a copy of the License at
|
7
|
-
*
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
-
*
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
-
* See the License for the specific language governing permissions and
|
14
|
-
* limitations under the License.
|
15
|
-
*/
|
16
|
-
|
17
|
-
|
18
|
-
/* all platform-specific ifdefs should go here */
|
19
|
-
|
20
|
-
#ifndef _PLATFORM_HACKS_H_
|
21
|
-
#define _PLATFORM_HACKS_H_
|
22
|
-
|
23
|
-
#ifdef __GNUC__
|
24
|
-
#define MONGO_INLINE static __inline__
|
25
|
-
#else
|
26
|
-
#define MONGO_INLINE static
|
27
|
-
#endif
|
28
|
-
|
29
|
-
#ifdef __cplusplus
|
30
|
-
#define MONGO_EXTERN_C_START extern "C" {
|
31
|
-
#define MONGO_EXTERN_C_END }
|
32
|
-
#else
|
33
|
-
#define MONGO_EXTERN_C_START
|
34
|
-
#define MONGO_EXTERN_C_END
|
35
|
-
#endif
|
36
|
-
|
37
|
-
|
38
|
-
#if defined(MONGO_HAVE_STDINT) || __STDC_VERSION__ >= 199901L
|
39
|
-
#include <stdint.h>
|
40
|
-
#elif defined(MONGO_HAVE_UNISTD)
|
41
|
-
#include <unistd.h>
|
42
|
-
#elif defined(MONGO_USE__INT64)
|
43
|
-
typedef __int64 int64_t;
|
44
|
-
#elif defined(MONGO_USE_LONG_LONG_INT)
|
45
|
-
typedef long long int int64_t;
|
46
|
-
#else
|
47
|
-
#error must have a 64bit int type
|
48
|
-
#endif
|
49
|
-
|
50
|
-
/* big endian is only used for OID generation. little is used everywhere else */
|
51
|
-
#ifdef MONGO_BIG_ENDIAN
|
52
|
-
#define oboe_bson_little_endian64(out, in) ( oboe_bson_swap_endian64(out, in) )
|
53
|
-
#define oboe_bson_little_endian32(out, in) ( oboe_bson_swap_endian32(out, in) )
|
54
|
-
#define oboe_bson_big_endian64(out, in) ( memmove(out, in, 8) )
|
55
|
-
#define oboe_bson_big_endian32(out, in) ( memmove(out, in, 4) )
|
56
|
-
#else
|
57
|
-
#define oboe_bson_little_endian64(out, in) ( memmove(out, in, 8) )
|
58
|
-
#define oboe_bson_little_endian32(out, in) ( memmove(out, in, 4) )
|
59
|
-
#define oboe_bson_big_endian64(out, in) ( oboe_bson_swap_endian64(out, in) )
|
60
|
-
#define oboe_bson_big_endian32(out, in) ( oboe_bson_swap_endian32(out, in) )
|
61
|
-
#endif
|
62
|
-
|
63
|
-
MONGO_EXTERN_C_START
|
64
|
-
|
65
|
-
MONGO_INLINE void oboe_bson_swap_endian64(void* outp, const void* inp){
|
66
|
-
const char *in = (const char*)inp;
|
67
|
-
char *out = (char*)outp;
|
68
|
-
|
69
|
-
out[0] = in[7];
|
70
|
-
out[1] = in[6];
|
71
|
-
out[2] = in[5];
|
72
|
-
out[3] = in[4];
|
73
|
-
out[4] = in[3];
|
74
|
-
out[5] = in[2];
|
75
|
-
out[6] = in[1];
|
76
|
-
out[7] = in[0];
|
77
|
-
|
78
|
-
}
|
79
|
-
MONGO_INLINE void oboe_bson_swap_endian32(void* outp, const void* inp){
|
80
|
-
const char *in = (const char*)inp;
|
81
|
-
char *out = (char*)outp;
|
82
|
-
|
83
|
-
out[0] = in[3];
|
84
|
-
out[1] = in[2];
|
85
|
-
out[2] = in[1];
|
86
|
-
out[3] = in[0];
|
87
|
-
}
|
88
|
-
|
89
|
-
MONGO_EXTERN_C_END
|
90
|
-
|
91
|
-
#endif
|
@@ -1,18 +0,0 @@
|
|
1
|
-
// Copyright (c) 2019 SolarWinds, LLC.
|
2
|
-
// All rights reserved.
|
3
|
-
|
4
|
-
#include <iostream>
|
5
|
-
|
6
|
-
#ifdef __cplusplus
|
7
|
-
extern "C" {
|
8
|
-
#endif
|
9
|
-
|
10
|
-
void Init_oboe_metal(void);
|
11
|
-
|
12
|
-
void Init_libsolarwinds_apm() {
|
13
|
-
Init_oboe_metal();
|
14
|
-
}
|
15
|
-
|
16
|
-
#ifdef __cplusplus
|
17
|
-
}
|
18
|
-
#endif
|