solarwinds_apm 5.1.4 → 5.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b56699604e8448a606d69ed23ba957622c4b70d8d2cbcf070526105f2dcff87
4
- data.tar.gz: 5b0f55643f2ea9072418c66c62a6f9ea4ca87fea74fbcec66574a341e0510c82
3
+ metadata.gz: cdd15fde05af7219d90e153f0acb28c0f075c08ad40be2d40c23b39a5c73bed3
4
+ data.tar.gz: b8d021ae71f3080d68b0990a062d7d5ec36bc8df91a07bf51ff43acbb7d8b94b
5
5
  SHA512:
6
- metadata.gz: f77f2c0e8315832f92204bc0cdd29d6588f83cbf2751f8dfac2fb0402c65091c96238f0192da4473b99a0cf5197b44a66839f7d1c58fb5521bd11ce1a96defc6
7
- data.tar.gz: 53c8e3740a5361fa4f9e403cf863f2044d821a58a7c42ac8708c859781c363b168af78e39da50b2ceeda783b752205cf0c0cb5bdf86afa7ffa4e63e80ae4dffe
6
+ metadata.gz: 3237df27aa4fa104f65d3b65915ae6b4a5b3fb50923658249c083ccc6a633a1da665786407aaee0e7711a9e19416ee1df14594c3257cfdc00fe3018e3f99e244
7
+ data.tar.gz: e70bc08cee67c45fcaa0fbcbb22efb74d4e7752f28b017f1f6c1067cdf9a4785b189972d3f6dfce227c36fee418b28dbaa11e9608d7733762895182d118701c9
data/CHANGELOG.md CHANGED
@@ -3,6 +3,29 @@ 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.7 (03/14/2023)
7
+
8
+ This release includes the following features:
9
+
10
+ * Update latest liboboe library (12.1.0)
11
+
12
+ Pushed to Rubygems:
13
+
14
+ https://rubygems.org/gems/solarwinds_apm/versions/5.1.7
15
+
16
+ # solarwinds_apm 5.1.6 (03/14/2023)
17
+
18
+ This release includes the following features:
19
+
20
+ * Update latest liboboe library (12.0.0)
21
+ * Remove centos as testing environments and include amazonlinux as alternatives of RHEL distro
22
+ * Include sanitize RemoteURL for kvs (p.s. RemoteHost is sanitized in library code)
23
+
24
+ Pushed to Rubygems:
25
+
26
+ https://rubygems.org/gems/solarwinds_apm/versions/5.1.6
27
+
28
+
6
29
  # solarwinds_apm 5.1.4 (11/23/2022)
7
30
 
8
31
  This release includes the following features:
data/README.md CHANGED
@@ -11,9 +11,9 @@ It requires an [Solarwinds] account to view metrics. Get yours,
11
11
 
