solarwinds_apm 5.0.0 → 5.1.1.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -0
  3. data/.github/workflows/build_and_release_gem.yml +23 -27
  4. data/.github/workflows/build_for_packagecloud.yml +7 -18
  5. data/.github/workflows/docker-images.yml +23 -17
  6. data/.github/workflows/run_cpluplus_tests.yml +1 -1
  7. data/.github/workflows/run_tests.yml +5 -6
  8. data/.github/workflows/scripts/test_install.rb +14 -9
  9. data/.github/workflows/test_on_4_linux.yml +3 -3
  10. data/.gitignore +5 -1
  11. data/.whitesource +22 -0
  12. data/CHANGELOG-appoptics.md +766 -0
  13. data/CHANGELOG.md +9 -753
  14. data/Gemfile +1 -0
  15. data/README.md +3 -3
  16. data/ext/oboe_metal/extconf.rb +5 -5
  17. data/ext/oboe_metal/lib/liboboe-1.0-alpine-x86_64.so.0.0.0.sha256 +1 -1
  18. data/ext/oboe_metal/lib/liboboe-1.0-x86_64.so.0.0.0.sha256 +1 -1
  19. data/ext/oboe_metal/src/README.md +1 -1
  20. data/ext/oboe_metal/src/VERSION +1 -1
  21. data/ext/oboe_metal/src/frames.h +1 -1
  22. data/ext/oboe_metal/src/init_solarwinds_apm.cc +4 -1
  23. data/ext/oboe_metal/src/logging.h +1 -1
  24. data/ext/oboe_metal/src/oboe.h +29 -45
  25. data/ext/oboe_metal/src/oboe_api.cpp +75 -26
  26. data/ext/oboe_metal/src/{oboe_api.hpp → oboe_api.h} +38 -7
  27. data/ext/oboe_metal/src/oboe_swig_wrap.cc +674 -84
  28. data/ext/oboe_metal/src/profiling.cc +1 -1
  29. data/ext/oboe_metal/src/profiling.h +1 -1
  30. data/lib/rails/generators/solarwinds_apm/templates/solarwinds_apm_initializer.rb +1 -21
  31. data/lib/solarwinds_apm/config.rb +9 -0
  32. data/lib/solarwinds_apm/inst/rack.rb +7 -1
  33. data/lib/solarwinds_apm/oboe_init_options.rb +12 -1
  34. data/lib/solarwinds_apm/support/profiling.rb +3 -0
  35. data/lib/solarwinds_apm/support.rb +1 -0
  36. data/lib/solarwinds_apm/version.rb +3 -4
  37. data/lib/solarwinds_apm.rb +1 -1
  38. data/solarwinds_apm.gemspec +6 -6
  39. metadata +13 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63fe916dcebeb8fe9c3dcb5a0ffc6e03d3f07461c4fe2e17d9890a5a3ef7d7d9
4
- data.tar.gz: 68afd25f4e027bfcb9f6766e2e858d285a67f7ecb5e34a4a59ed2f8c1b26eae1
3
+ metadata.gz: 3ae0d8d06b4f2387cf756bc56c5589eb5d751e6586f3e41574df7d10d0145176
4
+ data.tar.gz: 7e6889e2c869e4bf4e6c470bb08f6899b86490a3616cea22da32b748fff8dec8
5
5
  SHA512:
6
- metadata.gz: 6e37f758c9a3fa5a27f7a57e4f1cd41ec242d200bd30c98793a87e4ce022c92060fe9406f1ecc617a4327d7e52043b3eeeda215232c017d48f535cdae647dc4e
7
- data.tar.gz: bf4282273f84c5350034539377f898a65b99eb8e5190cbeb1d059de3584fb402aa8750cd4097c31e6f103d6341ea6ae523b6bde4c0aecda5ebe4639e208d766b
6
+ metadata.gz: 1003698002dea40e3bdad632b31354d5ad9bc638b46aa3d239c36f20df92d6730ecfa4f3a7af3d0896570e8901e9d102f0968092e3d7651e85bbdabec48f0f72
7
+ data.tar.gz: 18aa4ac8adc25f685edafeb7600cda3481419c3b8e611c4c56b2ff518a8294ca5d687e9508cb6e325c1f0cd477cd14c6b61447d1b27653269c973dc61e369345
@@ -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 files.appoptics.com and create swig wrapper
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 oboe_files_sw_apm_fetch
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
- run: |
95
- curl \
96
- -X POST \
97
- -H "Accept: application/vnd.github.v3+json" \
98
- https://api.github.com/repos/OWNER/REPO/releases \
99
- -d '{"tag_name":"${{ steps.build.outputs.gem_version }}","name":"${{ steps.build.outputs.gem_version }}","body":"SHA256 checksum: ${{ steps.build.outputs.checksum }}","draft":true}'
100
-
101
- # may need a bit of time for the gem to become available (sleep 1)
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.APPOPTICS_SERVICE_KEY }}
106
- SW_APM_COLLECTOR: ${{ secrets.APPOPTICS_COLLECTOR}}
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 --without development --without test
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: Download oboe staging files from S3, compile swig wrapper
35
+ - name: Grab current version
36
+ id: version
36
37
  run: |
37
- bundle exec rake fetch
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 Gem
40
+ - name: Build gem and publish to packagecloud
41
41
  id: gemstep
42
42
  run: |
43
- gem build solarwinds_apm.gemspec
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
- # OBOE_FROM_S3: true
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
- GHRC: ghcr.io/appoptics/appoptics-apm-ruby/apm_ruby
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: ghcr.io login
30
- uses: docker/login-action@v1
30
+ - name: Log in to the Container Registry
31
+ uses: docker/login-action@v2
31
32
  with:
32
- registry: ghcr.io
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
- # - name: Build and push V2
37
- # uses: docker/build-push-action@v2
38
- # with:
39
- # file: test/run_tests/Dockerfile_ubuntu
40
- # tags: ghcr.io/appoptics/appoptics-apm-ruby/ao_ubuntu:latest
41
- # push: true
42
-
43
- - name: Build new Docker image
44
- run: docker build -f ${{ env.DOCKERFILE }}_${{ matrix.os }} -t ${{ env.GHRC }}_${{ matrix.os }} .
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
+
@@ -29,7 +29,7 @@ jobs:
29
29
  SW_APM_REPORTER: file
30
30
  SW_APM_COLLECTOR: /tmp/sw_apm_traces.bson
31
31
  SW_APM_REPORTER_FILE_SINGLE: false
32
- OBOE_FROM_S3: true
32
+ OBOE_STAGING: true
33
33
 
34
34
  steps:
35
35
  - uses: actions/checkout@v2
@@ -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
- OBOE_FROM_S3: true
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: "--health-cmd \"mongo --quiet --eval 'quit(db.runCommand({ ping: 1 }).ok ? 0 : 2)'\" --health-interval 10s --health-timeout 5s --health-retries 5"
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:10.8
98
+ image: postgres:latest
100
99
  env:
101
- POSTGRES_DB: postgres
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
- SolarWindsAPM::Config[:profiling] = :enabled
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("install_test_profiling") do
17
- SolarWindsAPM::Profiling.run do
18
- 10.times do
19
- [9, 6, 12, 2, 7, 1, 9, 3, 4, 14, 5, 8].sort
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
- OBOE_FROM_S3: true
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:latest
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.hpp
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
+ }