mysql2-instrumentation 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mysql2/instrumentation.rb +2 -1
- data/lib/mysql2/instrumentation/version.rb +1 -1
- data/mysql2-instrumentation.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2440d5744145d7424174421c5a29762b5c9eaca5
|
4
|
+
data.tar.gz: 1532dee634bebd405014ba699d8ec4a6ce067f90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebeda511c17cded3b5b2b6844d96fed907c750dd34fe1b11d10a903b6acffe9b9956b2c8ebd510ab2e95e89d0a4a524fa38691137d9d370a3ce10681683fe9b2
|
7
|
+
data.tar.gz: f76bed51f684c61d4356961f4b8cf870483685b0ed850d76bf5303c88f8b6941d0e09c9be65f3b7c69016891c3ed4fae75494016fc3beae87b60fa461f7fc368
|
@@ -28,10 +28,11 @@ module Mysql2
|
|
28
28
|
alias_method :query_original, :query
|
29
29
|
|
30
30
|
def query(sql, options = {})
|
31
|
+
statement = sql.respond_to?(:to_str) ? sql : sql.to_s
|
31
32
|
tags = {
|
32
33
|
'component' => 'mysql2',
|
33
34
|
'db.instance' => @query_options.fetch(:database, ''),
|
34
|
-
'db.statement' =>
|
35
|
+
'db.statement' => statement[0, 1024],
|
35
36
|
'db.user' => @query_options.fetch(:username, ''),
|
36
37
|
'db.type' => 'mysql',
|
37
38
|
'span.kind' => 'client',
|
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
|
26
26
|
spec.add_dependency "opentracing", "~> 0.3"
|
27
27
|
|
28
|
-
spec.add_development_dependency "bundler", "
|
28
|
+
spec.add_development_dependency "bundler", ">= 1.16"
|
29
29
|
spec.add_development_dependency "opentracing_test_tracer", "~> 0.1"
|
30
30
|
spec.add_development_dependency "rake", "~> 10.0"
|
31
31
|
spec.add_development_dependency "rspec", "~> 3.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysql2-instrumentation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ashwin Chandrasekar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentracing
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.16'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.16'
|
41
41
|
- !ruby/object:Gem::Dependency
|