12
12
  [![Gem Version](https://badge.fury.io/rb/solarwinds_apm.svg)](https://badge.fury.io/rb/solarwinds_apm)
13
13
 
14
- [![Run all Tests](https://github.com/solarwindscloud/solarwinds-apm-ruby/actions/workflows/test_on_4_linux.yml/badge.svg)](https://github.com/solarwindscloud/solarwinds-apm-ruby/actions/workflows/test_on_4_linux.yml)
14
+ [![Run All Tests](https://github.com/solarwindscloud/solarwinds-apm-ruby/actions/workflows/test_on_4_linux.yml/badge.svg)](https://github.com/solarwindscloud/solarwinds-apm-ruby/actions/workflows/test_on_4_linux.yml)
15
15
 
16
- [![C++ Tests](https://github.com/appoptics/appoptics-apm-ruby/actions/workflows/run_cpluplus_tests.yml/badge.svg)](https://github.com/appoptics/appoptics-apm-ruby/actions/workflows/run_cpluplus_tests.yml)
16
+ [![C++ Tests](https://github.com/solarwindscloud/solarwinds-apm-ruby/actions/workflows/run_cpluplus_tests.yml/badge.svg)](https://github.com/solarwindscloud/solarwinds-apm-ruby/actions/workflows/run_cpluplus_tests.yml)
17
17
 
18
18
  [comment]: <> ([![Maintainability]&#40;https://api.codeclimate.com/v1/badges/ac7f36241a23a3a82fc5/maintainability&#41;]&#40;https://codeclimate.com/github/appoptics/appoptics-apm-ruby/maintainability&#41;)
19
19
 
@@ -58,8 +58,7 @@ if File.exist?('/etc/alpine-release')
58
58
  end
59
59
  end
60
60
 
61
- ao_clib = "liboboe-1.0-#{ao_arch}.so.0.0.0"
62
- ao_clib = "liboboe-1.0-#{ao_arch}.so" if ENV['OBOE_DEV'].to_s.downcase == 'true' # for dev build only
61
+ ao_clib = "liboboe-1.0-#{ao_arch}.so"
63
62
  ao_item = File.join(ao_path, ao_clib)
64
63
  ao_checksum_file = File.join(ao_lib_dir, "#{ao_clib}.sha256")
65
64
  clib = File.join(ao_lib_dir, ao_clib)
@@ -24,7 +24,7 @@ ext_dir = File.expand_path(File.dirname(__FILE__))
24
24
  # the SolarWindsAPM libs.
25
25
  ao_lib_dir = File.join(ext_dir, 'lib')
26
26
  ao_path = '../../../oboe/factory-output'
27
- ao_clib = "liboboe-1.0-x86_64.so.0.0.0"
27
+ ao_clib = "liboboe-1.0-x86_64.so"
28
28
  ao_item = File.join(ao_path, ao_clib)
29
29
  clib = File.join(ao_lib_dir, ao_clib)
30
30
 
@@ -0,0 +1 @@
1
+ 1cfc73a5f69a92b2abdfe973e52dcd4650fb0d224827e38dd3630c817feff0b5
@@ -0,0 +1 @@
1
+ 46e70e34f873a596e5c76f2914ea6292716dac8ff3ed5020e6599fc60dfe19d3
@@ -0,0 +1 @@
1
+ ee8eb315b1271d0586bf232e7e1a8ab28af43be3861341866fc945f3cd7c1d5c
@@ -0,0 +1 @@
1
+ e7287ff06e3ba3879838f0b460b85d8f4d2d82f1e0f36d95a4235cf42c56d36f
@@ -1,2 +1,2 @@
1
- 11.1.0
1
+ 12.1.0
2
2
 
@@ -29,12 +29,6 @@ extern "C" {
29
29
  #include "bson/bson.h"
30
30
  #include "oboe_debug.h"
31
31
 
32
- /** Compile time debug logging detail level - cannot log more detailed than this. */
33
- #define OBOE_DEBUG_LEVEL OBOE_DEBUG_HIGH
34
-
35
- /** Limit for number of messages at specified level before demoting to debug MEDIUM. */
36
- #define MAX_DEBUG_MSG_COUNT 1
37
-
38
32
  /**
39
33
  * Default configuration settings update interval in seconds.
40
34
  *
@@ -85,7 +79,7 @@ extern "C" {
85
79
  /**
86
80
  * Default EC2 metadata timeout in milliseconds
87
81
  */
88
- #define OBOE_DEFAULT_EC2_METADATA_TIMEOUT 1000
82
+ #define OBOE_DEFAULT_EC2_METADATA_TIMEOUT 50
89
83
 
90
84
  #define OBOE_SAMPLE_RESOLUTION 1000000
91
85
 
@@ -750,7 +744,7 @@ int oboe_sample_is_enabled(oboe_settings_cfg_t *cfg);
750
744
  int oboe_tracing_decisions(oboe_tracing_decisions_in_t *in, oboe_tracing_decisions_out_t *out);
751
745
 
752
746
  /* Oboe configuration interface. */
753
-
747
+ #ifndef _WIN32
754
748
  /**
755
749
  * Check if the Oboe library is compatible with a given version.revision.
756
750
  *
@@ -762,7 +756,7 @@ int oboe_tracing_decisions(oboe_tracing_decisions_in_t *in, oboe_tracing_decisio
762
756
  * @return Non-zero if the Oboe library is considered compatible with the specified revision.
763
757
  */
764
758
  extern int oboe_config_check_version(int version, int revision);
765
-
759
+ #endif
766
760
  /**
767
761
  * Get the Oboe library version number.
768
762
  *
@@ -772,268 +766,6 @@ extern int oboe_config_check_version(int version, int revision);
772
766
  */
773
767
  extern int oboe_config_get_version();
774
768
 
775
- /**
776
- * Prototype for a logger call-back function.
777
- *
778
- * A logging function of this form can be added to the logger chain using
779
- * oboe_debug_log_add().
780
- *
781
- * @param context The context pointer that was registered in the call to
782
- * oboe_debug_log_add(). Use it to pass the pointer-to-self for
783
- * objects (ie. "this" in C++) or just a structure in C, May be
784
- * NULL.
785
- * @param module The module identifier as passed to oboe_debug_logger().
786
- * @param level The diagnostic detail level as passed to oboe_debug_logger().
787
- * @param source_name Name of the source file as passed to oboe_debug_logger().
788
- * @param source_lineno Number of the line in the source file where message is
789
- * logged from as passed to oboe_debug_logger().
790
- * @param msg The formatted message produced from the format string and its
791
- * arguments as passed to oboe_debug_logger().
792
- */
793
- typedef void (*OboeDebugLoggerFcn)(void *context, int module, int level, const char *source_name, int source_lineno, const char *msg);
794
-
795
- /**
796
- * Get a printable name for a diagnostics logging level.
797
- */
798
- extern const char *oboe_debug_log_level_name(int level);
799
-
800
- /**
801
- * Get a printable name for a diagnostics logging module identifier.
802
- */
803
- extern const char *oboe_debug_module_name(int module);
804
-
805
- /**
806
- * Get the maximum logging detail level for a module or for all modules.
807
- *
808
- * This level applies to the stderr logger only. Added loggers get all messages
809
- * below their registed detail level and need to do their own module-specific
810
- * filtering.
811
- *
812
- * @param module One of the OBOE_MODULE_* values. Use OBOE_MODULE_ALL (-1) to
813
- * get the overall maximum detail level.
814
- * @return Maximum detail level value for module (or overall) where zero is the
815
- * lowest and higher values generate more detailed log messages.
816
- */
817
- extern int oboe_debug_log_level_get(int module);
818
-
819
- /**
820
- * Set the maximum logging detail level for a module or for all modules.
821
- *
822
- * This level applies to the stderr logger only. Added loggers get all messages
823
- * below their registered detail level and need to do their own module-specific
824
- * filtering.
825
- *
826
- * @param module One of the OBOE_MODULE_* values. Use OBOE_MODULE_ALL to set
827
- * the overall maximum detail level.
828
- * @param newLevel Maximum detail level value where zero is the lowest and higher
829
- * values generate more detailed log messages.
830
- */
831
- extern void oboe_debug_log_level_set(int module, int newLevel);
832
-
833
- /**
834
- * Set the output stream for the default logger.
835
- *
836
- * @param newStream A valid, open FILE* stream or NULL to disable the default logger.
837
- * @return Zero on success; otherwise an error code (normally from errno).
838
- */
839
- extern int oboe_debug_log_to_stream(FILE *newStream);
840
-
841
- /**
842
- * If we're logging to a stream, flush it.
843
- *
844
- * @return Zero on success; otherwise an error code (normally from errno).
845
- */
846
- extern int oboe_debug_log_flush();
847
-
848
- /**
849
- * Set the default logger to write to the specified file.
850
- *
851
- * A NULL or empty path name will disable the default logger.
852
- *
853
- * If the file exists then it will be opened in append mode.
854
- *
855
- * @param pathname The path name of the
856
- * @return Zero on success; otherwise an error code (normally from errno).
857
- */
858
- extern int oboe_debug_log_to_file(const char *pathname);
859
-
860
- /**
861
- * Add a logger that takes messages up to a given logging detail level.
862
- *
863
- * This adds the logger to a chain in order of the logging level. Log messages
864
- * are passed to each logger down the chain until the remaining loggers only
865
- * accept messages of a lower detail level.
866
- *
867
- * @return Zero on success, one if re-registered with the new logging level, and
868
- * otherwise a negative value to indicate an error.
869
- */
870
- extern int oboe_debug_log_add(OboeDebugLoggerFcn newLogger, void *context, int logLevel);
871
-
872
- /**
873
- * Remove a logger.
874
- *
875
- * Remove the logger from the message handling chain.
876
- *
877
- * @return Zero on success, one if it was not found, and otherwise a negative
878
- * value to indicate an error.
879
- */
880
- extern int oboe_debug_log_remove(OboeDebugLoggerFcn oldLogger, void *context);
881
-
882
- /*
883
- * Log the application's Oboe configuration.
884
- *
885
- * We use this to get a reasonable standard format between apps.
886
- *
887
- * @param module An OBOE_MODULE_* module identifier. Use zero for undefined.
888
- * @param app_name Either NULL or a pointer to a string containing a name for
889
- * the application - will prefix the log entry. Useful when multiple
890
- * apps log to the same destination.
891
- * @param trace_mode A string identifying the configured tracing mode, one of:
892
- * "enabled", "disabled", "unset", or "undef" (for invalid values)
893
- * Use the oboe_tracing_mode_to_string() function to convert from
894
- * numeric values.
895
- * @param sample_rate The configured sampling rate: -1 for unset or a
896
- * integer fraction of 1000000.
897
- * @param reporter_type String identifying the type of reporter configured:
898
- * One of 'udp' (the default), 'ssl', or 'file'.
899
- * @param reporter_args The string of comma-separated key=value settings
900
- * used to initialize the reporter.
901
- * @param extra: Either NULL or a pointer to a string to be appended to
902
- * the log message and designed to include a few other
903
- * configuration parameters of interest.
904
- */
905
- #if OBOE_DEBUG_LEVEL >= OBOE_DEBUG_INFO
906
- # define OBOE_DEBUG_LOG_CONFIG(module, app_name, trace_mode, sample_rate, reporter_type, reporter_args, extra) \
907
- { \
908
- oboe_debug_logger(module, OBOE_DEBUG_INFO, __FILE__, __LINE__, \
909
- "%s Oboe config: tracing=%s, sampling=%d, reporter=('%s', '%s') %s", \
910
- (app_name == NULL ? "" : app_name), \
911
- trace_mode, \
912
- sample_rate, \
913
- (reporter_type == NULL ? "?" : reporter_type), \
914
- (reporter_args == NULL ? "?" : reporter_args), \
915
- (extra == NULL ? "" : extra)); \
916
- }
917
- #else
918
- # define OBOE_DEBUG_LOG_CONFIG(module, app_name, trace_mode, sample_rate, reporter_type, reporter_args, extra) {}
919
- #endif
920
-
921
- /**
922
- * Log a fatal error.
923
- */
924
- #if OBOE_DEBUG_LEVEL >= OBOE_DEBUG_FATAL
925
- # define OBOE_DEBUG_LOG_FATAL(module, ...) \
926
- { \
927
- oboe_debug_logger(module, OBOE_DEBUG_FATAL, __FILE__, __LINE__, __VA_ARGS__); \
928
- }
929
- #else
930
- # define OBOE_DEBUG_LOG_FATAL(module, format_string, ...) {}
931
- #endif
932
-
933
- /**
934
- * Log a recoverable error.
935
- *
936
- * Each message is limited in the number of times that it will be reported at the
937
- * ERROR level after which it will be logged at the debug MEDIUM level.
938
- */
939
- #if OBOE_DEBUG_LEVEL >= OBOE_DEBUG_ERROR
940
- # define OBOE_DEBUG_LOG_ERROR(module, ...) \
941
- { \
942
- static int usage_counter = 0; \
943
- int loglev = (++usage_counter <= MAX_DEBUG_MSG_COUNT ? OBOE_DEBUG_ERROR : OBOE_DEBUG_MEDIUM); \
944
- oboe_debug_logger(module, loglev, __FILE__, __LINE__, __VA_ARGS__); \
945
- }
946
- #else
947
- # define OBOE_DEBUG_LOG_ERROR(module, format_string, ...) {}
948
- #endif
949
-
950
- /**
951
- * Log a warning.
952
- *
953
- * Each message is limited in the number of times that it will be reported at the
954
- * WARNING level after which it will be logged at the debug MEDIUM level.
955
- */
956
- #if OBOE_DEBUG_LEVEL >= OBOE_DEBUG_WARNING
957
- # define OBOE_DEBUG_LOG_WARNING(module, ...) \
958
- { \
959
- static int usage_counter = 0; \
960
- int loglev = (++usage_counter <= MAX_DEBUG_MSG_COUNT ? OBOE_DEBUG_WARNING : OBOE_DEBUG_MEDIUM); \
961
- oboe_debug_logger(module, loglev, __FILE__, __LINE__, __VA_ARGS__); \
962
- }
963
- #else
964
- # define OBOE_DEBUG_LOG_WARNING(module, format_string,...) {}
965
- #endif
966
-
967
- /**
968
- * Log an informative message.
969
- *
970
- * Each message is limited in the number of times that it will be reported at the
971
- * INFO level after which it will be logged at the debug MEDIUM level.
972
- */
973
- #if OBOE_DEBUG_LEVEL >= OBOE_DEBUG_INFO
974
- # define OBOE_DEBUG_LOG_INFO(module, ...) \
975
- { \
976
- static int usage_counter = 0; \
977
- int loglev = (++usage_counter <= MAX_DEBUG_MSG_COUNT ? OBOE_DEBUG_INFO : OBOE_DEBUG_MEDIUM); \
978
- oboe_debug_logger(module, loglev, __FILE__, __LINE__, __VA_ARGS__); \
979
- }
980
- #else
981
- # define OBOE_DEBUG_LOG_INFO(module, format_string, ...) {}
982
- #endif
983
-
984
- /**
985
- * Log a low-detail diagnostic message.
986
- */
987
- #if OBOE_DEBUG_LEVEL >= OBOE_DEBUG_LOW
988
- # define OBOE_DEBUG_LOG_LOW(module, ...) \
989
- { \
990
- oboe_debug_logger(module, OBOE_DEBUG_LOW, __FILE__, __LINE__, __VA_ARGS__); \
991
- }
992
- #else
993
- # define OBOE_DEBUG_LOG_LOW(module, format_string, ...) {}
994
- #endif
995
-
996
- /**
997
- * Log a medium-detail diagnostic message.
998
- */
999
- #if OBOE_DEBUG_LEVEL >= OBOE_DEBUG_MEDIUM
1000
- # define OBOE_DEBUG_LOG_MEDIUM(module, ...) \
1001
- { \
1002
- oboe_debug_logger(module, OBOE_DEBUG_MEDIUM, __FILE__, __LINE__, __VA_ARGS__); \
1003
- }
1004
- #else
1005
- # define OBOE_DEBUG_LOG_MEDIUM(module, ...) {}
1006
- #endif
1007
-
1008
- /**
1009
- * Log a high-detail diagnostic message.
1010
- */
1011
- #if OBOE_DEBUG_LEVEL >= OBOE_DEBUG_HIGH
1012
- # define OBOE_DEBUG_LOG_HIGH(module, ...) \
1013
- { \
1014
- oboe_debug_logger(module, OBOE_DEBUG_HIGH, __FILE__, __LINE__, __VA_ARGS__); \
1015
- }
1016
- #else
1017
- # define OBOE_DEBUG_LOG_HIGH(module, format_string, ...) {}
1018
- #endif
1019
-
1020
-
1021
- /**
1022
- * Low-level diagnostics logging function.
1023
- *
1024
- * This is normally used only by the OBOE_DEBUG_LOG_* function macros and not used directly.
1025
- *
1026
- * This function may be adapted to format and route diagnostic log messages as desired.
1027
- *
1028
- * @param module One of the numeric module identifiers defined in debug.h - used to control logging detail by module.
1029
- * @param level Diagnostic detail level of this message - used to control logging volume by detail level.
1030
- * @param source_name Name of the source file, if available, or another useful name, or NULL.
1031
- * @param source_lineno Number of the line in the source file where message is logged from, if available, or zero.
1032
- * @param format A C language printf format specification string.
1033
- * @param args A variable argument list in VA_ARG format containing arguments for each argument specifier in the format.
1034
- */
1035
- void oboe_debug_logger(int module, int level, const char *source_name, int source_lineno, const char *format, ...);
1036
-
1037
769
  /**
1038
770
  * Get the Oboe library revision number.
1039
771
  *
@@ -1133,7 +865,7 @@ int oboe_get_profiling_interval();
1133
865
  // Get server warning message
1134
866
  const char* oboe_get_server_warning();
1135
867
 
1136
- // Regex tools
868
+ // Regex tools (Deprecated)
1137
869
  void* oboe_regex_new_expression(const char* exprString);
1138
870
  void oboe_regex_delete_expression(void* expression);
1139
871
  int oboe_regex_match(const char* string, void* expression);
@@ -1144,6 +876,18 @@ oboe_internal_stats_t* oboe_get_internal_stats();
1144
876
  // Random
1145
877
  void oboe_random_bytes(uint8_t bytes[], size_t sz);
1146
878
 
879
+ // oboe logging macro
880
+ #define OBOE_DEBUG_LOG_CONFIG(module, app_name, trace_mode, sample_rate, reporter_type, reporter_args, extra) OBOE_DEBUG_LOG_CONFIG_EX(module, app_name, trace_mode, sample_rate, reporter_type, reporter_args, extra)
881
+ #define OBOE_DEBUG_LOG_FATAL(module, ...) OBOE_DEBUG_LOG_FATAL_EX(module, __VA_ARGS__)
882
+ #define OBOE_DEBUG_LOG_ERROR(module, ...) OBOE_DEBUG_LOG_ERROR_EX(module, __VA_ARGS__)
883
+ #define OBOE_DEBUG_LOG_WARNING(module, ...) OBOE_DEBUG_LOG_WARNING_EX(module, __VA_ARGS__)
884
+ #define OBOE_DEBUG_LOG_INFO(module, ...) OBOE_DEBUG_LOG_INFO_EX(module, __VA_ARGS__)
885
+ #define OBOE_DEBUG_LOG_LOW(module, ...) OBOE_DEBUG_LOG_LOW_EX(module, __VA_ARGS__)
886
+ #define OBOE_DEBUG_LOG_MEDIUM(module, ...) OBOE_DEBUG_LOG_MEDIUM_EX(module, __VA_ARGS__)
887
+ #define OBOE_DEBUG_LOG_HIGH(module, ...) OBOE_DEBUG_LOG_HIGH_EX(module, __VA_ARGS__)
888
+
889
+ void oboe_init_once();
890
+
1147
891
  #ifdef __cplusplus
1148
892
  } // extern "C"
1149
893
  #endif
@@ -530,8 +530,14 @@ MetricTags::MetricTags(size_t count) {
530
530
 
531
531
  MetricTags::~MetricTags() {
532
532
  for (size_t i = 0; i < size; i++) {
533
- delete tags[i].key; tags[i].key = nullptr;
534
- delete tags[i].value; tags[i].value = nullptr;
533
+ if (tags[i].key) {
534
+ free(tags[i].key);
535
+ tags[i].key = nullptr;
536
+ }
537
+ if (tags[i].value) {
538
+ free(tags[i].value);
539
+ tags[i].value = nullptr;
540
+ }
535
541
  }
536
542
  delete[] tags;
537
543
  }
@@ -694,7 +700,11 @@ std::string Reporter::getType() {
694
700
  /////// Config ///////
695
701
 
696
702
  bool Config::checkVersion(int version, int revision) {
703
+ #ifndef _WIN32
697
704
  return (oboe_config_check_version(version, revision) != 0);
705
+ #else
706
+ return true;
707
+ #endif
698
708
  }
699
709
 
700
710
  std::string Config::getVersionString() {