opentelemetry-instrumentation-lmdb 0.18.1 → 0.19.0

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: eadb58155eb48beec6e66f5561c7ba7bb61920c16381d101d88e6c3d18e27bb3
4
- data.tar.gz: b421c0dfb2a4a657ff9d3fed01fc6b934a739e8a542031558db52649c89e00f5
3
+ metadata.gz: 493e2b9d547e7a70f956a8def7152d1105d94b644235f5b9a79c466a0cd64a70
4
+ data.tar.gz: 684a724b7de59d8e9b1ebbf204c3f92e6b8b5b1e3cd79068a94de98c7f1c0720
5
5
  SHA512:
6
- metadata.gz: 6fff23099098511b6abc1b5a67801f34a2d90becf8963aef0515f04b55ee89ad6ccf33e8f3f3fa336417e6f7bef140a8e698155598c2b7b606ec5092bd3e7973
7
- data.tar.gz: 44390d285f0e5e043ea1178e8a239a48615c32c6cef45e7a235c836ce721e4bf1bb3165b41010de9733b693161e3ffbd27ddcf8b25da13deb6724749e20a562c
6
+ metadata.gz: d718f83a4e13b672181dc4c3e34e9443c1151dbdd591be1b9b99ffdcf82587c007988555039466b58cbe35761cd3b4904b21ef32c7c78cf1f4955c47df6b742b
7
+ data.tar.gz: 2f2053b6ca5ea58096e93fbf560c02ecf5d28157dc0839a000cb096a4b01174f770ed8d6593dd8b47d207790938f01fe94f96db01a1599acc92853a94e5a046e
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Release History: opentelemetry-instrumentation-lmdb
2
2
 
3
+ ### v0.19.0 / 2021-08-12
4
+
5
+ * ADDED: Configure db.statement toggle
6
+ * DOCS: Update docs to rely more on environment variable configuration
7
+
3
8
  ### v0.18.1 / 2021-06-23
4
9
 
5
10
  * (No significant changes)
data/README.md CHANGED
@@ -30,10 +30,6 @@ OpenTelemetry::SDK.configure do |c|
30
30
  end
31
31
  ```
32
32
 
33
- ## Examples
34
-
35
- Example usage can be seen in the `./example/trace_demonstration.rb` file [here](https://github.com/open-telemetry/opentelemetry-ruby/blob/main/instrumentation/lmdb/example/trace_demonstration.rb)
36
-
37
33
  ## How can I get involved?
38
34
 
39
35
  The `opentelemetry-instrumentation-lmdb` gem source is [on github][repo-github], along with related gems including `opentelemetry-api` and `opentelemetry-sdk`.
@@ -21,6 +21,7 @@ module OpenTelemetry
21
21
  end
22
22
 
23
23
  option :peer_service, default: nil, validate: :string
24
+ option :db_statement, default: :include, validate: ->(opt) { %I[omit include].include?(opt) }
24
25
 
25
26
  private
26
27
 
@@ -15,10 +15,8 @@ module OpenTelemetry
15
15
  STATEMENT_MAX_LENGTH = 500
16
16
 
17
17
  def get(key)
18
- attributes = {
19
- 'db.system' => 'lmdb',
20
- 'db.statement' => formatted_statement('GET', "GET #{key}")
21
- }
18
+ attributes = { 'db.system' => 'lmdb' }
19
+ attributes['db.statement'] = formatted_statement('GET', "GET #{key}") if config[:db_statement] == :include
22
20
  attributes['peer.service'] = config[:peer_service] if config[:peer_service]
23
21
 
24
22
  tracer.in_span("GET #{key}", attributes: attributes, kind: :client) do
@@ -27,10 +25,8 @@ module OpenTelemetry
27
25
  end
28
26
 
29
27
  def delete(key, value = nil)
30
- attributes = {
31
- 'db.system' => 'lmdb',
32
- 'db.statement' => formatted_statement('DELETE', "DELETE #{key} #{value}".strip)
33
- }
28
+ attributes = { 'db.system' => 'lmdb' }
29
+ attributes['db.statement'] = formatted_statement('DELETE', "DELETE #{key} #{value}".strip) if config[:db_statement] == :include
34
30
  attributes['peer.service'] = config[:peer_service] if config[:peer_service]
35
31
 
36
32
  tracer.in_span("DELETE #{key}", attributes: attributes, kind: :client) do
@@ -39,10 +35,8 @@ module OpenTelemetry
39
35
  end
40
36
 
41
37
  def put(key, value)
42
- attributes = {
43
- 'db.system' => 'lmdb',
44
- 'db.statement' => formatted_statement('PUT', "PUT #{key} #{value}")
45
- }
38
+ attributes = { 'db.system' => 'lmdb' }
39
+ attributes['db.statement'] = formatted_statement('PUT', "PUT #{key} #{value}") if config[:db_statement] == :include
46
40
  attributes['peer.service'] = config[:peer_service] if config[:peer_service]
47
41
 
48
42
  tracer.in_span("PUT #{key}", attributes: attributes, kind: :client) do
@@ -51,10 +45,8 @@ module OpenTelemetry
51
45
  end
52
46
 
53
47
  def clear
54
- attributes = {
55
- 'db.system' => 'lmdb',
56
- 'db.statement' => 'CLEAR'
57
- }
48
+ attributes = { 'db.system' => 'lmdb' }
49
+ attributes['db.statement'] = 'CLEAR' if config[:db_statement] == :include
58
50
  attributes['peer.service'] = config[:peer_service] if config[:peer_service]
59
51
 
60
52
  tracer.in_span('CLEAR', attributes: attributes, kind: :client) do
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module LMDB
10
- VERSION = '0.18.1'
10
+ VERSION = '0.19.0'
11
11
  end
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-lmdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-06-24 00:00:00.000000000 Z
11
+ date: 2021-08-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0.rc2
19
+ version: 1.0.0.rc3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0.rc2
26
+ version: 1.0.0.rc3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: opentelemetry-instrumentation-base
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.18.1
33
+ version: 0.18.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.18.1
40
+ version: 0.18.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: appraisal
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -214,10 +214,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby
214
214
  licenses:
215
215
  - Apache-2.0
216
216
  metadata:
217
- changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-lmdb/v0.18.1/file.CHANGELOG.html
217
+ changelog_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-lmdb/v0.19.0/file.CHANGELOG.html
218
218
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby/tree/main/instrumentation/lmdb
219
219
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby/issues
220
- documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-lmdb/v0.18.1
220
+ documentation_uri: https://open-telemetry.github.io/opentelemetry-ruby/opentelemetry-instrumentation-lmdb/v0.19.0
221
221
  post_install_message:
222
222
  rdoc_options: []
223
223
  require_paths: