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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 30487d97a67adc1dfaa12e2be040c94a4fce74e7
4
- data.tar.gz: c966cdaf22a2bf32e9740536f9e615749c15cc0c
3
+ metadata.gz: 2440d5744145d7424174421c5a29762b5c9eaca5
4
+ data.tar.gz: 1532dee634bebd405014ba699d8ec4a6ce067f90
5
5
  SHA512:
6
- metadata.gz: ce6b24a2561f2afc74ba6ccdad7acefd267bbaee6e742471778ab2c1facc378b431f63d4d3ecfa1578d2e8b4964175cb4e095eab785fc816a71ce9e0d1d111cb
7
- data.tar.gz: 6fa6b8fed337a86cfca02865234869f16995fa1eda1f341a5fdfda288764696602891d957b3f3a8885fefa06fbac4bdad73a2698af502586fa52992089e916b7
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' => sql,
35
+ 'db.statement' => statement[0, 1024],
35
36
  'db.user' => @query_options.fetch(:username, ''),
36
37
  'db.type' => 'mysql',
37
38
  'span.kind' => 'client',
@@ -1,5 +1,5 @@
1
1
  module Mysql2
2
2
  module Instrumentation
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -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", "~> 1.16"
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.0
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-04 00:00:00.000000000 Z
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