solarwinds_apm 5.1.7 → 5.1.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdd15fde05af7219d90e153f0acb28c0f075c08ad40be2d40c23b39a5c73bed3
4
- data.tar.gz: b8d021ae71f3080d68b0990a062d7d5ec36bc8df91a07bf51ff43acbb7d8b94b
3
+ metadata.gz: 38400d874e2a05decf3eb4e7691ac398dc41176bb904a72a58e38006440cee4f
4
+ data.tar.gz: 2ae5f68730f05b225293a983a13583103b1cbe02bbd906d8ad2aa4a7b074622a
5
5
  SHA512:
6
- metadata.gz: 3237df27aa4fa104f65d3b65915ae6b4a5b3fb50923658249c083ccc6a633a1da665786407aaee0e7711a9e19416ee1df14594c3257cfdc00fe3018e3f99e244
7
- data.tar.gz: e70bc08cee67c45fcaa0fbcbb22efb74d4e7752f28b017f1f6c1067cdf9a4785b189972d3f6dfce227c36fee418b28dbaa11e9608d7733762895182d118701c9
6
+ metadata.gz: 712b3ce5b8dafdf5b53c0bbec9da080a4f28ea34ed798d227a965c611b09775147f5145572c4200fef7034ca5233c2b06b58d5064ec798a162f8d7d76020d9fa
7
+ data.tar.gz: 054b79133ed377c8d47ab9ce79cdd41519c8bb9f4ef8187d397d6893f0ad3a2a6a6329d22e9e6297b44e9c09d6194b6027e4ec3c7a7ff680d1dc4bcac0371ee6
data/CHANGELOG.md CHANGED
@@ -3,6 +3,16 @@ https://github.com/solarwindscloud/solarwinds-apm-ruby/releases
3
3
 
4
4
  Dates in this file are in the format MM/DD/YYYY.
5
5
 
6
+ # solarwinds_apm 5.1.8 (05/09/2023)
7
+
8
+ This release includes the following features:
9
+
10
+ * Update latest liboboe library (12.2.0)
11
+
12
+ Pushed to Rubygems:
13
+
14
+ https://rubygems.org/gems/solarwinds_apm/versions/5.1.8
15
+
6
16
  # solarwinds_apm 5.1.7 (03/14/2023)
7
17
 
8
18
  This release includes the following features:
@@ -1 +1 @@
1
- 1cfc73a5f69a92b2abdfe973e52dcd4650fb0d224827e38dd3630c817feff0b5
1
+ 5a62c8d1bd4cb5970a1a2e20b5d6424203a783b6d5ae17bffa90f7c8cac1b49a
@@ -1 +1 @@
1
- 46e70e34f873a596e5c76f2914ea6292716dac8ff3ed5020e6599fc60dfe19d3
1
+ 0b2d8c81c9180d44206f89e01f76c4f6ae1dc49f289918b8544083afff66086c
@@ -1 +1 @@
1
- ee8eb315b1271d0586bf232e7e1a8ab28af43be3861341866fc945f3cd7c1d5c
1
+ 6443f871141df922693f30a3fbc9772d7af7341539286168e42de51073336daa
@@ -1 +1 @@
1
- e7287ff06e3ba3879838f0b460b85d8f4d2d82f1e0f36d95a4235cf42c56d36f
1
+ bc83cb241947ad798285fe152dab4f7dd135075a303b128c4d5be7dea0ef9620
@@ -1,2 +1,2 @@
1
- 12.1.0
1
+ 12.2.0
2
2
 
@@ -1,14 +1,10 @@
1
1
  /**
2
2
  * @file oboe_api.cpp - C++ liboboe wrapper primarily used via swig interfaces
3
3
  * by the python and ruby agents
4
- *
5
- * TODO: This doc is outdated
6
- * This API should follow https://github.com/tracelytics/tracelons/wiki/Instrumentation-API
7
- **/
4
+ */
8
5
 
9
6
  #include "oboe_api.h"
10
7
  #include <algorithm>
11
- /////// Metatdata ///////
12
8
 
