Skip to content

Commit a3329e2

Browse files
committed
merge
2 parents c8617cf + 0595edf commit a3329e2

File tree

24 files changed

+1511
-21
lines changed

24 files changed

+1511
-21
lines changed

.github/workflows/build_and_release_gem.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ jobs:
1818
name: Build + Release Gem to RubyGems
1919
runs-on: ubuntu-latest
2020

21+
outputs:
22+
apm_ruby_version: ${{ steps.build.outputs.gem_version }}
23+
2124
steps:
2225
- uses: actions/checkout@v4
2326

@@ -82,6 +85,12 @@ jobs:
8285
draft: true
8386
})
8487
88+
- name: Upload to artifact
89+
uses: actions/upload-artifact@v4
90+
with:
91+
name: solarwinds_apm-${{ steps.build.outputs.gem_version }}.gem
92+
path: solarwinds_apm-${{ steps.build.outputs.gem_version }}.gem
93+
8594
# may need a bit of time for the gem to become available (-> sleep 1)
8695
- name: Download new Rubygem from rubygems.org and test
8796
working-directory: .github/workflows/
@@ -92,3 +101,43 @@ jobs:
92101
sudo apt-get update && sudo apt-get install -y ruby-dev g++ make
93102
gem install solarwinds_apm --version ${{ steps.build.outputs.gem_version }}
94103
ruby ./scripts/test_install.rb
104+
105+
# extract the built layer from artifacts, then scan it with reverselab
106+
reverselab_scan_gem:
107+
needs:
108+
- publish_to_ruby_gem
109+
runs-on: ubuntu-latest
110+
strategy:
111+
fail-fast: false
112+
113+
steps:
114+
- uses: actions/checkout@v4
115+
116+
- name: extract layer zip from artifacts
117+
uses: actions/download-artifact@v4
118+
with:
119+
name: solarwinds_apm-${{ env.SOLARWINDS_APM_VERSION }}.gem
120+
path: ./
121+
env:
122+
SOLARWINDS_APM_VERSION: ${{needs.publish_to_ruby_gem.outputs.apm_ruby_version}}
123+
124+
- name: Scan build artifact on the Portal
125+
id: rl-scan
126+
env:
127+
RLPORTAL_ACCESS_TOKEN: ${{ secrets.REVERSE_LAB_TOKEN }}
128+
uses: reversinglabs/gh-action-rl-scanner-cloud-only@v1
129+
with:
130+
artifact-to-scan: ./solarwinds_apm-${{ steps.SOLARWINDS_APM_VERSION }}.gem
131+
rl-verbose: true
132+
rl-portal-server: solarwinds
133+
rl-portal-org: SolarWinds
134+
rl-portal-group: SaaS-Agents-SWO
135+
rl-package-url: solarwinds-apm-ruby/apm-ruby-prod@${{ env.SOLARWINDS_APM_VERSION }}
136+
env:
137+
SOLARWINDS_APM_VERSION: ${{needs.publish_to_ruby_gem.outputs.apm_ruby_version}}
138+
139+
- name: report the scan status
140+
if: success() || failure()
141+
run: |
142+
echo "The status is: '${{ steps.rl-scan.outputs.status }}'"
143+
echo "The description is: '${{ steps.rl-scan.outputs.description }}'"

.github/workflows/build_for_github_package.yml

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ on:
77
workflow_dispatch:
88

99
jobs:
10-
build:
10+
publish_to_github_package:
1111
name: Build + Publish to Github Package
1212
runs-on: ubuntu-latest
1313

14+
outputs:
15+
apm_ruby_version: ${{ steps.version.outputs.gem_version }}
16+
1417
steps:
1518
- uses: actions/checkout@v4
1619

@@ -47,3 +50,49 @@ jobs:
4750
bundle exec rake push_gem_to_github_package[${{ steps.version.outputs.gem_version }}]
4851
env:
4952
GITHUB_SECRET_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
54+
- name: Upload to artifact
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: solarwinds_apm-${{ steps.version.outputs.gem_version }}.gem
58+
path: builds/solarwinds_apm-${{ steps.version.outputs.gem_version }}.gem
59+
60+
# extract the built layer from artifacts, then scan it with reverselab
61+
reverselab_scan_gem:
62+
needs:
63+
- publish_to_github_package
64+
runs-on: ubuntu-latest
65+
strategy:
66+
fail-fast: false
67+
68+
steps:
69+
- uses: actions/checkout@v4
70+
71+
- name: extract layer zip from artifacts
72+
uses: actions/download-artifact@v4
73+
with:
74+
name: solarwinds_apm-${{ env.SOLARWINDS_APM_VERSION }}.gem
75+
path: builds
76+
env:
77+
SOLARWINDS_APM_VERSION: ${{needs.publish_to_github_package.outputs.apm_ruby_version}}
78+
79+
- name: Scan build artifact on the Portal
80+
id: rl-scan
81+
env:
82+
RLPORTAL_ACCESS_TOKEN: ${{ secrets.REVERSE_LAB_TOKEN }}
83+
uses: reversinglabs/gh-action-rl-scanner-cloud-only@v1
84+
with:
85+
artifact-to-scan: builds/solarwinds_apm-${{ env.SOLARWINDS_APM_VERSION }}.gem
86+
rl-verbose: true
87+
rl-portal-server: solarwinds
88+
rl-portal-org: SolarWinds
89+
rl-portal-group: SaaS-Agents-SWO
90+
rl-package-url: solarwinds-apm-ruby/apm-ruby-stg@${{ env.SOLARWINDS_APM_VERSION }}
91+
env:
92+
SOLARWINDS_APM_VERSION: ${{needs.publish_to_github_package.outputs.apm_ruby_version}}
93+
94+
- name: report the scan status
95+
if: success() || failure()
96+
run: |
97+
echo "The status is: '${{ steps.rl-scan.outputs.status }}'"
98+
echo "The description is: '${{ steps.rl-scan.outputs.description }}'"

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ For the latest release info, see here:
55

