opentelemetry-instrumentation-trilogy 0.54.0 → 0.55.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: 4932e3113d2bb9a5e8df80ee5496f0dcca34de17b8f5a1aac5233953cd4fd292
4
- data.tar.gz: 56471b24b26a886ab01937ed3f790705ae2130c8bab98952131de6868daad83c
3
+ metadata.gz: 8cc568f9e1a5d6a330ffddee8c6888fac1c7b1c84433a003cf68673d654e6008
4
+ data.tar.gz: ccfa730942e2472d8ad4978ed229d6b1fc44a597ac74331bfe1e17be28fcd4a1
5
5
  SHA512:
6
- metadata.gz: 66215a5c1bf88db8fdfe6cf65ba6dd3bec73eede9afe5923c0e031ff4067e0c627d5a4ef3de8897fa1fa44b7ee6bad1dc97558169342db8d21001c2893e4757f
7
- data.tar.gz: 1d0eda4aa160896c6c1ff33cdc64102e5b5c8df186286b3a731e2cb23b12c9d45b454d0e643f78b7d8766e0ad2da7470b192c0f789247ee1675d81f96dcc00c6
6
+ metadata.gz: e92928d645e72804e3dfc5d10069856585f0d48badf6a8dd2ecabf2c471012222b33d70bc16d247adeee6d0c98196ab53bda948e36aafd23ec898b5fd202050a
7
+ data.tar.gz: 72f70ea92bf8f58c0cf767898362724ba6e9c1d73adcdec2a2ffb0ce0f84c6540880b8a9e359e43b06797514b5789f7b0d8db9f98df107ce5db0a655acde46b0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Release History: opentelemetry-instrumentation-trilogy
2
2
 
3
+ ### v0.55.1 / 2023-06-01
4
+
5
+ * FIXED: Regex non-match with obfuscation limit (issue #486)
6
+
7
+ ### v0.55.0 / 2023-05-31
8
+
9
+ * BREAKING CHANGE: Add database name for trilogy traces
10
+
11
+ * ADDED: Add database name for trilogy traces
12
+
3
13
  ### v0.54.0 / 2023-05-25
4
14
 
5
15
  * ADDED: Add Obfuscation Limit Option to Trilogy
@@ -19,7 +19,7 @@ module OpenTelemetry
19
19
  end
20
20
 
21
21
  compatible do
22
- Gem::Requirement.create('>= 2.0', '< 3.0').satisfied_by?(Gem::Version.new(::Trilogy::VERSION))
22
+ Gem::Requirement.create('>= 2.3', '< 3.0').satisfied_by?(Gem::Version.new(::Trilogy::VERSION))
23
23
  end
24
24
 
25
25
  option :peer_service, default: nil, validate: :string
@@ -71,6 +71,7 @@ module OpenTelemetry
71
71
  ::OpenTelemetry::SemanticConventions::Trace::NET_PEER_NAME => net_peer_name
72
72
  }
73
73
 
74
+ attributes[::OpenTelemetry::SemanticConventions::Trace::DB_NAME] = database_name if database_name
74
75
  attributes[::OpenTelemetry::SemanticConventions::Trace::PEER_SERVICE] = config[:peer_service] unless config[:peer_service].nil?
75
76
 
76
77
  case config[:db_statement]
@@ -85,8 +86,12 @@ module OpenTelemetry
85
86
 
86
87
  def obfuscate_sql(sql)
87
88
  if sql.size > config[:obfuscation_limit]
88
- truncated_sql = sql[..sql.index(FULL_SQL_REGEXP) - 1]
89
- truncated_sql + "...\nSQL truncated (> #{config[:obfuscation_limit]} characters)"
89
+ first_match_index = sql.index(FULL_SQL_REGEXP)
90
+ truncation_message = "SQL truncated (> #{config[:obfuscation_limit]} characters)"
91
+ return truncation_message unless first_match_index
92
+
93
+ truncated_sql = sql[..first_match_index - 1]
94
+ "#{truncated_sql}...\n#{truncation_message}"
90
95
  else
91
96
  obfuscated = OpenTelemetry::Common::Utilities.utf8_encode(sql, binary: true)
92
97
  obfuscated = obfuscated.gsub(FULL_SQL_REGEXP, '?')
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module Trilogy
10
- VERSION = '0.54.0'
10
+ VERSION = '0.55.1'
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-trilogy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.54.0
4
+ version: 0.55.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-25 00:00:00.000000000 Z
11
+ date: 2023-06-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -275,10 +275,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
275
275
  licenses:
276
276
  - Apache-2.0
277
277
  metadata:
278
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.54.0/file/CHANGELOG.md
278
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.55.1/file/CHANGELOG.md
279
279
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/trilogy
280
280
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
281
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.54.0
281
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-trilogy/0.55.1
282
282
  post_install_message:
283
283
  rdoc_options: []
284
284
  require_paths: