traces 0.15.0 → 0.15.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/traces/backend/test.rb +2 -1
- data/lib/traces/backend.rb +7 -1
- data/lib/traces/config.rb +3 -2
- data/lib/traces/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6cba8b363fbd6a0df7f971924f3b8d3f358bc5b91ea2eb57045716285081fc35
|
4
|
+
data.tar.gz: 612777384a90dbc375f1a349e8291cabd7bb8ebf77830075d29703e54d5f4d60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 162910bc810cdb69c55e6bb59354dd7b0859237a4cc47c5d1a4ce4ccb6cafee24913680d9f1d815540b4524941eb9fd8bcda7cd49bebcd3fbdac534708cb828e
|
7
|
+
data.tar.gz: 4e5432869b0470ae85fbee9d6efbc57130b07944f5960eb7ee4832a848068caf56445b5846434075206111262f17b12ce92564417ff56d90c3162ee5338f0bbc
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/traces/backend/test.rb
CHANGED
data/lib/traces/backend.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2021-
|
4
|
+
# Copyright, 2021-2025, by Samuel Williams.
|
5
5
|
|
6
6
|
require_relative 'config'
|
7
7
|
|
@@ -10,6 +10,12 @@ module Traces
|
|
10
10
|
module Backend
|
11
11
|
end
|
12
12
|
|
13
|
+
# This is a default implementation, which can be replaced by the backend.
|
14
|
+
# @returns [Object] The current trace context.
|
15
|
+
def self.trace_context
|
16
|
+
nil
|
17
|
+
end
|
18
|
+
|
13
19
|
# This is a default implementation, which can be replaced by the backend.
|
14
20
|
# @returns [Boolean] Whether there is an active trace.
|
15
21
|
def self.active?
|
data/lib/traces/config.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2024, by Samuel Williams.
|
4
|
+
# Copyright, 2024-2025, by Samuel Williams.
|
5
5
|
|
6
6
|
module Traces
|
7
7
|
# Represents a configuration for the traces library.
|
@@ -36,7 +36,8 @@ module Traces
|
|
36
36
|
if backend = env['TRACES_BACKEND']
|
37
37
|
begin
|
38
38
|
if require(backend)
|
39
|
-
|
39
|
+
# We ensure that the interface methods replace any existing methods by prepending the module:
|
40
|
+
Traces.singleton_class.prepend(Backend::Interface)
|
40
41
|
|
41
42
|
return true
|
42
43
|
end
|
data/lib/traces/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traces
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.15.
|
4
|
+
version: 0.15.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -37,7 +37,7 @@ cert_chain:
|
|
37
37
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
38
38
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
39
39
|
-----END CERTIFICATE-----
|
40
|
-
date: 2025-01
|
40
|
+
date: 2025-02-01 00:00:00.000000000 Z
|
41
41
|
dependencies: []
|
42
42
|
executables: []
|
43
43
|
extensions: []
|
metadata.gz.sig
CHANGED
Binary file
|