appoptics_apm 4.12.0 → 4.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a652aaa478b98230f9f924d9b8aaf98c36d532dd078e66fe2f123c53d0b871e
4
- data.tar.gz: dff2fd57dfab08035c3a3f0af29b9cf41ebf0df486fe5e2ce93db5fa9ecef306
3
+ metadata.gz: 6407eda7d31bb8fe541c0dc6295a82229c72a4fdcca5208f10cc30eae7c22d2c
4
+ data.tar.gz: 8dcfafc3e7bb8caf5c93afc6a54e5682cc9eea0dc790ec5a6334458b1b98107e
5
5
  SHA512:
6
- metadata.gz: 187b9e776b1a976e12aa704cb8c1d894a8cd428b8e7702ed2871efd451d5d8127a7d02a1dd6461d87d3077c9348ec1334baaff5adc28e871ee67ae97d130632b
7
- data.tar.gz: f7b555c14f9456c7a7a565003c48092104eed3c8f54d5c705e0abde35e33fc2e56748ddb7b6452729da5fa04dbad36c408f8fe9b2c58866261d3cecc9f532163
6
+ metadata.gz: e4f04e064600294fa39899f61fb153816c90bb5969fa1a9173ed65925e9f4e2f36e61670098fe5ecb7e18ddcf0995b9aac4150d1048510ae3127fe950e7bf52b
7
+ data.tar.gz: b33f037425f2b7d1d19cbd069456f75c28b97de0906b2a9950a2b1fa408771c083f8b5dc811480a0f9b60f21437ddd6e50ea37fd22fff3c36cb51bbb9782f057
data/.gitignore CHANGED
@@ -1,35 +1,38 @@
1
- oboe*.gem
1
+ *.code-workspace
2
+ *.gem
2
3
  *.lock
3
- gemfiles/*.lock
4
- .ruby-version
5
- *~
6
4
  *.swp
5
+ *.vscode
6
+ *~
7
+ .*byebug*
8
+ .bundle
7
9
  .env
8
- lib/oboe_metal.so
10
+ .github
11
+ .irb_history
12
+ .irbrc
13
+ .ruby-version
14
+ .travis
15
+ .vagrant
16
+ .yardoc
17
+ builds
18
+ coverage
19
+ config
20
+ doc
21
+ ext/oboe_metal/*.o
9
22
  ext/oboe_metal/Makefile
23
+ ext/oboe_metal/lib/liboboe*so*
10
24
  ext/oboe_metal/mkmf.log
11
25
  ext/oboe_metal/oboe_metal.so
12
26
  ext/oboe_metal/oboe_noop.so
13
- ext/oboe_metal/*.o
14
- ext/oboe_metal/lib/liboboe*so*
27
+ ext/oboe_metal/src/bson/*
15
28
  ext/oboe_metal/src/oboe.h
16
29
  ext/oboe_metal/src/oboe.hpp
17
30
  ext/oboe_metal/src/oboe_debug.h
18
31
  ext/oboe_metal/src/oboe_wrap.cxx
19
- ext/oboe_metal/src/bson/*
20
- log/
21
- .vagrant
22
- gemfiles/.bundle
23
- swig*
24
- *.gem
25
- .yardoc
26
- coverage
27
- doc
28
- .*byebug*
29
32
  gemfiles/vendor*
33
+ lib/rb_appoptics_apm.so
34
+ lib/oboe_metal.so
35
+ log
36
+ oboe*.gem
30
37
  scrap*
31
- .irbrc
32
- *.code-workspace
33
- .irb_history
34
- .bundle/
35
- /builds/
38
+ swig*
@@ -96,6 +96,7 @@ before_script:
96
96
  # - export APPOPTICS_TOKEN_BUCKET_CAPACITY=1000
97
97
  # - export APPOPTICS_TOKEN_BUCKET_RATE=1000
98
98
  - export APPOPTICS_FROM_S3=true
99
+ - export OBOE_VERSION=10.0.0
99
100
 
100
101
  # - bundle update --jobs=3 --retry=3
101
102
  - ./.travis/bundle.sh
@@ -10,8 +10,6 @@ module AppOpticsAPM
10
10
  # noop version of :toString
11
11
  # toString would return the current context (xtrace) as string
12
12
  #
13
- # the noop version returns an empty string
14
- #
15
13
  def self.toString
16
14
  '2B0000000000000000000000000000000000000000000000000000000000'
17
15
  end
@@ -23,4 +21,4 @@ module AppOpticsAPM
23
21
 
24
22
  end
25
23
  end
26
- end
24
+ end
@@ -37,14 +37,10 @@ module AppOpticsAPM
37
37
  attr_reader :id
38
38
 
39
39
  def initialize
40
- if AppOpticsAPM::Config[:log_traceId] == :never
41
- @id = '0000000000000000000000000000000000000000-0'
42
- else
43
- @xtrace = AppOpticsAPM::Context.toString
44
- task_id = AppOpticsAPM::XTrace.task_id(@xtrace)
45
- sampled = AppOpticsAPM::XTrace.sampled?(@xtrace)
46
- @id = "#{task_id}-#{sampled ? 1 : 0}"
47
- end
40
+ @xtrace = AppOpticsAPM::Context.toString
41
+ task_id = AppOpticsAPM::XTrace.task_id(@xtrace)
42
+ sampled = AppOpticsAPM::XTrace.sampled?(@xtrace)
43
+ @id = "#{task_id}-#{sampled ? 1 : 0}"
48
44
  end
49
45
 
50
46
  # for_log returns a string in the format 'traceId=<current_trace.id>' or ''.
@@ -78,4 +74,4 @@ module AppOpticsAPM
78
74
 
79
75
  extend CurrentTrace
80
76
  end
81
- end
77
+ end
@@ -53,8 +53,8 @@ module AppOpticsAPM
53
53
  def set_postgresql_env
54
54
  if ENV.key?('TRAVIS_PSQL_PASS')
55
55
  ENV['DATABASE_URL'] = "postgresql://postgres:#{ENV['TRAVIS_PSQL_PASS']}@127.0.0.1:5432/travis_ci_test"
56
- elsif ENV.key?('DOCKER_PSQL_PASS')
57
- ENV['DATABASE_URL'] = "postgresql://docker:#{ENV['DOCKER_PSQL_PASS']}@#{ENV['PSQL_HOST']}:5432/travis_ci_test"
56
+ elsif ENV.key?('POSTGRES_USER')
57
+ ENV['DATABASE_URL'] = "postgresql://#{ENV['POSTGRES_USER']}@#{ENV['PSQL_HOST']}:5432/travis_ci_test"
58
58
  # ENV['DATABASE_URL'] = "postgresql://postgres@#{ENV['PSQL_HOST']}:5432/travis_ci_test"
59
59
  else
60
60
  ENV['DATABASE_URL'] = 'postgresql://postgres@127.0.0.1:5432/travis_ci_test'
@@ -8,7 +8,7 @@ module AppOpticsAPM
8
8
  module Version
9
9
  MAJOR = 4 # breaking,
10
10
  MINOR = 12 # feature,
11
- PATCH = 0 # fix => BFF
11
+ PATCH = 1 # fix => BFF
12
12
 
13
13
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
14
14
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appoptics_apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.12.0
4
+ version: 4.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maia Engeli
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-06-09 00:00:00.000000000 Z
13
+ date: 2020-09-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
@@ -30,20 +30,20 @@ dependencies:
30
30
  name: no_proxy_fix
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ">="
33
+ - - "~>"
34
34
  - !ruby/object:Gem::Version
35
35
  version: 0.1.2
36
- - - "~>"
36
+ - - ">="
37
37
  - !ruby/object:Gem::Version
38
38
  version: 0.1.2
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
42
42
  requirements:
43
- - - ">="
43
+ - - "~>"
44
44
  - !ruby/object:Gem::Version
45
45
  version: 0.1.2
46
- - - "~>"
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: 0.1.2
49
49
  description: 'Automatic tracing and metrics for Ruby applications. Get started at
@@ -70,11 +70,9 @@ files:
70
70
  - Gemfile
71
71
  - LICENSE
72
72
  - README.md
73
- - app/assets/config/manifest.js
74
73
  - appoptics_apm.gemspec
75
74
  - bin/appoptics_apm_config
76
75
  - examples/sdk_examples.rb
77
- - ext/.vscode/launch.json
78
76
  - ext/oboe_metal/README.md
79
77
  - ext/oboe_metal/extconf.rb
80
78
  - ext/oboe_metal/lib/.keep
@@ -82,7 +80,6 @@ files:
82
80
  - ext/oboe_metal/src/VERSION
83
81
  - ext/oboe_metal/src/bson/bson.h
84
82
  - ext/oboe_metal/src/bson/platform_hacks.h
85
- - ext/oboe_metal/src/function_profiler.hpp
86
83
  - ext/oboe_metal/src/oboe.h
87
84
  - ext/oboe_metal/src/oboe.hpp
88
85
  - ext/oboe_metal/src/oboe_debug.h
@@ -171,7 +168,6 @@ files:
171
168
  - lib/oboe_metal.rb
172
169
  - lib/rails/generators/appoptics_apm/install_generator.rb
173
170
  - lib/rails/generators/appoptics_apm/templates/appoptics_apm_initializer.rb
174
- - lib/rb_appoptics_apm.so
175
171
  - yardoc_frontpage.md
176
172
  homepage: https://www.appoptics.com/
177
173
  licenses:
@@ -196,7 +192,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
196
192
  - !ruby/object:Gem::Version
197
193
  version: '0'
198
194
  requirements: []
199
- rubygems_version: 3.0.3
195
+ rubyforge_project:
196
+ rubygems_version: 2.7.6.2
200
197
  signing_key:
201
198
  specification_version: 4
202
199
  summary: AppOptics APM performance instrumentation gem for Ruby
@@ -1 +0,0 @@
1
- {}
@@ -1,20 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "name": "(lldb) Launch",
9
- "type": "cppdbg",
10
- "request": "launch",
11
- "program": "enter program name, for example ${workspaceFolder}/a.out",
12
- "args": [],
13
- "stopAtEntry": false,
14
- "cwd": "${workspaceFolder}",
15
- "environment": [],
16
- "externalConsole": false,
17
- "MIMode": "lldb"
18
- }
19
- ]
20
- }
@@ -1,160 +0,0 @@
1
- // function_profiler C++11 per-thread function profling
2
- // https://git.the-pluc.net/function_profiler.git/
3
- // Version 0.3
4
- //
5
- // Copyright (C) 2015, 2016 Pierre-Luc Perrier <pluc@the-pluc.net>
6
- //
7
- // Licensed under the Apache License, Version 2.0 (the "License");
8
- // you may not use this file except in compliance with the License.
9
- // You may obtain a copy of the License at
10
- //
11
- // http://www.apache.org/licenses/LICENSE-2.0
12
- //
13
- // Unless required by applicable law or agreed to in writing, software
14
- // distributed under the License is distributed on an "AS IS" BASIS,
15
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- // See the License for the specific language governing permissions and
17
- // limitations under the License.
18
-
19
- #ifndef function_profiler_h
20
- #define function_profiler_h
21
-
22
- #ifdef FP_ENABLE
23
-
24
- #include <boost/chrono.hpp>
25
-
26
- #include <cstdio> // std::printf
27
- #include <ios> // std::hex
28
- #include <string> // std::string
29
- #include <thread> // std::this_thread::get_id
30
- #include <iostream>
31
- #include <iomanip>
32
-
33
- namespace fp {
34
-
35
- // Main structure used to collect data
36
- struct collector {
37
- // Clocks
38
- using thread_clock = boost::chrono::thread_clock;
39
- using thread_time_point = thread_clock::time_point;
40
- using thread_accumulator = boost::chrono::duration<uint_least64_t, thread_clock::period>;
41
-
42
- using steady_clock = boost::chrono::steady_clock;
43
- using steady_time_point = steady_clock::time_point;
44
- using steady_accumulator = boost::chrono::duration<uint_least64_t, steady_clock::period>;
45
-
46
- // The duration we use for the report
47
- using report_duration = boost::chrono::duration<double, boost::milli>;
48
-
49
- collector() = delete;
50
- collector(const std::string &name)
51
- : m_thread_last{thread_clock::now()},
52
- m_steady_last{steady_clock::now()},
53
- m_count{0},
54
- m_thread_accumulator{0},
55
- m_steady_accumulator{0},
56
- m_last_report{steady_clock::now()}
57
- {
58
- std::ostringstream os;
59
- // os << "[FP] " << std::hex << std::this_thread::get_id() << " " << name << " #%-7lu %8.5F %8.5F %11.4F %11.4F\n";
60
- os << std::setfill (' ') << std::setw(22) << name << " " << std::hex << std::this_thread::get_id() << "\t#%-7lu\t%4.5F\t%4.5F\t%6.4F\t%6.4F\n";
61
- m_fmt = os.str();
62
- }
63
-
64
- // We also report upon destruction. Note: this is probably a bad
65
- // idea.
66
- ~collector() noexcept
67
- {
68
- report();
69
- }
70
-
71
- inline void start() noexcept
72
- {
73
- m_thread_last = thread_clock::now();
74
- m_steady_last = steady_clock::now();
75
- }
76
-
77
- inline void stop()
78
- {
79
- ++m_count;
80
-
81
- {
82
- const auto now = thread_clock::now();
83
- m_thread_accumulator += now - m_thread_last;
84
- m_thread_last = std::move(now);
85
- }
86
- {
87
- const auto now = steady_clock::now();
88
- m_steady_accumulator += now - m_steady_last;
89
- m_steady_last = std::move(now);
90
- }
91
-
92
- // Check if we need to report current stats
93
- if (m_steady_last - m_last_report > report_interval) {
94
- m_last_report = m_steady_last;
95
- report();
96
- }
97
- }
98
-
99
- private:
100
- inline void report() const
101
- {
102
- if (m_count == 0) return;
103
- const auto thread_ms = report_duration{m_thread_accumulator}.count();
104
- const auto steady_ms = report_duration{m_steady_accumulator}.count();
105
- std::printf(m_fmt.c_str(), m_count, steady_ms / m_count, thread_ms / m_count, steady_ms, thread_ms);
106
- }
107
-
108
- private:
109
- static constexpr auto report_interval = boost::chrono::seconds{1};
110
-
111
- thread_time_point m_thread_last; // Last thread clock time point
112
- steady_time_point m_steady_last; // Last steady clock time point
113
- uint_least64_t m_count; // Number of samples
114
- thread_accumulator m_thread_accumulator; // Total thread clock duration
115
- steady_accumulator m_steady_accumulator; // Total steady clock duration
116
- steady_time_point m_last_report; // Last report
117
- std::string m_fmt; // Format used for reporting
118
- };
119
-
120
- // RAII structure responsible to update a collector
121
- struct scoped_profiler {
122
- public:
123
- scoped_profiler(collector &collector_) : m_collector{collector_}
124
- {
125
- m_collector.start();
126
- }
127
-
128
- ~scoped_profiler()
129
- {
130
- m_collector.stop();
131
- }
132
-
133
- scoped_profiler() = delete;
134
- scoped_profiler(const scoped_profiler &) = delete;
135
- scoped_profiler(scoped_profiler &&) = delete;
136
-
137
- scoped_profiler &operator=(const scoped_profiler &) = delete;
138
- scoped_profiler &operator=(scoped_profiler &&) = delete;
139
-
140
- private:
141
- collector &m_collector;
142
- };
143
-
144
- // constexpr boost::chrono::seconds collector::report_interval;
145
-
146
- } // namespace fp
147
-
148
- // Note: __func__ is not a preprocessor macro, it's a 'function-local
149
- // predefined variable' (char *), hence we don't expand it.
150
- #define PROFILE_FUNCTION() \
151
- thread_local fp::collector fp_info_fp{__func__}; \
152
- fp::scoped_profiler fp_scoped_profiler_fp{fp_info_fp};
153
-
154
- #else // !FB_ENABLE
155
-
156
- #define PROFILE_FUNCTION() static_cast<void>(0);
157
-
158
- #endif // FB_ENABLE
159
-
160
- #endif // function_profiler_h
Binary file