opentelemetry-instrumentation-pg 0.25.0 → 0.25.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d828ad6a0400bd997f99de77aeb6507bfc82d6ae4b0ca9744e166030bd23edee
|
4
|
+
data.tar.gz: 37e5eecb2567bfee13896d67e443a4f7f43ad02fc8864ce925f72e694fd3b924
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4d9cf4613d90e9afeb0baedf84dc190168384490e8fab4cd36cdc4fbbe9a4754d2494a6f3293217ac7263c6973c277ba35f1b9ef3b629abf4a6709eb06380c4a
|
7
|
+
data.tar.gz: 5a2e6d37525c31c24e3868498e238d834bffd6abeeb91816816d82290dbf9d5ef5c2cfd08fe5b49f9a7245f2462b104b0171b7b6a2589e27e15b641063d29f63
|
data/CHANGELOG.md
CHANGED
@@ -108,8 +108,12 @@ module OpenTelemetry
|
|
108
108
|
return sql unless config[:db_statement] == :obfuscate
|
109
109
|
|
110
110
|
if sql.size > config[:obfuscation_limit]
|
111
|
-
|
112
|
-
|
111
|
+
first_match_index = sql.index(generated_postgres_regex)
|
112
|
+
truncation_message = "SQL truncated (> #{config[:obfuscation_limit]} characters)"
|
113
|
+
return truncation_message unless first_match_index
|
114
|
+
|
115
|
+
truncated_sql = sql[..first_match_index - 1]
|
116
|
+
return "#{truncated_sql}...\n#{truncation_message}"
|
113
117
|
end
|
114
118
|
|
115
119
|
# From:
|
@@ -119,6 +123,9 @@ module OpenTelemetry
|
|
119
123
|
obfuscated = 'Failed to obfuscate SQL query - quote characters remained after obfuscation' if PG::Constants::UNMATCHED_PAIRS_REGEX.match(obfuscated)
|
120
124
|
|
121
125
|
obfuscated
|
126
|
+
rescue StandardError => e
|
127
|
+
OpenTelemetry.handle_error(message: 'Failed to obfuscate SQL', exception: e)
|
128
|
+
'OpenTelemetry error: failed to obfuscate sql'
|
122
129
|
end
|
123
130
|
|
124
131
|
def generated_postgres_regex
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opentelemetry-instrumentation-pg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.25.
|
4
|
+
version: 0.25.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-
|
11
|
+
date: 2023-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opentelemetry-api
|
@@ -243,10 +243,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
|
|
243
243
|
licenses:
|
244
244
|
- Apache-2.0
|
245
245
|
metadata:
|
246
|
-
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-pg/0.25.
|
246
|
+
changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-pg/0.25.1/file/CHANGELOG.md
|
247
247
|
source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/pg
|
248
248
|
bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
|
249
|
-
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-pg/0.25.
|
249
|
+
documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-pg/0.25.1
|
250
250
|
post_install_message:
|
251
251
|
rdoc_options: []
|
252
252
|
require_paths:
|