solarwinds_apm 5.1.2 → 5.1.3
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/.github/CODEOWNERS +1 -1
- data/.github/workflows/test_on_4_linux.yml +8 -60
- data/.github/workflows/test_on_ubuntu.yml +107 -0
- data/.gitignore +8 -0
- data/ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.0.0.0.sha256 +1 -1
- data/ext/oboe_metal/lib/liboboe-1.0-x86_64.so.0.0.0.sha256 +1 -1
- data/ext/oboe_metal/src/VERSION +1 -1
- data/ext/oboe_metal/src/oboe.h +2 -4
- data/ext/oboe_metal/src/oboe_api.cpp +7 -12
- data/ext/oboe_metal/src/oboe_api.h +1 -3
- data/ext/oboe_metal/src/oboe_swig_wrap.cc +3 -19
- data/lib/oboe_metal.rb +9 -0
- data/lib/solarwinds_apm/cert/star.appoptics.com.issuer.crt +24 -0
- data/lib/solarwinds_apm/oboe_init_options.rb +23 -6
- data/lib/solarwinds_apm/version.rb +1 -1
- data/solarwinds_apm.gemspec +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c274381dffd0448ab7bd8075035f550bd7374161af063c8b2eb53b1170b71dc3
|
|
4
|
+
data.tar.gz: af7a66a8329b4c357a1368793d58b2be3e5c6db2a2d56f73287645f668e0cd9b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3ce5239fa623d41cb982578c51280caf4f1c7b7e152dfd97232f7e6fbc1d0faf0453ad30ba6e2e04fbc22a0f319f2c2569c0a1b53ce3f9a4e9f4924c16d8252
|
|
7
|
+
data.tar.gz: 45b3d421e0acc5a90cdb9e61707d17e4739baf70d8ee916540b9e391c35ebd72c04b4493725358f94458c5ae0431e62f44fb5b087a08f86038bfd8b07d4ac398
|
data/.github/CODEOWNERS
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
* @cheempz @xuan-cao-swi @tammy-baylis-swi
|
|
1
|
+
* @cheempz @xuan-cao-swi @tammy-baylis-swi @solarwindscloud/apm-instrumentation
|
|
@@ -4,72 +4,20 @@
|
|
|
4
4
|
name: Run Ruby Tests on 4 Linux
|
|
5
5
|
|
|
6
6
|
on:
|
|
7
|
-
|
|
7
|
+
pull_request:
|
|
8
|
+
types:
|
|
9
|
+
- closed
|
|
8
10
|
paths-ignore:
|
|
9
11
|
- 'test/run_tests/Dockerfile_*'
|
|
10
12
|
# Allows you to run this workflow manually from the Actions tab
|
|
11
13
|
workflow_dispatch:
|
|
12
14
|
|
|
13
|
-
env:
|
|
14
|
-
GHRC: ghcr.io/appoptics/appoptics-apm-ruby/apm_ruby
|
|
15
|
-
DOCKERFILE: test/run_tests/Dockerfile
|
|
16
|
-
|
|
17
15
|
jobs:
|
|
18
|
-
|
|
19
|
-
#-------------------------------------------------------------------------------
|
|
20
|
-
# TODO: figure out how to build images first if necessary
|
|
21
|
-
#
|
|
22
|
-
# ********* this is not working because we don't have a *************
|
|
23
|
-
# ********* reference to the commit of the previous GH run *************
|
|
24
|
-
#
|
|
25
|
-
# build_images:
|
|
26
|
-
# name: Build docker images if necessary
|
|
27
|
-
# runs-on: ubuntu-latest
|
|
28
|
-
#
|
|
29
|
-
# strategy:
|
|
30
|
-
# fail-fast: true
|
|
31
|
-
# matrix:
|
|
32
|
-
# os: [ ubuntu, debian, centos, alpine ]
|
|
33
|
-
#
|
|
34
|
-
# steps:
|
|
35
|
-
# - name: Checkout
|
|
36
|
-
# uses: actions/checkout@v2
|
|
37
|
-
#
|
|
38
|
-
#
|
|
39
|
-
# ## comment out to get a debug session
|
|
40
|
-
# ## only works with ubuntu and debian, because it uses apt:
|
|
41
|
-
## - name: tmate debugging session
|
|
42
|
-
## uses: mxschmitt/action-tmate@v3
|
|
43
|
-
## with:
|
|
44
|
-
## sudo: false
|
|
45
|
-
#
|
|
46
|
-
# - name: check modified files
|
|
47
|
-
# id: check_files
|
|
48
|
-
# run: |
|
|
49
|
-
# git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep Dockerfile_
|
|
50
|
-
# echo ::set-output name=check_dockerfiles::$?
|
|
51
|
-
## git diff --name-only HEAD^ HEAD | grep [D]ockerfile_
|
|
52
|
-
## echo ::set-output name=check_dockerfiles::$?
|
|
53
|
-
#
|
|
54
|
-
# - name: ghcr.io login ... build and publish images if needed
|
|
55
|
-
# uses: docker/login-action@v1
|
|
56
|
-
# if: ${{ steps.check_files.outputs.check_dockerfiles == 0}}
|
|
57
|
-
# with:
|
|
58
|
-
# registry: ghcr.io
|
|
59
|
-
# username: ${{ github.actor }}
|
|
60
|
-
# password: ${{ secrets.GITHUB_TOKEN }}
|
|
61
|
-
#
|
|
62
|
-
# - name: Build and publish new Docker image
|
|
63
|
-
# if: ${{ steps.check_files.outputs.check_dockerfiles == 0 }}
|
|
64
|
-
# run: |
|
|
65
|
-
# docker build -f ${{ env.DOCKERFILE }}_${{ matrix.os }} -t ${{ env.GHRC }}_${{ matrix.os }} .
|
|
66
|
-
# docker push ${{ env.GHRC }}_${{ matrix.os }}
|
|
67
|
-
|
|
68
|
-
#-------------------------------------------------------------------------------
|
|
69
16
|
all_linux_test:
|
|
17
|
+
if: github.event.pull_request.merged == true
|
|
70
18
|
name: ${{ matrix.os }} - ruby ${{ matrix.ruby }}
|
|
71
19
|
runs-on: ubuntu-latest
|
|
72
|
-
#
|
|
20
|
+
# needs: build_images
|
|
73
21
|
|
|
74
22
|
strategy:
|
|
75
23
|
fail-fast: false
|
|
@@ -115,10 +63,10 @@ jobs:
|
|
|
115
63
|
- 5672:5672
|
|
116
64
|
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
|
|
117
65
|
mongo:
|
|
118
|
-
image: mongo:
|
|
66
|
+
image: mongo:6
|
|
119
67
|
ports:
|
|
120
68
|
- 27017:27017
|
|
121
|
-
options:
|
|
69
|
+
options: --health-cmd "mongosh --quiet --eval 'quit(db.runCommand({ping:1}).ok ? 0:2)'" --health-interval 10s --health-timeout 5s --health-retries 5
|
|
122
70
|
postgres:
|
|
123
71
|
image: postgres:latest
|
|
124
72
|
env:
|
|
@@ -140,7 +88,7 @@ jobs:
|
|
|
140
88
|
|
|
141
89
|
steps:
|
|
142
90
|
- name: Checkout ${{ github.ref }}
|
|
143
|
-
uses: actions/checkout@
|
|
91
|
+
uses: actions/checkout@v3
|
|
144
92
|
|
|
145
93
|
- name: print some info
|
|
146
94
|
run: |
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Copyright (c) 2021 SolarWinds, LLC.
|
|
2
|
+
# All rights reserved.
|
|
3
|
+
|
|
4
|
+
name: Run Ruby Tests on Ubuntu (Push Event)
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches-ignore:
|
|
9
|
+
- main
|
|
10
|
+
paths-ignore:
|
|
11
|
+
- 'test/run_tests/Dockerfile_*'
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
|
|
16
|
+
ubuntu_test:
|
|
17
|
+
name: ubuntu - ruby ${{ matrix.ruby }}
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
ruby: ['3.1', '3.0', '2.7', '2.6']
|
|
24
|
+
|
|
25
|
+
container:
|
|
26
|
+
image: ghcr.io/${{ github.repository }}/apm_ruby_ubuntu
|
|
27
|
+
|
|
28
|
+
env:
|
|
29
|
+
SW_APM_GEM_TEST: true
|
|
30
|
+
SW_APM_REPORTER: file
|
|
31
|
+
SW_APM_COLLECTOR: /tmp/sw_apm_traces.bson
|
|
32
|
+
SW_APM_REPORTER_FILE_SINGLE: false
|
|
33
|
+
OBOE_STAGING: true
|
|
34
|
+
MONGO_SERVER: "mongo"
|
|
35
|
+
RABBITMQ_SERVER: "rabbitmq"
|
|
36
|
+
MEMCACHED_SERVER: "memcached"
|
|
37
|
+
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
|
|
38
|
+
MYSQL_ROOT_PASSWORD: "admin"
|
|
39
|
+
MYSQL_HOST: "mysql"
|
|
40
|
+
MYSQL_DATABASE: "test_db"
|
|
41
|
+
POSTGRES_DB: "test_db"
|
|
42
|
+
DOCKER_MYSQL_PASS: "admin"
|
|
43
|
+
DOCKER_PSQL_PASS: "postgres"
|
|
44
|
+
POSTGRES_USER: "postgres"
|
|
45
|
+
POSTGRES_PASSWORD: "postgres"
|
|
46
|
+
POSTGRES_HOST: "postgres"
|
|
47
|
+
QUERY_LOG_FILE: "/tmp/sw_apm_query_logs.txt"
|
|
48
|
+
REDIS_PASSWORD: "redis_pass"
|
|
49
|
+
TEST_RUNS_TO_FILE: "true"
|
|
50
|
+
|
|
51
|
+
services:
|
|
52
|
+
memcached:
|
|
53
|
+
image: memcached:latest
|
|
54
|
+
ports:
|
|
55
|
+
- 11211:11211
|
|
56
|
+
options: --health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/udp/127.0.0.1/11211'" --health-interval 10s --health-timeout 5s --health-retries 5
|
|
57
|
+
rabbitmq:
|
|
58
|
+
image: rabbitmq:latest
|
|
59
|
+
ports:
|
|
60
|
+
- 5672:5672
|
|
61
|
+
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
|
|
62
|
+
mongo:
|
|
63
|
+
image: mongo:6
|
|
64
|
+
ports:
|
|
65
|
+
- 27017:27017
|
|
66
|
+
options: --health-cmd "mongosh --quiet --eval 'quit(db.runCommand({ping:1}).ok ? 0:2)'" --health-interval 10s --health-timeout 5s --health-retries 5
|
|
67
|
+
postgres:
|
|
68
|
+
image: postgres:latest
|
|
69
|
+
env:
|
|
70
|
+
POSTGRES_PASSWORD: "postgres"
|
|
71
|
+
POSTGRES_DB: test_db
|
|
72
|
+
ports:
|
|
73
|
+
- 5432:5432
|
|
74
|
+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
75
|
+
mysql:
|
|
76
|
+
image: mariadb:latest
|
|
77
|
+
env:
|
|
78
|
+
MYSQL_USER: user
|
|
79
|
+
MYSQL_PASSWORD: password
|
|
80
|
+
MYSQL_DATABASE: test_db
|
|
81
|
+
MYSQL_ROOT_PASSWORD: admin
|
|
82
|
+
ports:
|
|
83
|
+
- 3306:3306
|
|
84
|
+
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
|
|
85
|
+
|
|
86
|
+
steps:
|
|
87
|
+
- name: Checkout ${{ github.ref }}
|
|
88
|
+
uses: actions/checkout@v3
|
|
89
|
+
|
|
90
|
+
- name: print some info
|
|
91
|
+
run: |
|
|
92
|
+
user=`whoami`
|
|
93
|
+
pwd=`pwd`
|
|
94
|
+
echo "User: $user"
|
|
95
|
+
echo "Current dir: $pwd"
|
|
96
|
+
echo "Home dir: $HOME"
|
|
97
|
+
echo "Branch: ${GITHUB_REF#refs/*/}"
|
|
98
|
+
|
|
99
|
+
- name: ruby tests
|
|
100
|
+
run: |
|
|
101
|
+
export HOME=/root
|
|
102
|
+
export PUSH_EVENT=REGULAR_PUSH
|
|
103
|
+
test/run_tests/ruby_setup.sh
|
|
104
|
+
version=`rbenv versions --bare | grep ${{ matrix.ruby }}`
|
|
105
|
+
rbenv global $version
|
|
106
|
+
echo "testing with ruby version: $version"
|
|
107
|
+
test/run_tests/run_tests.sh -r $version
|
data/.gitignore
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
08e53f05aebb831b3bb27410ad3163e193b4e3d7dbef3ac280e799f024623d95
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
69ae267c2a31e29b1f518f9a30149e3bce1dd9a9e3a5a1c91c032f1b15ba3360
|
data/ext/oboe_metal/src/VERSION
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
11.0.0
|
|
2
2
|
|
data/ext/oboe_metal/src/oboe.h
CHANGED
|
@@ -169,7 +169,7 @@ typedef struct oboe_metric_tag {
|
|
|
169
169
|
} oboe_metric_tag_t;
|
|
170
170
|
|
|
171
171
|
typedef struct oboe_init_options {
|
|
172
|
-
int version; // the version of this structure (currently on version
|
|
172
|
+
int version; // the version of this structure (currently on version 15)
|
|
173
173
|
const char *hostname_alias; // optional hostname alias
|
|
174
174
|
int log_level; // level at which log messages will be written to log file (0-6)
|
|
175
175
|
// use LOGLEVEL_DEFAULT for default log level
|
|
@@ -182,7 +182,7 @@ typedef struct oboe_init_options {
|
|
|
182
182
|
const char *reporter; // the reporter to be used (ssl, upd, file, null, lambda)
|
|
183
183
|
const char *host; // collector endpoint (reporter=ssl), udp address (reporter=udp), or file path (reporter=file)
|
|
184
184
|
const char *service_key; // the service key
|
|
185
|
-
const char *
|
|
185
|
+
const char *certificates; // content of SSL certificates, passed to gRPC::SslCredentialsOptions() for collector connection verification
|
|
186
186
|
int buffer_size; // size of the message buffer
|
|
187
187
|
int trace_metrics; // flag indicating if trace metrics reporting should be enabled (default) or disabled
|
|
188
188
|
int histogram_precision; // the histogram precision (only for ssl)
|
|
@@ -194,8 +194,6 @@ typedef struct oboe_init_options {
|
|
|
194
194
|
const char *proxy; // HTTP proxy address and port to be used for the gRPC connection
|
|
195
195
|
int stdout_clear_nonblocking; // flag indicating if the O_NONBLOCK flag on stdout should be cleared,
|
|
196
196
|
// only used in lambda reporter (off=0, on=1, default off)
|
|
197
|
-
int is_grpc_clean_hack_enabled; // flag indicating if custom grpc clean hack enabled (default 0)
|
|
198
|
-
int mode; // depreciated; value is ignored
|
|
199
197
|
int metric_format; // flag indicating the format of metric (0 = Both; 1 = TransactionResponseTime only; 2 = ResponseTime only; default = 0)
|
|
200
198
|
} oboe_init_options_t;
|
|
201
199
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
**/
|
|
8
8
|
|
|
9
9
|
#include "oboe_api.h"
|
|
10
|
-
|
|
10
|
+
#include <algorithm>
|
|
11
11
|
/////// Metatdata ///////
|
|
12
12
|
|
|
13
13
|
Metadata::Metadata(const oboe_metadata_t *md) {
|
|
@@ -202,9 +202,8 @@ bool Context::isSampled() {
|
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
std::string Context::validateTransformServiceName(std::string service_key) {
|
|
205
|
-
char service_key_cpy[71 + 1 + 256]; // Flawfinder: ignore, key=71, colon=1, name<=255
|
|
206
|
-
|
|
207
|
-
strncpy(service_key_cpy, service_key.c_str(), sizeof(service_key_cpy) - 1); // Flawfinder: ignore
|
|
205
|
+
char service_key_cpy[71 + 1 + 256] = {0}; // Flawfinder: ignore, key=71, colon=1, name<=255
|
|
206
|
+
std::copy_n(service_key.begin(), std::min(service_key.size(), sizeof(service_key_cpy)), std::begin(service_key_cpy));
|
|
208
207
|
int len = strlen(service_key_cpy); // Flawfinder: ignore
|
|
209
208
|
int ret = oboe_validate_transform_service_name(service_key_cpy, &len);
|
|
210
209
|
|
|
@@ -591,7 +590,7 @@ Reporter::Reporter(
|
|
|
591
590
|
std::string reporter, // the reporter to be used ("ssl", "upd", "file", "null")
|
|
592
591
|
std::string host, // collector endpoint (reporter=ssl), udp address (reporter=udp), or file path (reporter=file)
|
|
593
592
|
std::string service_key, // the service key (also known as access_key)
|
|
594
|
-
std::string
|
|
593
|
+
std::string certificates, // content of SSL certificates, passed to gRPC::SslCredentialsOptions() for collector connection verification
|
|
595
594
|
|
|
596
595
|
int buffer_size, // size of the message buffer
|
|
597
596
|
int trace_metrics, // flag indicating if trace metrics reporting should be enabled (default) or disabled
|
|
@@ -604,13 +603,11 @@ Reporter::Reporter(
|
|
|
604
603
|
std::string grpc_proxy, // HTTP proxy address and port to be used for the gRPC connection
|
|
605
604
|
int stdout_clear_nonblocking, // flag indicating if the O_NONBLOCK flag on stdout should be cleared,
|
|
606
605
|
// only used in lambda reporter (off=0, on=1, default off)
|
|
607
|
-
int is_grpc_clean_hack_enabled, // flag indicating if custom grpc clean hack enabled (default 0)
|
|
608
|
-
int w3c_trace_format, // tag indicating trace id format (0 - legacy Xtrace, 1 - w3c)
|
|
609
606
|
int metric_format // flag indicating the format of metric (0 = Both; 1 = TransactionResponseTime only; 2 = ResponseTime only; default = 0)
|
|
610
607
|
) {
|
|
611
608
|
oboe_init_options_t options;
|
|
612
609
|
memset(&options, 0, sizeof(options));
|
|
613
|
-
options.version =
|
|
610
|
+
options.version = 15;
|
|
614
611
|
oboe_init_options_set_defaults(&options);
|
|
615
612
|
|
|
616
613
|
if (hostname_alias != "") {
|
|
@@ -631,8 +628,8 @@ Reporter::Reporter(
|
|
|
631
628
|
if (service_key != "") {
|
|
632
629
|
options.service_key = service_key.c_str();
|
|
633
630
|
}
|
|
634
|
-
if (
|
|
635
|
-
options.
|
|
631
|
+
if (certificates != "") {
|
|
632
|
+
options.certificates = certificates.c_str();
|
|
636
633
|
}
|
|
637
634
|
options.buffer_size = buffer_size;
|
|
638
635
|
options.trace_metrics = trace_metrics;
|
|
@@ -645,8 +642,6 @@ Reporter::Reporter(
|
|
|
645
642
|
options.proxy = grpc_proxy.c_str();
|
|
646
643
|
}
|
|
647
644
|
options.stdout_clear_nonblocking = stdout_clear_nonblocking;
|
|
648
|
-
options.is_grpc_clean_hack_enabled = is_grpc_clean_hack_enabled;
|
|
649
|
-
options.mode = w3c_trace_format;
|
|
650
645
|
options.metric_format = metric_format;
|
|
651
646
|
init_status = oboe_init(&options);
|
|
652
647
|
}
|
|
@@ -411,7 +411,7 @@ class Reporter : private oboe_reporter_t {
|
|
|
411
411
|
std::string reporter, // the reporter to be used ("ssl", "upd", "file", "null")
|
|
412
412
|
std::string host, // collector endpoint (reporter=ssl), udp address (reporter=udp), or file path (reporter=file)
|
|
413
413
|
std::string service_key, // the service key (also known as access_key)
|
|
414
|
-
std::string
|
|
414
|
+
std::string certificates, // content of SSL certificates, passed to gRPC::SslCredentialsOptions() for collector connection verification
|
|
415
415
|
|
|
416
416
|
int buffer_size, // size of the message buffer
|
|
417
417
|
int trace_metrics, // flag indicating if trace metrics reporting should be enabled (default) or disabled
|
|
@@ -424,8 +424,6 @@ class Reporter : private oboe_reporter_t {
|
|
|
424
424
|
std::string grpc_proxy, // HTTP proxy address and port to be used for the gRPC connection
|
|
425
425
|
int stdout_clear_nonblocking, // flag indicating if the O_NONBLOCK flag on stdout should be cleared,
|
|
426
426
|
// only used in lambda reporter (off=0, on=1, default off)
|
|
427
|
-
int is_grpc_clean_hack_enabled, // flag indicating if custom grpc clean hack enabled (default 0)
|
|
428
|
-
int w3c_trace_format, // depreciated; value is ignored
|
|
429
427
|
int metric_format // flag indicating the format of metric (0 = Both; 1 = TransactionResponseTime only; 2 = ResponseTime only; default = 0)
|
|
430
428
|
);
|
|
431
429
|
|
|
@@ -6806,8 +6806,6 @@ _wrap_new_Reporter(int argc, VALUE *argv, VALUE self) {
|
|
|
6806
6806
|
std::string arg19 ;
|
|
6807
6807
|
int arg20 ;
|
|
6808
6808
|
int arg21 ;
|
|
6809
|
-
int arg22 ;
|
|
6810
|
-
int arg23 ;
|
|
6811
6809
|
int val2 ;
|
|
6812
6810
|
int ecode2 = 0 ;
|
|
6813
6811
|
int val4 ;
|
|
@@ -6836,14 +6834,10 @@ _wrap_new_Reporter(int argc, VALUE *argv, VALUE self) {
|
|
|
6836
6834
|
int ecode20 = 0 ;
|
|
6837
6835
|
int val21 ;
|
|
6838
6836
|
int ecode21 = 0 ;
|
|
6839
|
-
int val22 ;
|
|
6840
|
-
int ecode22 = 0 ;
|
|
6841
|
-
int val23 ;
|
|
6842
|
-
int ecode23 = 0 ;
|
|
6843
6837
|
Reporter *result = 0 ;
|
|
6844
6838
|
|
|
6845
|
-
if ((argc <
|
|
6846
|
-
rb_raise(rb_eArgError, "wrong # of arguments(%d for
|
|
6839
|
+
if ((argc < 21) || (argc > 21)) {
|
|
6840
|
+
rb_raise(rb_eArgError, "wrong # of arguments(%d for 21)",argc); SWIG_fail;
|
|
6847
6841
|
}
|
|
6848
6842
|
{
|
|
6849
6843
|
std::string *ptr = (std::string *)0;
|
|
@@ -6978,17 +6972,7 @@ _wrap_new_Reporter(int argc, VALUE *argv, VALUE self) {
|
|
|
6978
6972
|
SWIG_exception_fail(SWIG_ArgError(ecode21), Ruby_Format_TypeError( "", "int","Reporter", 21, argv[20] ));
|
|
6979
6973
|
}
|
|
6980
6974
|
arg21 = static_cast< int >(val21);
|
|
6981
|
-
|
|
6982
|
-
if (!SWIG_IsOK(ecode22)) {
|
|
6983
|
-
SWIG_exception_fail(SWIG_ArgError(ecode22), Ruby_Format_TypeError( "", "int","Reporter", 22, argv[21] ));
|
|
6984
|
-
}
|
|
6985
|
-
arg22 = static_cast< int >(val22);
|
|
6986
|
-
ecode23 = SWIG_AsVal_int(argv[22], &val23);
|
|
6987
|
-
if (!SWIG_IsOK(ecode23)) {
|
|
6988
|
-
SWIG_exception_fail(SWIG_ArgError(ecode23), Ruby_Format_TypeError( "", "int","Reporter", 23, argv[22] ));
|
|
6989
|
-
}
|
|
6990
|
-
arg23 = static_cast< int >(val23);
|
|
6991
|
-
result = (Reporter *)new Reporter(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21,arg22,arg23);
|
|
6975
|
+
result = (Reporter *)new Reporter(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16,arg17,arg18,arg19,arg20,arg21);
|
|
6992
6976
|
DATA_PTR(self) = result;
|
|
6993
6977
|
return self;
|
|
6994
6978
|
fail:
|
data/lib/oboe_metal.rb
CHANGED
|
@@ -66,6 +66,15 @@ module SolarWindsAPM
|
|
|
66
66
|
File.truncate(SolarWindsAPM::OboeInitOptions.instance.host, 0)
|
|
67
67
|
end
|
|
68
68
|
|
|
69
|
+
##
|
|
70
|
+
# hard_clear_all_traces
|
|
71
|
+
#
|
|
72
|
+
# Truncates the trace output file to zero by deleting the original bson file
|
|
73
|
+
#
|
|
74
|
+
def hard_clear_all_traces
|
|
75
|
+
File.delete(SolarWindsAPM::OboeInitOptions.instance.host) if File.exist?(SolarWindsAPM::OboeInitOptions.instance.host)
|
|
76
|
+
end
|
|
77
|
+
|
|
69
78
|
##
|
|
70
79
|
# get_all_traces
|
|
71
80
|
#
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
|
2
|
+
MIID8TCCAtmgAwIBAgIJAMoDz7Npas2/MA0GCSqGSIb3DQEBCwUAMIGOMQswCQYD
|
|
3
|
+
VQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5j
|
|
4
|
+
aXNjbzEVMBMGA1UECgwMTGlicmF0byBJbmMuMRUwEwYDVQQDDAxBcHBPcHRpY3Mg
|
|
5
|
+
Q0ExJDAiBgkqhkiG9w0BCQEWFXN1cHBvcnRAYXBwb3B0aWNzLmNvbTAeFw0xNzA5
|
|
6
|
+
MTUyMjAxMzlaFw0yNzA5MTMyMjAxMzlaMIGOMQswCQYDVQQGEwJVUzETMBEGA1UE
|
|
7
|
+
CAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzEVMBMGA1UECgwM
|
|
8
|
+
TGlicmF0byBJbmMuMRUwEwYDVQQDDAxBcHBPcHRpY3MgQ0ExJDAiBgkqhkiG9w0B
|
|
9
|
+
CQEWFXN1cHBvcnRAYXBwb3B0aWNzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP
|
|
10
|
+
ADCCAQoCggEBAOxO0wsGba3iI4r3L5BMST0rAO/gGaUhpQre6nRwVTmPCnLw1bmn
|
|
11
|
+
GdiFgYv/oRRwU+VieumHSQqoOmyFrg+ajGmvUDp2WqQ0It+XhcbaHFiAp2H7+mLf
|
|
12
|
+
cUH6S43/em0WUxZHeRzRupRDyO1bX6Hh2jgxykivlFrn5HCIQD5Hx1/SaZoW9v2n
|
|
13
|
+
oATCbgFOiPW6kU/AVs4R0VBujon13HCehVelNKkazrAEBT1i6RvdOB6aQQ32seW+
|
|
14
|
+
gLV5yVWSPEJvA9ZJqad/nQ8EQUMSSlVN191WOjp4bGpkJE1svs7NmM+Oja50W56l
|
|
15
|
+
qOH5eWermr/8qWjdPlDJ+I0VkgN0UyHVuRECAwEAAaNQME4wHQYDVR0OBBYEFOuL
|
|
16
|
+
KDTFhRQXwlBRxhPqhukrNYeRMB8GA1UdIwQYMBaAFOuLKDTFhRQXwlBRxhPqhukr
|
|
17
|
+
NYeRMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAJQtH446NZhjusy6
|
|
18
|
+
iCyvmnD95ybfNPDpjHmNx5n9Y6w9n+9y1o3732HUJE+WjvbLS3h1o7wujGKMcRJn
|
|
19
|
+
7I7eTDd26ZhLvnh5/AitYjdxrtUkQDgyxwLFJKhZu0ik2vXqj0fL961/quJL8Gyp
|
|
20
|
+
hNj3Nf7WMohQMSohEmCCX2sHyZGVGYmQHs5omAtkH/NNySqmsWNcpgd3M0aPDRBZ
|
|
21
|
+
5VFreOSGKBTJnoLNqods/S9RV0by84hm3j6aQ/tMDIVE9VCJtrE6evzC0MWyVFwR
|
|
22
|
+
ftgwcxyEq5SkiR+6BCwdzAMqADV37TzXDHLjwSrMIrgLV5xZM20Kk6chxI5QAr/f
|
|
23
|
+
7tsqAxw=
|
|
24
|
+
-----END CERTIFICATE-----
|
|
@@ -33,8 +33,8 @@ module SolarWindsAPM
|
|
|
33
33
|
|
|
34
34
|
# the service key
|
|
35
35
|
@service_key = read_and_validate_service_key
|
|
36
|
-
#
|
|
37
|
-
@
|
|
36
|
+
# certificate content
|
|
37
|
+
@certificates = read_certificates
|
|
38
38
|
# size of the message buffer
|
|
39
39
|
@buffer_size = (ENV['SW_APM_BUFSIZE'] || -1).to_i
|
|
40
40
|
# flag indicating if trace metrics reporting should be enabled (default) or disabled
|
|
@@ -74,7 +74,7 @@ module SolarWindsAPM
|
|
|
74
74
|
@reporter, # 7
|
|
75
75
|
@host, # 8
|
|
76
76
|
@service_key, # 9
|
|
77
|
-
@
|
|
77
|
+
@certificates, #10
|
|
78
78
|
@buffer_size, #11
|
|
79
79
|
@trace_metrics, #12
|
|
80
80
|
@histogram_precision, #13
|
|
@@ -84,9 +84,7 @@ module SolarWindsAPM
|
|
|
84
84
|
@ec2_md_timeout, #17
|
|
85
85
|
@grpc_proxy, #18
|
|
86
86
|
0, #19 arg for lambda (no lambda for ruby yet)
|
|
87
|
-
|
|
88
|
-
1, #21 arg for trace id format to use w3c format
|
|
89
|
-
@metric_format #22
|
|
87
|
+
@metric_format #20
|
|
90
88
|
]
|
|
91
89
|
end
|
|
92
90
|
|
|
@@ -190,6 +188,25 @@ module SolarWindsAPM
|
|
|
190
188
|
proxy
|
|
191
189
|
end
|
|
192
190
|
|
|
191
|
+
def read_certificates
|
|
192
|
+
|
|
193
|
+
file = ''
|
|
194
|
+
file = "#{File.expand_path File.dirname(__FILE__)}/cert/star.appoptics.com.issuer.crt" if ENV["SW_APM_COLLECTOR"]&.include? "appoptics.com"
|
|
195
|
+
file = ENV['SW_APM_TRUSTEDPATH'] if (!ENV['SW_APM_TRUSTEDPATH'].nil? && !ENV['SW_APM_TRUSTEDPATH']&.empty?)
|
|
196
|
+
|
|
197
|
+
return String.new if file.empty?
|
|
198
|
+
|
|
199
|
+
begin
|
|
200
|
+
certificate = File.open(file,"r").read
|
|
201
|
+
rescue StandardError => e
|
|
202
|
+
SolarWindsAPM.logger.error "[solarwinds_apm/oboe_options] certificates: #{file} doesn't exist or caused by #{e.message}."
|
|
203
|
+
certificate = String.new
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
return certificate
|
|
207
|
+
|
|
208
|
+
end
|
|
209
|
+
|
|
193
210
|
def determine_the_metric_model
|
|
194
211
|
if ENV['SW_APM_COLLECTOR']&.include? "appoptics.com"
|
|
195
212
|
return 1
|
|
@@ -8,7 +8,7 @@ module SolarWindsAPM
|
|
|
8
8
|
module Version
|
|
9
9
|
MAJOR = 5 # breaking,
|
|
10
10
|
MINOR = 1 # feature,
|
|
11
|
-
PATCH =
|
|
11
|
+
PATCH = 3 # 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('.')
|
data/solarwinds_apm.gemspec
CHANGED
|
@@ -36,6 +36,7 @@ Automatic tracing and metrics for Ruby applications. Get started at cloud.solarw
|
|
|
36
36
|
'ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.0.0.0.sha256',
|
|
37
37
|
'ext/oboe_metal/lib/liboboe-1.0-x86_64.so.0.0.0.sha256'
|
|
38
38
|
]
|
|
39
|
+
s.files += ['lib/solarwinds_apm/cert/star.appoptics.com.issuer.crt']
|
|
39
40
|
s.files -= ['build_gem.sh',
|
|
40
41
|
'build_gem_upload_to_packagecloud.sh',
|
|
41
42
|
'Rakefile']
|
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.
|
|
4
|
+
version: 5.1.3
|
|
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: 2022-
|
|
14
|
+
date: 2022-11-07 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: json
|
|
@@ -70,6 +70,7 @@ files:
|
|
|
70
70
|
- ".github/workflows/scripts/test_install.rb"
|
|
71
71
|
- ".github/workflows/swig/swig-v4.0.2.tar.gz"
|
|
72
72
|
- ".github/workflows/test_on_4_linux.yml"
|
|
73
|
+
- ".github/workflows/test_on_ubuntu.yml"
|
|
73
74
|
- ".gitignore"
|
|
74
75
|
- ".rubocop.yml"
|
|
75
76
|
- ".whitesource"
|
|
@@ -129,6 +130,7 @@ files:
|
|
|
129
130
|
- lib/solarwinds_apm/api/metrics.rb
|
|
130
131
|
- lib/solarwinds_apm/api/util.rb
|
|
131
132
|
- lib/solarwinds_apm/base.rb
|
|
133
|
+
- lib/solarwinds_apm/cert/star.appoptics.com.issuer.crt
|
|
132
134
|
- lib/solarwinds_apm/config.rb
|
|
133
135
|
- lib/solarwinds_apm/frameworks/grape.rb
|
|
134
136
|
- lib/solarwinds_apm/frameworks/padrino.rb
|