appoptics_apm 4.11.0 → 4.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +20 -40
- data/.travis/bundle.sh +9 -0
- data/ext/oboe_metal/extconf.rb +2 -0
- data/ext/oboe_metal/src/VERSION +1 -1
- data/lib/appoptics_apm/inst/graphql.rb +44 -19
- data/lib/appoptics_apm/inst/grpc_client.rb +1 -1
- data/lib/appoptics_apm/support/transaction_metrics.rb +1 -1
- data/lib/appoptics_apm/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 26c9d31f4b5d680bd14d2cc041c337ea687f87e85c909fb6133d92e3f8292105
|
|
4
|
+
data.tar.gz: 1694af39aa2e9c8105a7d1b4fa590af16a5a86ae2b41bc9998531f2b16d192af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3257648c80a8da542d0e3f99a49c53b4ea6f3c2dd3ef37d6e6ebc1384f53054b3883b41f6ae43880f310a5ff4b49c37eaa67450a2d9818946e248180c6834222
|
|
7
|
+
data.tar.gz: ba4d2a1e71ab6805d73a038bbd1c6593889249e5ebdac1005cbb9df6befad04ef728bcfc67780db2352a10a43c694e991314530452dca57d17297f75c30c3d69
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
|
@@ -8,13 +8,12 @@ cache:
|
|
|
8
8
|
env:
|
|
9
9
|
- DBTYPE=postgresql
|
|
10
10
|
- DBTYPE=mysql2
|
|
11
|
-
- DBTYPE=mysql
|
|
12
11
|
|
|
13
12
|
rvm:
|
|
13
|
+
- 2.7.0
|
|
14
14
|
- 2.6.4
|
|
15
15
|
- 2.5.5
|
|
16
16
|
- 2.4.5
|
|
17
|
-
- 2.7.0
|
|
18
17
|
- ruby-head
|
|
19
18
|
# - jruby-9.0.5.0
|
|
20
19
|
|
|
@@ -34,42 +33,14 @@ matrix:
|
|
|
34
33
|
exclude:
|
|
35
34
|
- rvm: ruby-head
|
|
36
35
|
gemfile: gemfiles/rails42.gemfile
|
|
37
|
-
- rvm: 2.7.0
|
|
36
|
+
- rvm: 2.7.0
|
|
38
37
|
gemfile: gemfiles/rails42.gemfile
|
|
39
38
|
- rvm: 2.6.4
|
|
40
39
|
gemfile: gemfiles/rails42.gemfile
|
|
41
40
|
- rvm: 2.4.5
|
|
42
41
|
gemfile: gemfiles/rails60.gemfile
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
env: DBTYPE=mysql
|
|
46
|
-
- rvm: 2.7.0-preview2
|
|
47
|
-
env: DBTYPE=mysql
|
|
48
|
-
- rvm: 2.6.4
|
|
49
|
-
env: DBTYPE=mysql
|
|
50
|
-
- rvm: 2.5.5
|
|
51
|
-
env: DBTYPE=mysql
|
|
52
|
-
- rvm: 2.4.5
|
|
53
|
-
env: DBTYPE=mysql
|
|
54
|
-
|
|
55
|
-
- gemfile: gemfiles/unit.gemfile
|
|
56
|
-
env: DBTYPE=mysql
|
|
57
|
-
- gemfile: gemfiles/noop.gemfile
|
|
58
|
-
env: DBTYPE=mysql
|
|
59
|
-
- gemfile: gemfiles/libraries.gemfile
|
|
60
|
-
env: DBTYPE=mysql
|
|
61
|
-
- gemfile: gemfiles/instrumentation_mocked.gemfile
|
|
62
|
-
env: DBTYPE=mysql
|
|
63
|
-
- gemfile: gemfiles/instrumentation_mocked_oldgems.gemfile
|
|
64
|
-
env: DBTYPE=mysql
|
|
65
|
-
- gemfile: gemfiles/frameworks.gemfile
|
|
66
|
-
env: DBTYPE=mysql
|
|
67
|
-
- gemfile: gemfiles/rails52.gemfile
|
|
68
|
-
env: DBTYPE=mysql
|
|
69
|
-
- gemfile: gemfiles/rails60.gemfile
|
|
70
|
-
env: DBTYPE=mysql
|
|
71
|
-
- gemfile: gemfiles/delayed_job.gemfile
|
|
72
|
-
env: DBTYPE=mysql
|
|
42
|
+
- rvm: 2.4.5 # excluding because of new sprockets version (4.0.0)
|
|
43
|
+
gemfile: gemfiles/rails52.gemfile
|
|
73
44
|
|
|
74
45
|
- gemfile: gemfiles/unit.gemfile
|
|
75
46
|
env: DBTYPE=mysql2
|
|
@@ -87,9 +58,9 @@ matrix:
|
|
|
87
58
|
env: DBTYPE=mysql2
|
|
88
59
|
allow_failures:
|
|
89
60
|
- rvm: ruby-head
|
|
90
|
-
- rvm: 2.7.0
|
|
91
61
|
|
|
92
|
-
# FIXME:
|
|
62
|
+
# FIXME: No cassandra tests for now
|
|
63
|
+
# ____ Figure out if this is still an issue when reviving cassandra
|
|
93
64
|
# Attempt Travis/Cassandra fix re: https://github.com/travis-ci/travis-ci/issues/1484
|
|
94
65
|
# Updated Cassandra: https://github.com/travis-ci/travis-ci/issues/1650
|
|
95
66
|
|
|
@@ -104,9 +75,17 @@ matrix:
|
|
|
104
75
|
# - sudo service cassandra start
|
|
105
76
|
|
|
106
77
|
install:
|
|
107
|
-
- curl -LO http://kent.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz
|
|
108
|
-
-
|
|
109
|
-
-
|
|
78
|
+
# - curl -LO http://kent.dl.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz
|
|
79
|
+
# - curl -LO http://kent.dl.sourceforge.net/project/swig/swig/swig-4.0.1/swig-4.0.1.tar.gz
|
|
80
|
+
# - tar xzf swig-4.0.1.tar.gz
|
|
81
|
+
# - pushd swig-4.0.1
|
|
82
|
+
# - ./configure && make && sudo make install
|
|
83
|
+
# - popd
|
|
84
|
+
|
|
85
|
+
# use swig from git, it is the only one that works with Ruby 2.7 for now
|
|
86
|
+
- git clone https://github.com/swig/swig.git
|
|
87
|
+
- pushd swig
|
|
88
|
+
- ./autogen.sh
|
|
110
89
|
- ./configure && make && sudo make install
|
|
111
90
|
- popd
|
|
112
91
|
|
|
@@ -119,8 +98,9 @@ before_script:
|
|
|
119
98
|
- export APPOPTICS_TOKEN_BUCKET_RATE=1000
|
|
120
99
|
- export APPOPTICS_FROM_S3=true
|
|
121
100
|
|
|
122
|
-
- bundle update --jobs=3 --retry=3
|
|
123
|
-
- bundle
|
|
101
|
+
# - bundle update --jobs=3 --retry=3
|
|
102
|
+
- ./.travis/bundle.sh
|
|
103
|
+
- bundle exec rake distclean fetch compile
|
|
124
104
|
- psql -c 'create database travis_ci_test;' -U postgres
|
|
125
105
|
- mysql -e 'create database travis_ci_test;'
|
|
126
106
|
- redis-server --requirepass secret_pass &
|
data/.travis/bundle.sh
ADDED
data/ext/oboe_metal/extconf.rb
CHANGED
|
@@ -48,6 +48,8 @@ success = false
|
|
|
48
48
|
while retries > 0
|
|
49
49
|
begin
|
|
50
50
|
# download
|
|
51
|
+
# TODO warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open
|
|
52
|
+
# ____ figure out if URI.open is supported in older rubies
|
|
51
53
|
download = open(ao_item, 'rb')
|
|
52
54
|
IO.copy_stream(download, clib)
|
|
53
55
|
|
data/ext/oboe_metal/src/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
7.1.
|
|
1
|
+
7.1.1
|
|
@@ -13,23 +13,23 @@
|
|
|
13
13
|
# ____ what is in the graphql gem and vice-versa
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
if defined?(GraphQL::Tracing)
|
|
16
|
+
if defined?(GraphQL::Tracing) && !(AppOpticsAPM::Config[:graphql][:enabled] == false)
|
|
17
17
|
module GraphQL
|
|
18
18
|
module Tracing
|
|
19
19
|
# AppOpticsTracing in the graphql gem may be a different version than the
|
|
20
20
|
# one defined here, we want to use the newer one
|
|
21
|
-
|
|
21
|
+
redefine = true
|
|
22
22
|
this_version = Gem::Version.new('1.0.0')
|
|
23
23
|
|
|
24
24
|
if defined?(GraphQL::Tracing::AppOpticsTracing)
|
|
25
25
|
if this_version > GraphQL::Tracing::AppOpticsTracing.version
|
|
26
26
|
send(:remove_const, :AppOpticsTracing)
|
|
27
27
|
else
|
|
28
|
-
|
|
28
|
+
redefine = false
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
if redefine
|
|
33
33
|
#-----------------------------------------------------------------------------#
|
|
34
34
|
#----- this class is duplicated in the graphql gem ---------------------------#
|
|
35
35
|
#-----------------------------------------------------------------------------#
|
|
@@ -84,7 +84,7 @@ if defined?(GraphQL::Tracing)
|
|
|
84
84
|
|
|
85
85
|
def transaction_name(query)
|
|
86
86
|
return if gql_config[:transaction_name] == false ||
|
|
87
|
-
|
|
87
|
+
::AppOpticsAPM::SDK.get_transaction_name
|
|
88
88
|
|
|
89
89
|
split_query = query.strip.split(/\W+/, 3)
|
|
90
90
|
split_query[0] = 'query' if split_query[0].empty?
|
|
@@ -95,7 +95,7 @@ if defined?(GraphQL::Tracing)
|
|
|
95
95
|
|
|
96
96
|
def multiplex_transaction_name(names)
|
|
97
97
|
return if gql_config[:transaction_name] == false ||
|
|
98
|
-
|
|
98
|
+
::AppOpticsAPM::SDK.get_transaction_name
|
|
99
99
|
|
|
100
100
|
name = "graphql.multiplex.#{names.join('.')}"
|
|
101
101
|
name = "#{name[0..251]}..." if name.length > 254
|
|
@@ -167,8 +167,8 @@ if defined?(GraphQL::Tracing)
|
|
|
167
167
|
|
|
168
168
|
# remove arguments
|
|
169
169
|
query.gsub(/"[^"]*"/, '"?"') # strings
|
|
170
|
-
|
|
171
|
-
|
|
170
|
+
.gsub(/-?[0-9]*\.?[0-9]+e?[0-9]*/, '?') # ints + floats
|
|
171
|
+
.gsub(/\[[^\]]*\]/, '[?]') # arrays
|
|
172
172
|
end
|
|
173
173
|
|
|
174
174
|
def remove_comments(query)
|
|
@@ -184,10 +184,16 @@ if defined?(GraphQL::Tracing)
|
|
|
184
184
|
|
|
185
185
|
module AppOpticsAPM
|
|
186
186
|
module GraphQLSchemaPrepend
|
|
187
|
-
def use(plugin, options
|
|
188
|
-
super unless GraphQL::Schema.plugins.find { |pl| pl[0].to_s == plugin.to_s }
|
|
187
|
+
def use(plugin, **options)
|
|
188
|
+
# super unless GraphQL::Schema.plugins.find { |pl| pl[0].to_s == plugin.to_s }
|
|
189
|
+
super unless self.plugins.find { |pl| pl[0].to_s == plugin.to_s }
|
|
189
190
|
|
|
190
|
-
|
|
191
|
+
self.plugins
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
def inherited(subclass)
|
|
195
|
+
subclass.use(GraphQL::Tracing::AppOpticsTracing)
|
|
196
|
+
super
|
|
191
197
|
end
|
|
192
198
|
end
|
|
193
199
|
|
|
@@ -200,16 +206,35 @@ if defined?(GraphQL::Tracing)
|
|
|
200
206
|
end
|
|
201
207
|
end
|
|
202
208
|
# rubocop:enable Style/RedundantSelf
|
|
203
|
-
end
|
|
204
209
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
210
|
+
# a different way of autoinstrumenting for graphql 1.7.4 - < 1.8.0
|
|
211
|
+
module GraphQLSchemaPrepend17
|
|
212
|
+
def initialize
|
|
213
|
+
super
|
|
214
|
+
unless tracers.find { |tr| tr.is_a? GraphQL::Tracing::AppOpticsTracing }
|
|
215
|
+
tracer = GraphQL::Tracing::AppOpticsTracing.new
|
|
216
|
+
tracers.push(tracer)
|
|
217
|
+
instrumenters[:field] << tracer
|
|
218
|
+
end
|
|
219
|
+
end
|
|
220
|
+
end
|
|
208
221
|
end
|
|
209
222
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
GraphQL::
|
|
223
|
+
if Gem.loaded_specs['graphql'] && Gem.loaded_specs['graphql'].version >= Gem::Version.new('1.8.0')
|
|
224
|
+
AppOpticsAPM.logger.info '[appoptics_apm/loading] Instrumenting GraphQL' if AppOpticsAPM::Config[:verbose]
|
|
225
|
+
if defined?(GraphQL::Schema)
|
|
226
|
+
GraphQL::Schema.singleton_class.prepend(AppOpticsAPM::GraphQLSchemaPrepend)
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# rubocop:disable Style/IfUnlessModifier
|
|
230
|
+
if defined?(GraphQL::Error)
|
|
231
|
+
GraphQL::Error.prepend(AppOpticsAPM::GraphQLErrorPrepend)
|
|
232
|
+
end
|
|
233
|
+
# rubocop:enable Style/IfUnlessModifier
|
|
234
|
+
elsif Gem.loaded_specs['graphql'] && Gem.loaded_specs['graphql'].version >= Gem::Version.new('1.7.4')
|
|
235
|
+
AppOpticsAPM.logger.info '[appoptics_apm/loading] Instrumenting GraphQL' if AppOpticsAPM::Config[:verbose]
|
|
236
|
+
if defined?(GraphQL::Schema)
|
|
237
|
+
GraphQL::Schema.prepend(AppOpticsAPM::GraphQLSchemaPrepend17)
|
|
238
|
+
end
|
|
213
239
|
end
|
|
214
|
-
# rubocop:enable Style/IfUnlessModifier
|
|
215
240
|
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.11.
|
|
4
|
+
version: 4.11.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-
|
|
13
|
+
date: 2020-02-13 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: json
|
|
@@ -133,7 +133,7 @@ dependencies:
|
|
|
133
133
|
description: 'Automatic tracing and metrics for Ruby applications. Get started at
|
|
134
134
|
appoptics.com. @AppOptics
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
'
|
|
137
137
|
email: support@appoptics.com
|
|
138
138
|
executables:
|
|
139
139
|
- appoptics_apm_config
|
|
@@ -147,6 +147,7 @@ files:
|
|
|
147
147
|
- ".gitignore"
|
|
148
148
|
- ".rubocop.yml"
|
|
149
149
|
- ".travis.yml"
|
|
150
|
+
- ".travis/bundle.sh"
|
|
150
151
|
- ".yardopts"
|
|
151
152
|
- CHANGELOG.md
|
|
152
153
|
- CONFIG.md
|