solarwinds_apm 5.0.0 → 5.1.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -0
- data/.github/workflows/build_and_release_gem.yml +23 -27
- data/.github/workflows/build_for_packagecloud.yml +7 -18
- data/.github/workflows/docker-images.yml +23 -17
- data/.github/workflows/run_cpluplus_tests.yml +1 -1
- data/.github/workflows/run_tests.yml +5 -6
- data/.github/workflows/scripts/test_install.rb +14 -9
- data/.github/workflows/test_on_4_linux.yml +3 -3
- data/.gitignore +5 -1
- data/.whitesource +22 -0
- data/CHANGELOG-appoptics.md +766 -0
- data/CHANGELOG.md +9 -753
- data/Gemfile +1 -0
- data/README.md +3 -3
- data/ext/oboe_metal/extconf.rb +5 -5
- 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/README.md +1 -1
- data/ext/oboe_metal/src/VERSION +1 -1
- data/ext/oboe_metal/src/frames.h +1 -1
- data/ext/oboe_metal/src/init_solarwinds_apm.cc +4 -1
- data/ext/oboe_metal/src/logging.h +1 -1
- data/ext/oboe_metal/src/oboe.h +29 -45
- data/ext/oboe_metal/src/oboe_api.cpp +75 -26
- data/ext/oboe_metal/src/{oboe_api.hpp → oboe_api.h} +38 -7
- data/ext/oboe_metal/src/oboe_swig_wrap.cc +674 -84
- data/ext/oboe_metal/src/profiling.cc +1 -1
- data/ext/oboe_metal/src/profiling.h +1 -1
- data/lib/rails/generators/solarwinds_apm/templates/solarwinds_apm_initializer.rb +1 -21
- data/lib/solarwinds_apm/config.rb +9 -0
- data/lib/solarwinds_apm/inst/rack.rb +7 -1
- data/lib/solarwinds_apm/oboe_init_options.rb +12 -1
- data/lib/solarwinds_apm/support/profiling.rb +3 -0
- data/lib/solarwinds_apm/support.rb +1 -0
- data/lib/solarwinds_apm/version.rb +2 -3
- data/lib/solarwinds_apm.rb +1 -1
- data/solarwinds_apm.gemspec +6 -6
- metadata +13 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc766e2dd8854c2ef34e02a54d876b534ccffb22a2f8ddbd71c1060efa984a72
|
4
|
+
data.tar.gz: 65f268b9ad517a26cbd6abb13d31926be9cf1b2eaee761260a901b1635511c78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5b401413127481da97a8f846f6ac4f6a6e63ee71b1ea96dbf46ca36634f12d15c06b03aa6e334ddf1c08e8a002d1db31d8ba9d2ce538a263ee4e65b69fa8176
|
7
|
+
data.tar.gz: 2dc379d38e934170ddb1930dc2e8f2748331c07d0771c2f2323544cd632e91ed2804e2fb92dac8af07f0e12ea49c8c6af397409e3ca0bc9e1f797eceddf01edb
|
data/.github/CODEOWNERS
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @cheempz @xuan-cao-swi @tammy-baylis-swi
|
@@ -40,11 +40,11 @@ jobs:
|
|
40
40
|
./autogen.sh && ./configure && make && sudo make install
|
41
41
|
cd -
|
42
42
|
|
43
|
-
- name: Download files from
|
43
|
+
- name: Download files from cloud.solarwinds.com and create swig wrapper
|
44
44
|
env:
|
45
45
|
TRACE_BUILD_TOKEN: ${{ secrets.TRACE_BUILD_RUBY_ACTIONS_API_TOKEN }}
|
46
46
|
run: |
|
47
|
-
bundle exec rake
|
47
|
+
bundle exec rake fetch_oboe_file_from_prod
|
48
48
|
bundle exec rake oboe_verify
|
49
49
|
|
50
50
|
- name: Build Gem and upload to Rubygems
|
@@ -75,38 +75,34 @@ jobs:
|
|
75
75
|
echo "local and rubygems checksum not matching, gem needs to be yanked from rubygems.org"
|
76
76
|
exit 1
|
77
77
|
|
78
|
-
# this action is not working anymore
|
79
|
-
# - name: Create release draft that includes the checksum
|
80
|
-
# uses: actions/github-script@v3
|
81
|
-
# with:
|
82
|
-
# github-token: ${{secrets.GITHUB_TOKEN}}
|
83
|
-
# script: |
|
84
|
-
# github.repos.createRelease({
|
85
|
-
# owner: "solarwinds-apm",
|
86
|
-
# repo: "appoptics-apm-ruby",
|
87
|
-
# body: "SHA256 checksum: ${{ steps.build.outputs.checksum }}",
|
88
|
-
# tag_name: "${{ steps.build.outputs.gem_version }}",
|
89
|
-
# name: "${{ steps.build.outputs.gem_version }}",
|
90
|
-
# draft: true
|
91
|
-
# })
|
92
|
-
|
93
78
|
- name: Create release draft that includes the checksum
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
79
|
+
uses: actions/github-script@v3
|
80
|
+
with:
|
81
|
+
github-token: ${{secrets.GITHUB_TOKEN}}
|
82
|
+
script: |
|
83
|
+
github.repos.createRelease({
|
84
|
+
owner: "solarwindscloud",
|
85
|
+
repo: "solarwinds-apm-ruby",
|
86
|
+
body: "SHA256 checksum: ${{ steps.build.outputs.checksum }}",
|
87
|
+
tag_name: "${{ steps.build.outputs.gem_version }}",
|
88
|
+
name: "${{ steps.build.outputs.gem_version }}",
|
89
|
+
draft: true
|
90
|
+
})
|
91
|
+
|
92
|
+
# may need a bit of time for the gem to become available (-> sleep 1)
|
102
93
|
- name: Download new Rubygem from rubygems.org and test
|
103
94
|
working-directory: .github/workflows/
|
104
95
|
env:
|
105
|
-
SW_APM_SERVICE_KEY: ${{ secrets.
|
106
|
-
SW_APM_COLLECTOR: ${{ secrets.
|
96
|
+
SW_APM_SERVICE_KEY: ${{ secrets.SW_APM_SERVICE_KEY_PROD }}
|
97
|
+
SW_APM_COLLECTOR: ${{ secrets.SW_APM_COLLECTOR_PROD}}
|
107
98
|
run: |
|
108
99
|
sleep 1
|
109
100
|
gem install solarwinds_apm --version ${{ steps.build.outputs.gem_version }}
|
110
101
|
ruby ./scripts/test_install.rb
|
111
102
|
|
103
|
+
- name: Now also check manually if there is a trace for service 'ruby-post-release-test' in SW production
|
104
|
+
run: echo "TODO"
|
105
|
+
|
106
|
+
- name: And now the release notes need to be completed for the new release
|
107
|
+
run: echo "TODO"
|
112
108
|
|
@@ -22,7 +22,7 @@ jobs:
|
|
22
22
|
- name: Install gems
|
23
23
|
run: |
|
24
24
|
echo 'gem: --no-document' >> ~/.gemrc
|
25
|
-
bundle install
|
25
|
+
bundle install
|
26
26
|
|
27
27
|
- name: Install swig 4.0.2
|
28
28
|
run: |
|
@@ -32,26 +32,15 @@ jobs:
|
|
32
32
|
./autogen.sh && ./configure && make && sudo make install
|
33
33
|
cd -
|
34
34
|
|
35
|
-
- name:
|
35
|
+
- name: Grab current version
|
36
|
+
id: version
|
36
37
|
run: |
|
37
|
-
|
38
|
-
ls -l ext/oboe_metal/src
|
38
|
+
echo ::set-output name=gem_version::`ruby -e 'require "./lib/solarwinds_apm/version"; puts SolarWindsAPM::Version::STRING'`
|
39
39
|
|
40
|
-
- name: Build
|
40
|
+
- name: Build gem and publish to packagecloud
|
41
41
|
id: gemstep
|
42
42
|
run: |
|
43
|
-
|
44
|
-
echo `shasum -a256 *.gem`
|
45
|
-
echo "::set-output name=GEM_VERSION::`ruby -e 'require "./lib/solarwinds_apm/version"; puts SolarWindsAPM::Version::STRING'`"
|
46
|
-
cat ext/oboe_metal/src/VERSION
|
47
|
-
|
48
|
-
- name: Publish to PackageCloud
|
49
|
-
# PackageCloud is unreliable with regards to
|
50
|
-
# republishing after yanking a gem
|
51
|
-
# we are going to fail if republishing is attempted
|
52
|
-
run: |
|
53
|
-
gem install package_cloud
|
54
|
-
package_cloud push solarwinds/solarwinds-apm-ruby *.gem
|
43
|
+
bundle exec rake build_gem_push_to_packagecloud[${{ steps.version.outputs.gem_version }}]
|
55
44
|
env:
|
56
45
|
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
|
57
46
|
|
@@ -62,7 +51,7 @@ jobs:
|
|
62
51
|
# env:
|
63
52
|
# SW_APM_SERVICE_KEY: ${{ secrets.SW_APM_SERVICE_KEY }}
|
64
53
|
# SW_APM_COLLECTOR: ${{ secrets.SW_APM_COLLECTOR}}
|
65
|
-
#
|
54
|
+
# OBOE_STAGING: true
|
66
55
|
# run: |
|
67
56
|
# sleep 60
|
68
57
|
# gem sources --add https://packagecloud.io/solarwinds/solarwinds-apm-ruby
|
@@ -8,7 +8,8 @@ on:
|
|
8
8
|
workflow_dispatch:
|
9
9
|
|
10
10
|
env:
|
11
|
-
|
11
|
+
REGISTRY: ghcr.io
|
12
|
+
IMAGE_NAME: ${{ github.repository }}/apm_ruby
|
12
13
|
DOCKERFILE: test/run_tests/Dockerfile
|
13
14
|
|
14
15
|
jobs:
|
@@ -23,25 +24,30 @@ jobs:
|
|
23
24
|
os: [ubuntu, debian, centos, alpine]
|
24
25
|
|
25
26
|
steps:
|
26
|
-
- name: Checkout
|
27
|
+
- name: Checkout ${{ github.ref }}
|
27
28
|
uses: actions/checkout@v1
|
28
29
|
|
29
|
-
- name:
|
30
|
-
uses: docker/login-action@
|
30
|
+
- name: Log in to the Container Registry
|
31
|
+
uses: docker/login-action@v2
|
31
32
|
with:
|
32
|
-
registry:
|
33
|
+
registry: ${{ env.REGISTRY }}
|
33
34
|
username: ${{ github.actor }}
|
34
35
|
password: ${{ secrets.GITHUB_TOKEN }}
|
36
|
+
|
37
|
+
- name: Extract metadata (tags, labels) for Docker
|
38
|
+
id: meta
|
39
|
+
uses: docker/metadata-action@v4
|
40
|
+
with:
|
41
|
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}_${{ matrix.os }}
|
42
|
+
flavor: |
|
43
|
+
latest=true
|
35
44
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
- name: Publish updated Docker image
|
47
|
-
run: docker push ${{ env.GHRC }}_${{ matrix.os }}
|
45
|
+
- name: Build and push Docker image
|
46
|
+
uses: docker/build-push-action@v3
|
47
|
+
with:
|
48
|
+
context: .
|
49
|
+
push: true
|
50
|
+
file: test/run_tests/Dockerfile_${{ matrix.os }}
|
51
|
+
tags: ${{ steps.meta.outputs.tags }}
|
52
|
+
labels: ${{ steps.meta.outputs.labels }}
|
53
|
+
|
@@ -23,7 +23,6 @@ jobs:
|
|
23
23
|
- frameworks
|
24
24
|
- rails70
|
25
25
|
- rails61
|
26
|
-
- rails60
|
27
26
|
- rails52
|
28
27
|
- delayed_job
|
29
28
|
- noop
|
@@ -64,7 +63,7 @@ jobs:
|
|
64
63
|
SW_APM_REPORTER: file
|
65
64
|
SW_APM_COLLECTOR: /tmp/sw_apm_traces.bson
|
66
65
|
SW_APM_REPORTER_FILE_SINGLE: false
|
67
|
-
|
66
|
+
OBOE_STAGING: true
|
68
67
|
MONGO_SERVER: "mongo"
|
69
68
|
RABBITMQ_SERVER: "rabbitmq"
|
70
69
|
MEMCACHED_SERVER: "memcached"
|
@@ -94,11 +93,12 @@ jobs:
|
|
94
93
|
image: mongo:latest
|
95
94
|
ports:
|
96
95
|
- 27017:27017
|
97
|
-
options:
|
96
|
+
options: --health-cmd "mongosh --quiet --eval 'quit(db.runCommand({ping:1}).ok ? 0:2)'" --health-interval 10s --health-timeout 5s --health-retries 5
|
98
97
|
postgres:
|
99
|
-
image: postgres:
|
98
|
+
image: postgres:latest
|
100
99
|
env:
|
101
|
-
|
100
|
+
POSTGRES_PASSWORD: "postgres"
|
101
|
+
POSTGRES_DB: test_db
|
102
102
|
ports:
|
103
103
|
- 5432:5432
|
104
104
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
@@ -129,7 +129,6 @@ jobs:
|
|
129
129
|
|
130
130
|
- name: Initialize services
|
131
131
|
run: |
|
132
|
-
export PGPASSWORD=$POSTGRES_PASSWORD; psql -c 'create database test_db;' -U postgres -h $POSTGRES_HOST
|
133
132
|
curl -SL http://download.redis.io/releases/redis-4.0.0.tar.gz | tar xzC /tmp && cd /tmp/redis-4.0.0/ && make && make install && cd -
|
134
133
|
redis-server --requirepass redis_pass --loglevel "warning" &
|
135
134
|
|
@@ -8,16 +8,21 @@
|
|
8
8
|
# - SW_APM_COLLECTOR (optional if the key is for production)
|
9
9
|
|
10
10
|
require 'solarwinds_apm'
|
11
|
+
|
12
|
+
unless SolarWindsAPM::SDK.solarwinds_ready?(10_000)
|
13
|
+
puts "aborting!!! Agent not ready after 10 seconds"
|
14
|
+
exit false
|
15
|
+
end
|
16
|
+
|
17
|
+
op = lambda { 10.times {[9, 6, 12, 2, 7, 1, 9, 3, 4, 14, 5, 8].sort} }
|
18
|
+
|
11
19
|
SolarWindsAPM.support_report
|
12
|
-
exit 1 unless SolarWindsAPM.reporter
|
13
20
|
|
14
|
-
|
21
|
+
# no profiling yet for NH, but it shouldn't choke on Profiling.run
|
22
|
+
SolarWindsAPM::Config[:profiling] = :disabled
|
15
23
|
|
16
|
-
SolarWindsAPM::SDK.start_trace("
|
17
|
-
SolarWindsAPM::Profiling.run
|
18
|
-
|
19
|
-
|
20
|
-
sleep 0.2
|
21
|
-
end
|
22
|
-
end
|
24
|
+
SolarWindsAPM::SDK.start_trace("ruby_post_release_test") do
|
25
|
+
SolarWindsAPM::Profiling.run { op.call } if defined?(SolarWindsAPM::Profiling)
|
26
|
+
op.call unless defined?(SolarWindsAPM::Profiling)
|
27
|
+
puts "Looks good!"
|
23
28
|
end
|
@@ -7,7 +7,7 @@ on:
|
|
7
7
|
push:
|
8
8
|
paths-ignore:
|
9
9
|
- 'test/run_tests/Dockerfile_*'
|
10
|
-
# Allows you to run this workflow manually from the Actions tab
|
10
|
+
# Allows you to run this workflow manually from the Actions tab
|
11
11
|
workflow_dispatch:
|
12
12
|
|
13
13
|
env:
|
@@ -85,7 +85,7 @@ jobs:
|
|
85
85
|
SW_APM_REPORTER: file
|
86
86
|
SW_APM_COLLECTOR: /tmp/sw_apm_traces.bson
|
87
87
|
SW_APM_REPORTER_FILE_SINGLE: false
|
88
|
-
|
88
|
+
OBOE_STAGING: true
|
89
89
|
MONGO_SERVER: "mongo"
|
90
90
|
RABBITMQ_SERVER: "rabbitmq"
|
91
91
|
MEMCACHED_SERVER: "memcached"
|
@@ -115,7 +115,7 @@ jobs:
|
|
115
115
|
- 5672:5672
|
116
116
|
options: --health-cmd "rabbitmqctl node_health_check" --health-interval 10s --health-timeout 5s --health-retries 5
|
117
117
|
mongo:
|
118
|
-
image: mongo:
|
118
|
+
image: mongo:5
|
119
119
|
ports:
|
120
120
|
- 27017:27017
|
121
121
|
options: "--health-cmd \"mongo --quiet --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'\" --health-interval 10s --health-timeout 5s --health-retries 5"
|
data/.gitignore
CHANGED
@@ -4,12 +4,14 @@
|
|
4
4
|
*.log
|
5
5
|
*.swp
|
6
6
|
*~
|
7
|
+
*.rdb
|
7
8
|
.*byebug*
|
8
9
|
.bundle/
|
9
10
|
.env
|
10
11
|
.irb_history
|
11
12
|
.irbrc
|
12
13
|
.ruby-version
|
14
|
+
dump.rdb
|
13
15
|
.trusted_paths/
|
14
16
|
.yardoc/
|
15
17
|
/app/
|
@@ -26,14 +28,16 @@ ext/oboe_metal/oboe_noop.so
|
|
26
28
|
ext/oboe_metal/src/bson/
|
27
29
|
ext/oboe_metal/src/oboe_api.cpp
|
28
30
|
ext/oboe_metal/src/oboe.h
|
29
|
-
ext/oboe_metal/src/oboe_api.
|
31
|
+
ext/oboe_metal/src/oboe_api.h
|
30
32
|
ext/oboe_metal/src/oboe_debug.h
|
31
33
|
ext/oboe_metal/src/oboe_swig_wrap.cc
|
32
34
|
ext/oboe_metal/src/VERSION_latest
|
33
35
|
ext/oboe_metal/test/build/
|
34
36
|
ext/oboe_metal/test/MakeFile
|
37
|
+
ext/oboe_metal/.DS_Store
|
35
38
|
gemfiles/*.lock
|
36
39
|
gemfiles/.bundle/
|
37
40
|
gemfiles/vendor*
|
38
41
|
lib/libsolarwinds_apm.so
|
39
42
|
vendor/
|
43
|
+
|
data/.whitesource
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
{
|
2
|
+
"scanSettings": {
|
3
|
+
"configMode": "AUTO",
|
4
|
+
"configExternalURL": "",
|
5
|
+
"projectToken": "",
|
6
|
+
"baseBranches": []
|
7
|
+
},
|
8
|
+
"checkRunSettings": {
|
9
|
+
"vulnerableCheckRunConclusionLevel": "failure",
|
10
|
+
"displayMode": "diff",
|
11
|
+
"useMendCheckNames": true
|
12
|
+
},
|
13
|
+
"issueSettings": {
|
14
|
+
"minSeverityLevel": "LOW",
|
15
|
+
"issueType": "DEPENDENCY"
|
16
|
+
},
|
17
|
+
"remediateSettings": {
|
18
|
+
"workflowRules": {
|
19
|
+
"enabled": true
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|