66
Dates in this file are in the format MM/DD/YYYY.
77

8+
## solarwinds_apm 6.1.2 (02/28/2025)
9+
10+
This release includes the following features:
11+
12+
* `add_tracer` helper function for custom instrumentation on specific function
13+
* Added dbo integration for PostgreSQL (without prepared statement)
14+
15+
## solarwinds_apm 6.1.1 (12/09/2024)
16+
17+
This release includes the following features:
18+
19+
* Mysql2 sqlcommenting for DBO integration
20+
* Removed the marginalia support on query commenting
21+
* Added the support of after fork on forked process
22+
823
## solarwinds_apm 6.1.0 (09/18/2024)
924

1025
This release includes the following features:

CONFIGURATION.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,7 @@ SELECT * FROM SAMPLE_TABLE WHERE user_id = 1; /* traceparent=7435a9fe510ae453341
168168
#### Limitation
169169

170170
> [!NOTE]
171-
> This feature currently does not support prepared statements. Active Record by default enables prepared statements for the PostgreSQL adapter (`postgresql`), to use this feature you can explicitly disable it as shown below. Please evaluate the impact of disabling prepared statements on your system before proceeding.
172-
173-
e.g.
174-
175-
```yaml
176-
development:
177-
adapter: postgresql
178-
# ...
179-
prepared_statements: false
180-
```
171+
> This feature currently does not support prepared statements. For `mysql2` the `query` operation is supported, for `pg` the "[exec-ish](https://github.com/solarwinds/apm-ruby/blob/main/lib/solarwinds_apm/patch/tag_sql/sw_pg_patch.rb#L15)" operations like `exec` and `query` are supported.
181172
182173
### Background Jobs
183174

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ add_tracer :method_name, 'custom_span_name', { attributes: { 'any' => 'attribute
8989
For example, if you want to instrument class or instance method `create_session` inside an application controller:
9090

9191
To instrument instance method
92+
9293
```ruby
9394
class SessionsController < ApplicationController
9495
include SolarWindsAPM::API::Tracer
@@ -107,6 +108,7 @@ end
107108
```
108109

109110
To instrument class method
111+
110112
```ruby
111113
class SessionsController < ApplicationController
112114
def create

Rakefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ Rake::TestTask.new do |t|
3232
FileList['test/noop/*_test.rb'] +
3333
FileList['test/ext/*_test.rb'] +
3434
FileList['test/support/*_test.rb'] +
35-
FileList['test/sampling/*_test.rb']
35+
FileList['test/sampling/*_test.rb'] +
36+
FileList['test/support/resource_detector/aws/*_test.rb']
3637
end
3738
end
3839

@@ -298,12 +299,13 @@ task :build_gem do
298299
gemname = Dir['solarwinds_apm*.gem'].first
299300
FileUtils.mv(gemname, 'builds/')
300301

302+
built_gem = Dir['builds/solarwinds_apm*.gem']
303+
301304
puts "\n=== last 5 built gems ===\n"
302-
puts Dir['builds/solarwinds_apm*.gem']
305+
puts built_gem
303306

304307
puts "\n=== SHA256 ===\n"
305-
result = `ls -dt1 builds/solarwinds_apm-[^pre]*.gem | head -1`
306-
system("shasum -a256 #{result.strip}")
308+
system("shasum -a256 #{built_gem.first}")
307309

308310
puts "\n=== Finished ===\n"
309311
end
@@ -315,7 +317,7 @@ def find_or_build_gem(version)
315317
gem_to_push = nil
316318
if gems.empty?
317319
Rake::Task['build_gem'].execute
318-
gem_to_push = `ls -dt1 builds/solarwinds_apm-[^pre]*.gem | head -1`
320+
gem_to_push = Dir['builds/solarwinds_apm*.gem'].first
319321
else
320322
gem_to_push = gems.first
321323
end

ext/oboe_metal/src/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
15.0.3
1+
16.0.0

gemfiles/test_gems.gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,8 @@ group :development, :test do
4040
gem 'opentelemetry-metrics-sdk'
4141
gem 'opentelemetry-exporter-otlp-metrics'
4242
gem 'opentelemetry-test-helpers'
43+
44+
gem 'opentelemetry-resource-detector-azure'
45+
gem 'opentelemetry-resource-detector-container'
46+
gem 'opentelemetry-resource-detector-google_cloud_platform'
4347
end

lambda/otel/layer/Gemfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ source 'https://rubygems.org'
66
# source 'https://rubygems.pkg.github.com/solarwinds' do
77
# end
88

9-
gem 'opentelemetry-exporter-otlp', '0.29.1'
10-
gem 'opentelemetry-exporter-otlp-metrics', '0.2.1'
11-
gem 'solarwinds_apm', '6.1.1'
9+
gem 'opentelemetry-api', '1.4.0'
10+
gem 'opentelemetry-exporter-otlp', '0.30.0'
11+
gem 'opentelemetry-exporter-otlp-metrics', '0.4.0'
12+
gem 'solarwinds_apm', '6.1.2'

0 commit comments

Comments
 (0)