instana 1.205.0 → 1.206.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +20 -9
- data/lib/instana/backend/host_agent_reporting_observer.rb +1 -1
- data/lib/instana/backend/process_info.rb +8 -0
- data/lib/instana/version.rb +1 -1
- data/sonar-project.properties +9 -0
- data/test/backend/process_info_test.rb +20 -0
- data/test/support/apps/resque/jobs/resque_error_job.rb +0 -3
- data/test/support/apps/resque/jobs/resque_fast_job.rb +0 -2
- data/test/tracing/custom_test.rb +0 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc4bc258b5a217883b3267436a0b70adaef7f270718cd2ab97fc9204c9adab76
|
4
|
+
data.tar.gz: 77e8b1317b0c6739211bee22c63cfdeb2fa4e9a44b21ec43e6ba76c55440e180
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebe6816e014418efb136c4b96c73eb186453e1324da065a5a6943c43677ae91a9816d81e2fc1896c33037b13f7958556164adecbf00f5b993787c956e9e2b2ef
|
7
|
+
data.tar.gz: b69393f258edb339153b60f980b168c585c57b364070a90cb97e119b2ed0931ebbdee913353d5761ce383c9eb6bc7eb054e0a471e7fa8b04dd6470fdcac80db0
|
data/.circleci/config.yml
CHANGED
@@ -113,6 +113,10 @@ executors:
|
|
113
113
|
commands:
|
114
114
|
setup:
|
115
115
|
steps:
|
116
|
+
- run:
|
117
|
+
name: Install iproute2
|
118
|
+
command: |
|
119
|
+
sudo apt-get install iproute2
|
116
120
|
- run:
|
117
121
|
name: Install Java
|
118
122
|
command: |
|
@@ -141,13 +145,20 @@ commands:
|
|
141
145
|
- run:
|
142
146
|
name: Run SonarQube to capture coverage
|
143
147
|
command: |
|
144
|
-
wget -O /tmp/sonar-scanner-cli.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.
|
148
|
+
wget -O /tmp/sonar-scanner-cli.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-4.6.2.2472.zip
|
145
149
|
unzip -d /tmp /tmp/sonar-scanner-cli.zip
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
150
|
+
if [[ -n "${CIRCLE_PR_NUMBER}" ]]; then
|
151
|
+
/tmp/sonar-scanner-4.6.2.2472/bin/sonar-scanner \
|
152
|
+
-Dsonar.host.url="${SONARQUBE_URL}" \
|
153
|
+
-Dsonar.login="${SONARQUBE_LOGIN}" \
|
154
|
+
-Dsonar.pullrequest.key="${CIRCLE_PR_NUMBER}" \
|
155
|
+
-Dsonar.pullrequest.branch="${CIRCLE_BRANCH}"
|
156
|
+
else
|
157
|
+
/tmp/sonar-scanner-4.6.2.2472/bin/sonar-scanner \
|
158
|
+
-Dsonar.host.url="${SONARQUBE_URL}" \
|
159
|
+
-Dsonar.login="${SONARQUBE_LOGIN}" \
|
160
|
+
-Dsonar.branch.name="${CIRCLE_BRANCH}"
|
161
|
+
fi
|
151
162
|
run_tests:
|
152
163
|
steps:
|
153
164
|
- run:
|
@@ -156,7 +167,7 @@ commands:
|
|
156
167
|
mkdir _junit
|
157
168
|
bundle exec rake
|
158
169
|
- store_test_results:
|
159
|
-
path: ~/_junit
|
170
|
+
path: ~/project/_junit
|
160
171
|
run_rubocop:
|
161
172
|
steps:
|
162
173
|
- run:
|
@@ -171,11 +182,11 @@ commands:
|
|
171
182
|
mkdir -p ~/.gem
|
172
183
|
echo -e "---\r\n:rubygems_api_key: $RUBYGEMS_API_KEY" > ~/.gem/credentials
|
173
184
|
chmod 0600 /home/circleci/.gem/credentials
|
174
|
-
- run:
|
185
|
+
- run:
|
175
186
|
name: Publish Gem
|
176
187
|
command: |
|
177
188
|
bundle exec rake release[origin]
|
178
|
-
|
189
|
+
|
179
190
|
jobs:
|
180
191
|
test_core:
|
181
192
|
parameters:
|
@@ -111,7 +111,7 @@ module Instana
|
|
111
111
|
exec_args: process.arguments,
|
112
112
|
gc: GCSnapshot.instance.report,
|
113
113
|
thread: {count: ::Thread.list.count},
|
114
|
-
memory: {rss_size:
|
114
|
+
memory: {rss_size: process.memory_used}
|
115
115
|
}
|
116
116
|
end
|
117
117
|
end
|
data/lib/instana/version.rb
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
sonar.projectKey=ruby-sensor
|
2
|
+
sonar.sources=lib
|
3
|
+
sonar.tests=test
|
4
|
+
sonar.exclusions=_junit/*
|
5
|
+
sonar.ruby.coverage.reportPaths=coverage/coverage.json
|
6
|
+
sonar.links.homepage=https://github.com/instana/ruby-sensor/
|
7
|
+
sonar.links.ci=https://circleci.com/gh/instana/ruby-sensor
|
8
|
+
sonar.links.issue=https://github.com/instana/ruby-sensor/issues
|
9
|
+
sonar.links.scm=https://github.com/instana/ruby-sensor/
|
@@ -60,4 +60,24 @@ class ProcessInfoTest < Minitest::Test
|
|
60
60
|
assert_equal subject.sched_pid, subject.parent_pid
|
61
61
|
end
|
62
62
|
end
|
63
|
+
|
64
|
+
def test_osx_memory_used
|
65
|
+
host_os = RbConfig::CONFIG['host_os']
|
66
|
+
RbConfig::CONFIG['host_os'] = 'darwin'
|
67
|
+
|
68
|
+
subject = Instana::Backend::ProcessInfo.new(OpenStruct.new(rss: 1024))
|
69
|
+
assert_equal 1, subject.memory_used
|
70
|
+
ensure
|
71
|
+
RbConfig::CONFIG['host_os'] = host_os
|
72
|
+
end
|
73
|
+
|
74
|
+
def test_linux_memory_used
|
75
|
+
host_os = RbConfig::CONFIG['host_os']
|
76
|
+
RbConfig::CONFIG['host_os'] = 'linux'
|
77
|
+
|
78
|
+
subject = Instana::Backend::ProcessInfo.new(OpenStruct.new(rss: 1))
|
79
|
+
assert_equal 4096, subject.memory_used
|
80
|
+
ensure
|
81
|
+
RbConfig::CONFIG['host_os'] = host_os
|
82
|
+
end
|
63
83
|
end
|
@@ -10,8 +10,6 @@ class ErrorJob
|
|
10
10
|
def self.perform
|
11
11
|
if ENV.key?('REDIS_URL')
|
12
12
|
redis = Redis.new(:url => ENV['REDIS_URL'])
|
13
|
-
elsif ENV.key?('REDIS_URL')
|
14
|
-
redis = Redis.new(:url => ENV['REDIS_URL'])
|
15
13
|
else
|
16
14
|
redis = Redis.new(:url => 'localhost:6379')
|
17
15
|
end
|
@@ -20,6 +18,5 @@ class ErrorJob
|
|
20
18
|
redis.set('ts', dt)
|
21
19
|
|
22
20
|
raise Exception.new("Silly Rabbit, Trix are for kids.")
|
23
|
-
redis.set(:nb_id, 2)
|
24
21
|
end
|
25
22
|
end
|
data/test/tracing/custom_test.rb
CHANGED
@@ -111,7 +111,6 @@ class CustomTracingTest < Minitest::Test
|
|
111
111
|
|
112
112
|
::Instana.tracer.log_entry(:custom_span, kvs)
|
113
113
|
raise "custom tracing error. This is only a test"
|
114
|
-
::Instana.tracer.log_info({:on_info_kv => 1})
|
115
114
|
rescue => e
|
116
115
|
::Instana.tracer.log_error(e)
|
117
116
|
ensure
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: instana
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.206.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Giacomo Lombardo
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -275,6 +275,7 @@ files:
|
|
275
275
|
- lib/instana/version.rb
|
276
276
|
- lib/opentracing.rb
|
277
277
|
- log/.keep
|
278
|
+
- sonar-project.properties
|
278
279
|
- test/activator_test.rb
|
279
280
|
- test/backend/agent_test.rb
|
280
281
|
- test/backend/gc_snapshot_test.rb
|