13
9
  Metadata::Metadata(const oboe_metadata_t *md) {
14
10
  oboe_metadata_copy(this, md);
@@ -40,7 +36,7 @@ bool Metadata::isSampled() {
40
36
  return oboe_metadata_is_sampled(this);
41
37
  }
42
38
 
43
- Metadata *Metadata::fromString(std::string s) {
39
+ Metadata *Metadata::fromString(const std::string& s) {
44
40
  oboe_metadata_t md;
45
41
  oboe_metadata_init(&md);
46
42
  oboe_metadata_fromstr(&md, s.data(), s.size());
@@ -175,7 +171,7 @@ void Context::set(oboe_metadata_t *md) {
175
171
  oboe_context_set(md);
176
172
  }
177
173
 
178
- void Context::fromString(std::string s) {
174
+ void Context::fromString(const std::string& s) {
179
175
  oboe_context_set_fromstr(s.data(), s.size());
180
176
  }
181
177
 
@@ -201,7 +197,7 @@ bool Context::isSampled() {
201
197
  return oboe_context_is_sampled();
202
198
  }
203
199
 
204
- std::string Context::validateTransformServiceName(std::string service_key) {
200
+ std::string Context::validateTransformServiceName(const std::string& service_key) {
205
201
  char service_key_cpy[71 + 1 + 256] = {0}; // Flawfinder: ignore, key=71, colon=1, name<=255
206
202
  std::copy_n(service_key.begin(), std::min(service_key.size(), sizeof(service_key_cpy)), std::begin(service_key_cpy));
207
203
  int len = strlen(service_key_cpy); // Flawfinder: ignore
@@ -226,20 +222,10 @@ bool Context::isLambda() {
226
222
  return (bool) oboe_is_lambda();
227
223
  }
228
224
 
229
- /**
230
- * Create a new event object that continues the trace context.
231
- *
232
- * NOTE: The returned object must be "delete"d.
233
- */
234
225
  Event *Context::createEvent() {
235
226
  return new Event(Context::get());
236
227
  }
237
228
 
238
- /**
239
- * Create a new event object with a new trace context.
240
- *
241
- * NOTE: The returned object must be "delete"d.
242
- */
243
229
  Event *Context::startTrace() {
244
230
  oboe_metadata_t *md = Context::get();
245
231
  oboe_metadata_random(md);
@@ -253,34 +239,36 @@ Event* Context::createEntry(const oboe_metadata_t *md, int64_t timestamp, const
253
239
  * we need to set the thread local metadata the same task id as input parameter md but a different op_id.
254
240
  */
255
241
  auto thread_local_md = Context::get();
242
+ // set the thread_local_md to md to fulfill the same trace id requirement in Reporter::sendReport & oboe_event_send
256
243
  oboe_metadata_copy(thread_local_md, md);
257
- // reset op_id to zeros
244
+ // reset op_id to zeros to fulfill the different op id requirement in Reporter::sendReport & oboe_event_send
258
245
  memset(thread_local_md->ids.op_id, 0, OBOE_MAX_OP_ID_LEN);
259
246
 
260
247
  auto event = new Event();
248
+ oboe_event_destroy(event);
261
249
  oboe_event_init(event, md, md->ids.op_id);
262
- oboe_event_add_info(event, "Label", "entry");
263
- oboe_event_add_info_int64(event, "Timestamp_u", timestamp);
264
- if (parent_md) {
265
- oboe_event_add_edge(event, parent_md);
250
+
251
+ event->addInfo("Label", std::string("entry"));
252
+ event->addInfo("Timestamp_u", timestamp);
253
+ if(parent_md) {
254
+ event->addEdge(const_cast<oboe_metadata*>(parent_md));
266
255
  }
267
256
  return event;
268
257
  }
269
258
 
270
259
  Event* Context::createEvent(int64_t timestamp) {
271
260
  auto event = new Event(Context::get());
272
- oboe_event_add_info_int64(event, "Timestamp_u", timestamp);
261
+ event->addInfo("Timestamp_u", timestamp);
273
262
  return event;
274
263
  }
275
264
 
276
265
  Event* Context::createExit(int64_t timestamp) {
277
266
  auto event = createEvent(timestamp);
278
- oboe_event_add_info(event, "Label", "exit");
267
+ event->addInfo("Label", std::string("exit"));
279
268
  return event;
280
269
  }
281
270
 
282
271
  /////// Event ///////
283
-
284
272
  Event::Event() {
285
273
  oboe_event_init(this, Context::get(), NULL);
286
274
  }
@@ -312,8 +300,8 @@ bool Event::addInfo(char *key, void *val) {
312
300
  return true;
313
301
  }
314
302
 
315
- bool Event::addInfo(char *key, const std::string &val) {
316
- return oboe_event_add_info(this, key, val.data()) == 0;
303
+ bool Event::addInfo(char *key, const std::string& val) {
304
+ return oboe_event_add_info(this, key, val.c_str()) == 0;
317
305
  }
318
306
 
319
307
  bool Event::addInfo(char *key, long val) {
@@ -373,19 +361,9 @@ bool Event::addEdge(oboe_metadata_t *md) {
373
361
  }
374
362
 
375
363
  bool Event::addHostname() {
376
- static char oboe_hostname[HOST_NAME_MAX + 1] = {'\0'}; // Flawfinder: ignore
377
-
378
- if (oboe_hostname[0] == '\0') {
379
- (void)gethostname(oboe_hostname, sizeof(oboe_hostname) - 1);
380
- if (oboe_hostname[0] == '\0') {
381
- // Something is wrong but we don't want to to report this more than
382
- // once so we'll set it to a minimal non-empty string.
383
- OBOE_DEBUG_LOG_WARNING(OBOE_MODULE_LIBOBOE, "Failed to get hostname, setting it to '?'");
384
- oboe_hostname[0] = '?';
385
- oboe_hostname[1] = '\0';
386
- }
387
- }
388
- return oboe_event_add_info(this, "Hostname", oboe_hostname) == 0;
364
+ char host[256] = {0};
365
+ gethostname(host, sizeof(host)/sizeof(char));
366
+ return oboe_event_add_info(this, "Hostname", host) == 0;
389
367
  }
390
368
 
391
369
  bool Event::addContextOpId(const oboe_metadata_t *md) {
@@ -1,13 +1,8 @@
1
1
  /**
2
- * @file oboe_api.hpp - C++ liboboe wrapper primarily for generating SWIG interfaces
3
- * and used by Ruby c++ extension for profiling
4
- *
5
- * TODO: This doc is outdated
6
- * This API should follow https://github.com/tracelytics/tracelons/wiki/Instrumentation-API
2
+ * C++ liboboe wrapper primarily for generating SWIG interfaces
7
3
  */
8
-
9
- #ifndef OBOE_API_HPP
10
- #define OBOE_API_HPP
4
+ #ifndef OBOE_API_H
5
+ #define OBOE_API_H
11
6
 
12
7
  #include <unistd.h>
13
8
  #include <cstdlib>
@@ -39,28 +34,47 @@ typedef struct frame_data {
39
34
  class Metadata : private oboe_metadata_t {
40
35
  friend class Reporter;
41
36
  friend class Context;
42
-
43
- public:
37
+ public:
44
38
  Metadata(const oboe_metadata_t *md);
45
39
  ~Metadata();
46
-
47
- // these new objects are managed by SWIG %newobject
48
40
  /**
49
- * Create a new event object using this Metadata's context.
50
- *
51
- * NOTE: The returned object must be "delete"d.
41
+ * Return an `new` C++ object
42
+ * Object ownership changed via SWIG
43
+ * SWIG managed the de-allocation using %newobject keyword
44
+ * @return Event*
52
45
  */
53
46
  Event *createEvent();
54
-
47
+ /**
48
+ * Return an `new` C++ object
49
+ * Object ownership changed via SWIG
50
+ * SWIG managed the de-allocation using %newobject keyword
51
+ * @return Metadata*
52
+ */
55
53
  Metadata *copy();
56
54
  bool isValid();
57
55
  bool isSampled();
58
-
56
+ /**
57
+ * Return an `new` C++ object
58
+ * Object ownership changed via SWIG
59
+ * SWIG managed the de-allocation using %newobject keyword
60
+ * @param sampled bool default=true
61
+ * @return Metadata*
62
+ */
59
63
  static Metadata *makeRandom(bool sampled = true);
60
- static Metadata *fromString(std::string s);
61
-
64
+ /**
65
+ * Return an `new` C++ object
66
+ * Object ownership changed via SWIG
67
+ * SWIG managed the de-allocation using %newobject keyword
68
+ * @param s std::string
69
+ * @return Metadata*
70
+ */
71
+ static Metadata *fromString(const std::string& s);
72
+ /**
73
+ * Return this pointer
74
+ * No Object ownership changed via SWIG
75
+ * @return oboe_metadata_t*
76
+ */
62
77
  oboe_metadata_t *metadata();
63
-
64
78
  #ifdef SWIGJAVA
65
79
  std::string toStr();
66
80
  #else
@@ -169,10 +183,12 @@ class Context {
169
183
  long header_timestamp = 0);
170
184
 
171
185
  /**
172
- * Get a pointer to the current context (from thread-local storage)
186
+ * Return a pointer to the current context
187
+ * Return a pointer in C++ heap
188
+ * No object ownership changed via SWIG
189
+ * @return oboe_metadata_t*
173
190
  */
174
191
  static oboe_metadata_t *get();
175
-
176
192
  /**
177
193
  * Get the current context as a printable string.
178
194
  */
@@ -189,10 +205,16 @@ class Context {
189
205
 
190
206
  /**
191
207
  * Set the current context from a string.
208
+ * @param s const std::string&
192
209
  */
193
- static void fromString(std::string s);
210
+ static void fromString(const std::string& s);
194
211
 
195
- // this new object is managed by SWIG %newobject
212
+ /**
213
+ * Return an `new` C++ object
214
+ * Object ownership changed via SWIG
215
+ * SWIG managed the de-allocation using %newobject keyword
216
+ * @return Metadata*
217
+ */
196
218
  static Metadata *copy();
197
219
 
198
220
  static void setSampledFlag();
@@ -206,7 +228,7 @@ class Context {
206
228
  /**
207
229
  * Perform validation and replacement of invalid characters on the given service key.
208
230
  */
209
- static std::string validateTransformServiceName(std::string service_key);
231
+ static std::string validateTransformServiceName(const std::string& service_key);
210
232
 
211
233
  /**
212
234
  * Shut down the Oboe library.
@@ -235,31 +257,45 @@ class Context {
235
257
  */
236
258
  static bool isLambda();
237
259
 
238
- // these new objects are managed by SWIG %newobject
239
260
  /**
240
- * Create a new event object using the thread's context.
241
- *
242
- * NOTE: The returned object must be "delete"d.
261
+ * Return an `new` C++ object
262
+ * Object ownership changed via SWIG
263
+ * SWIG managed the de-allocation using %newobject keyword
264
+ * @return Event*
243
265
  */
244
266
  static Event *createEvent();
267
+ /**
268
+ * Return an `new` C++ object
269
+ * Object ownership changed via SWIG
270
+ * SWIG managed the de-allocation using %newobject keyword
271
+ * @return Event*
272
+ */
245
273
  static Event *startTrace();
246
-
247
274
  /**
248
275
  * Create entry event with user-defined metadata and timestamp
276
+ * Return an `new` C++ object
277
+ * Object ownership changed via SWIG
278
+ * SWIG managed the de-allocation using %newobject keyword
249
279
  * @param md const oboe_metadata_t *
250
280
  * @param timestamp int64_t
251
- * @param parent_md const oboe_metadata_t *
281
+ * @param parent_md const oboe_metadata_t * default = nullptr
252
282
  * @return Event*
253
283
  */
254
284
  static Event* createEntry(const oboe_metadata_t *md, int64_t timestamp, const oboe_metadata_t *parent_md = nullptr);
255
285
  /**
256
286
  * Create an continuous event with user-defined timestamp
287
+ * Return an `new` C++ object
288
+ * Object ownership changed via SWIG
289
+ * SWIG managed the de-allocation using %newobject keyword
257
290
  * @param timestamp int64_t
258
291
  * @return Event*
259
292
  */
260
293
  static Event* createEvent(int64_t timestamp);
261
294
  /**
262
295
  * Create exit event with user-defined timestamp
296
+ * Return an `new` C++ object
297
+ * Object ownership changed via SWIG
298
+ * SWIG managed the de-allocation using %newobject keyword
263
299
  * @param timestamp int64_t
264
300
  * @return Event*
265
301
  */
@@ -280,7 +316,7 @@ class Event : private oboe_event_t {
280
316
 
281
317
  // called e.g. from Python e.addInfo("Key", None) & Ruby e.addInfo("Key", nil)
282
318
  bool addInfo(char *key, void *val);
283
- bool addInfo(char *key, const std::string &val);
319
+ bool addInfo(char *key, const std::string& val);
284
320
  bool addInfo(char *key, long val);
285
321
  bool addInfo(char *key, double val);
286
322
  bool addInfo(char *key, bool val);
@@ -296,9 +332,10 @@ class Event : private oboe_event_t {
296
332
  bool addHostname();
297
333
 
298
334
  /**
299
- * Get a new copy of this metadata.
300
- *
301
- * NOTE: The returned object must be "delete"d.
335
+ * Return an `new` C++ object
336
+ * Object ownership changed via SWIG
337
+ * SWIG managed the de-allocation using %newobject keyword
338
+ * @return Metadata*
302
339
  */
303
340
  Metadata *getMetadata();
304
341
  std::string metadataString();
@@ -325,16 +362,15 @@ class Event : private oboe_event_t {
325
362
 
326
363
  bool addSpanRef(const oboe_metadata_t *md);
327
364
  bool addProfileEdge(std::string id);
328
-
329
365
  /**
330
- * Create a new event object using the given metadata context.
331
- *
332
- * NOTE: The metadata context must be unique to the new trace.
333
- *
334
- * NOTE: The returned object must be "delete"d.
335
- *
336
- * @param md The metadata object to use when creating the new event.
337
- */
366
+ * Create a new event object using the given metadata context.
367
+ * NOTE: The metadata context must be unique to the new trace.
368
+ * Return an `new` C++ object
369
+ * Object ownership changed via SWIG
370
+ * SWIG managed the de-allocation using %newobject keyword
371
+ * @param md const oboe_metadata_t*
372
+ * @return Event*
373
+ */
338
374
  static Event *startTrace(const oboe_metadata_t *md);
339
375
  };
340
376
 
@@ -362,6 +398,9 @@ class MetricTags {
362
398
  * Please note that SWIG doesn't have the definition of
363
399
  * oboe_metric_tag_t.
364
400
  * Ruby and Python should not call this method
401
+ *
402
+ * Return tags as pointer.
403
+ * No object ownership changed via SWIG
365
404
  * @return oboe_metric_tag_t*
366
405
  */
367
406
  oboe_metric_tag_t *get() const;
@@ -459,4 +498,4 @@ class Config {
459
498
  static std::string getVersionString();
460
499
  };
461
500
 
462
- #endif // OBOE_API_HPP
501
+ #endif // OBOE_API_H
@@ -1896,6 +1896,13 @@ static VALUE mOboe_metal;
1896
1896
 
1897
1897
 
1898
1898
  #include "oboe_api.h"
1899
+ #include "oboe_debug.h"
1900
+
1901
+
1902
+ #include <stdint.h> // Use the C99 official header
1903
+
1904
+
1905
+ #include <string>
1899
1906
 
1900
1907
 
1901
1908
  #include <limits.h>
@@ -2045,12 +2052,6 @@ SWIG_FromCharPtr(const char *cptr)
2045
2052
  }
2046
2053
 
2047
2054
 
2048
- #include <stdint.h> // Use the C99 official header
2049
-
2050
-
2051
- #include <string>
2052
-
2053
-
2054
2055
  SWIGINTERNINLINE VALUE
2055
2056
  SWIG_From_bool (bool value)
2056
2057
  {
@@ -2782,7 +2783,7 @@ _wrap_Metadata_makeRandom__SWIG_1(int argc, VALUE *argv, VALUE self) {
2782
2783
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail;
2783
2784
  }
2784
2785
  result = (Metadata *)Metadata::makeRandom();
2785
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Metadata, 0 | 0 );
2786
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Metadata, SWIG_POINTER_OWN | 0 );
2786
2787
  return vresult;
2787
2788
  fail:
2788
2789
  return Qnil;
@@ -2824,7 +2825,8 @@ fail:
2824
2825
 
2825
2826
  SWIGINTERN VALUE
2826
2827
  _wrap_Metadata_fromString(int argc, VALUE *argv, VALUE self) {
2827
- std::string arg1 ;
2828
+ std::string *arg1 = 0 ;
2829
+ int res1 = SWIG_OLDOBJ ;
2828
2830
  Metadata *result = 0 ;
2829
2831
  VALUE vresult = Qnil;
2830
2832
 
@@ -2833,17 +2835,21 @@ _wrap_Metadata_fromString(int argc, VALUE *argv, VALUE self) {
2833
2835
  }
2834
2836
  {
2835
2837
  std::string *ptr = (std::string *)0;
2836
- int res = SWIG_AsPtr_std_string(argv[0], &ptr);
2837
- if (!SWIG_IsOK(res) || !ptr) {
2838
- SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Metadata::fromString", 1, argv[0] ));
2838
+ res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
2839
+ if (!SWIG_IsOK(res1)) {
2840
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Metadata::fromString", 1, argv[0] ));
2839
2841
  }
2840
- arg1 = *ptr;
2841
- if (SWIG_IsNewObj(res)) delete ptr;
2842
+ if (!ptr) {
2843
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Metadata::fromString", 1, argv[0]));
2844
+ }
2845
+ arg1 = ptr;
2842
2846
  }
2843
- result = (Metadata *)Metadata::fromString(arg1);
2847
+ result = (Metadata *)Metadata::fromString((std::string const &)*arg1);
2844
2848
  vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Metadata, SWIG_POINTER_OWN | 0 );
2849
+ if (SWIG_IsNewObj(res1)) delete arg1;
2845
2850
  return vresult;
2846
2851
  fail:
2852
+ if (SWIG_IsNewObj(res1)) delete arg1;
2847
2853
  return Qnil;
2848
2854
  }
2849
2855
 
@@ -4985,23 +4991,28 @@ fail:
4985
4991
 
4986
4992
  SWIGINTERN VALUE
4987
4993
  _wrap_Context_fromString(int argc, VALUE *argv, VALUE self) {
4988
- std::string arg1 ;
4994
+ std::string *arg1 = 0 ;
4995
+ int res1 = SWIG_OLDOBJ ;
4989
4996
 
4990
4997
  if ((argc < 1) || (argc > 1)) {
4991
4998
  rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail;
4992
4999
  }
4993
5000
  {
4994
5001
  std::string *ptr = (std::string *)0;
4995
- int res = SWIG_AsPtr_std_string(argv[0], &ptr);
4996
- if (!SWIG_IsOK(res) || !ptr) {
4997
- SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Context::fromString", 1, argv[0] ));
5002
+ res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
5003
+ if (!SWIG_IsOK(res1)) {
5004
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Context::fromString", 1, argv[0] ));
4998
5005
  }
4999
- arg1 = *ptr;
5000
- if (SWIG_IsNewObj(res)) delete ptr;
5006
+ if (!ptr) {
5007
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Context::fromString", 1, argv[0]));
5008
+ }
5009
+ arg1 = ptr;
5001
5010
  }
5002
- Context::fromString(arg1);
5011
+ Context::fromString((std::string const &)*arg1);
5012
+ if (SWIG_IsNewObj(res1)) delete arg1;
5003
5013
  return Qnil;
5004
5014
  fail:
5015
+ if (SWIG_IsNewObj(res1)) delete arg1;
5005
5016
  return Qnil;
5006
5017
  }
5007
5018
 
@@ -5080,7 +5091,8 @@ fail:
5080
5091
 
5081
5092
  SWIGINTERN VALUE
5082
5093
  _wrap_Context_validateTransformServiceName(int argc, VALUE *argv, VALUE self) {
5083
- std::string arg1 ;
5094
+ std::string *arg1 = 0 ;
5095
+ int res1 = SWIG_OLDOBJ ;
5084
5096
  std::string result;
5085
5097
  VALUE vresult = Qnil;
5086
5098
 
@@ -5089,17 +5101,21 @@ _wrap_Context_validateTransformServiceName(int argc, VALUE *argv, VALUE self) {
5089
5101
  }
5090
5102
  {
5091
5103
  std::string *ptr = (std::string *)0;
5092
- int res = SWIG_AsPtr_std_string(argv[0], &ptr);
5093
- if (!SWIG_IsOK(res) || !ptr) {
5094
- SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Context::validateTransformServiceName", 1, argv[0] ));
5104
+ res1 = SWIG_AsPtr_std_string(argv[0], &ptr);
5105
+ if (!SWIG_IsOK(res1)) {
5106
+ SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "std::string const &","Context::validateTransformServiceName", 1, argv[0] ));
5095
5107
  }
5096
- arg1 = *ptr;
5097
- if (SWIG_IsNewObj(res)) delete ptr;
5108
+ if (!ptr) {
5109
+ SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "std::string const &","Context::validateTransformServiceName", 1, argv[0]));
5110
+ }
5111
+ arg1 = ptr;
5098
5112
  }
5099
- result = Context::validateTransformServiceName(arg1);
5113
+ result = Context::validateTransformServiceName((std::string const &)*arg1);
5100
5114
  vresult = SWIG_From_std_string(static_cast< std::string >(result));
5115
+ if (SWIG_IsNewObj(res1)) delete arg1;
5101
5116
  return vresult;
5102
5117
  fail:
5118
+ if (SWIG_IsNewObj(res1)) delete arg1;
5103
5119
  return Qnil;
5104
5120
  }
5105
5121
 
@@ -5221,7 +5237,7 @@ _wrap_Context_createEntry__SWIG_0(int argc, VALUE *argv, VALUE self) {
5221
5237
  }
5222
5238
  arg3 = reinterpret_cast< oboe_metadata_t * >(argp3);
5223
5239
  result = (Event *)Context::createEntry((oboe_metadata_t const *)arg1,arg2,(oboe_metadata_t const *)arg3);
5224
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, 0 | 0 );
5240
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
5225
5241
  return vresult;
5226
5242
  fail:
5227
5243
  return Qnil;
@@ -5253,7 +5269,7 @@ _wrap_Context_createEntry__SWIG_1(int argc, VALUE *argv, VALUE self) {
5253
5269
  }
5254
5270
  arg2 = static_cast< int64_t >(val2);
5255
5271
  result = (Event *)Context::createEntry((oboe_metadata_t const *)arg1,arg2);
5256
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, 0 | 0 );
5272
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
5257
5273
  return vresult;
5258
5274
  fail:
5259
5275
  return Qnil;
@@ -5332,7 +5348,7 @@ _wrap_Context_createEvent__SWIG_1(int argc, VALUE *argv, VALUE self) {
5332
5348
  }
5333
5349
  arg1 = static_cast< int64_t >(val1);
5334
5350
  result = (Event *)Context::createEvent(arg1);
5335
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, 0 | 0 );
5351
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
5336
5352
  return vresult;
5337
5353
  fail:
5338
5354
  return Qnil;
@@ -5389,7 +5405,7 @@ _wrap_Context_createExit(int argc, VALUE *argv, VALUE self) {
5389
5405
  }
5390
5406
  arg1 = static_cast< int64_t >(val1);
5391
5407
  result = (Event *)Context::createExit(arg1);
5392
- vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, 0 | 0 );
5408
+ vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_Event, SWIG_POINTER_OWN | 0 );
5393
5409
  return vresult;
5394
5410
  fail:
5395
5411
  return Qnil;
@@ -8,7 +8,7 @@ module SolarWindsAPM
8
8
  module Version
9
9
  MAJOR = 5 # breaking,
10
10
  MINOR = 1 # feature,
11
- PATCH = 7 # fix => BFF
11
+ PATCH = 8 # fix => BFF
12
12
  PRE = nil # for pre-releases into packagecloud, set to nil for production releases into rubygems
13
13
 
14
14
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solarwinds_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.7
4
+ version: 5.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maia Engeli
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2023-04-03 00:00:00.000000000 Z
14
+ date: 2023-05-23 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json