researchable_loggable 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +71 -1
- data/lib/loggable/opentelemetry_config.rb +19 -0
- data/lib/loggable/railtie.rb +4 -0
- data/lib/loggable/version.rb +1 -1
- data/lib/researchable_loggable.rb +1 -0
- data/node_modules/semantic-release-rubygem/src/__tests__/fixtures/valid/lib/test-gem/version.rb +1 -1
- metadata +49 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbb2f10f55fe229b5aa4fa37200b4938d1f2bfca095bea3445cc02e45257cb36
|
4
|
+
data.tar.gz: e0929bdc0b5db11fc17a5515ef06582eab0b4ff8581c42b3c9f6f2bc45adaa25
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc20b8d6d7952f11f8d735e6ebccf4d5ecb3b36daaa70e913df3f9e79bcd70c74d83cd0955c6dd432dec7126c510db9462afc1136f70eabed577e71e11903bcf
|
7
|
+
data.tar.gz: f184d1792cc43b07c01f878083767e65ba8f891961c8cafd0b7e531abd140718c6bb9bfd22ea03b800f48bfe66d02d0db2c7e966bb79acc4d1df43d6234ee81d
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# [1.2.0](https://gitlab.com/researchable/general/gems/loggable/compare/v1.1.0...v1.2.0) (2024-09-03)
|
2
|
+
|
3
|
+
|
4
|
+
### Features
|
5
|
+
|
6
|
+
* add OpenTelemetry ([1dc8d60](https://gitlab.com/researchable/general/gems/loggable/commit/1dc8d60bfc736f2e24c76cb8ece35c0f9f81ac74))
|
7
|
+
|
8
|
+
|
9
|
+
### Reverts
|
10
|
+
|
11
|
+
* **config:** set loggable production_like back to [secure] ([68c1ec1](https://gitlab.com/researchable/general/gems/loggable/commit/68c1ec11f25d6b58e38ee1c36aa479e63ee1b9eb))
|
12
|
+
|
1
13
|
# [1.1.0](https://gitlab.com/researchable/general/gems/loggable/compare/v1.0.2...v1.1.0) (2023-07-06)
|
2
14
|
|
3
15
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,10 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
researchable_loggable (1.0
|
4
|
+
researchable_loggable (1.1.0)
|
5
5
|
ecs-logging (~> 1.0)
|
6
6
|
lograge
|
7
7
|
logstash-event
|
8
|
+
opentelemetry-api
|
9
|
+
opentelemetry-exporter-otlp
|
10
|
+
opentelemetry-instrumentation-rails
|
11
|
+
opentelemetry-sdk
|
8
12
|
|
9
13
|
GEM
|
10
14
|
remote: https://rubygems.org/
|
@@ -28,12 +32,18 @@ GEM
|
|
28
32
|
minitest (>= 5.1)
|
29
33
|
tzinfo (~> 2.0)
|
30
34
|
ast (2.4.2)
|
35
|
+
bigdecimal (3.1.8)
|
31
36
|
builder (3.2.4)
|
32
37
|
concurrent-ruby (1.2.0)
|
33
38
|
crass (1.0.6)
|
34
39
|
diff-lcs (1.5.0)
|
35
40
|
ecs-logging (1.0.0)
|
36
41
|
erubi (1.12.0)
|
42
|
+
google-protobuf (4.27.4-x86_64-linux)
|
43
|
+
bigdecimal
|
44
|
+
rake (>= 13)
|
45
|
+
googleapis-common-protos-types (1.15.0)
|
46
|
+
google-protobuf (>= 3.18, < 5.a)
|
37
47
|
i18n (1.12.0)
|
38
48
|
concurrent-ruby (~> 1.0)
|
39
49
|
lograge (0.12.0)
|
@@ -49,6 +59,62 @@ GEM
|
|
49
59
|
minitest (5.17.0)
|
50
60
|
nokogiri (1.14.1-x86_64-linux)
|
51
61
|
racc (~> 1.4)
|
62
|
+
opentelemetry-api (1.3.0)
|
63
|
+
opentelemetry-common (0.21.0)
|
64
|
+
opentelemetry-api (~> 1.0)
|
65
|
+
opentelemetry-exporter-otlp (0.28.1)
|
66
|
+
google-protobuf (>= 3.18)
|
67
|
+
googleapis-common-protos-types (~> 1.3)
|
68
|
+
opentelemetry-api (~> 1.1)
|
69
|
+
opentelemetry-common (~> 0.20)
|
70
|
+
opentelemetry-sdk (~> 1.2)
|
71
|
+
opentelemetry-semantic_conventions
|
72
|
+
opentelemetry-instrumentation-action_mailer (0.1.0)
|
73
|
+
opentelemetry-api (~> 1.0)
|
74
|
+
opentelemetry-instrumentation-active_support (~> 0.1)
|
75
|
+
opentelemetry-instrumentation-base (~> 0.22.1)
|
76
|
+
opentelemetry-instrumentation-action_pack (0.9.0)
|
77
|
+
opentelemetry-api (~> 1.0)
|
78
|
+
opentelemetry-instrumentation-base (~> 0.22.1)
|
79
|
+
opentelemetry-instrumentation-rack (~> 0.21)
|
80
|
+
opentelemetry-instrumentation-action_view (0.7.3)
|
81
|
+
opentelemetry-api (~> 1.0)
|
82
|
+
opentelemetry-instrumentation-active_support (~> 0.6)
|
83
|
+
opentelemetry-instrumentation-base (~> 0.22.1)
|
84
|
+
opentelemetry-instrumentation-active_job (0.7.7)
|
85
|
+
opentelemetry-api (~> 1.0)
|
86
|
+
opentelemetry-instrumentation-base (~> 0.22.1)
|
87
|
+
opentelemetry-instrumentation-active_record (0.7.4)
|
88
|
+
opentelemetry-api (~> 1.0)
|
89
|
+
opentelemetry-instrumentation-base (~> 0.22.1)
|
90
|
+
opentelemetry-instrumentation-active_support (0.6.0)
|
91
|
+
opentelemetry-api (~> 1.0)
|
92
|
+
opentelemetry-instrumentation-base (~> 0.22.1)
|
93
|
+
opentelemetry-instrumentation-base (0.22.6)
|
94
|
+
opentelemetry-api (~> 1.0)
|
95
|
+
opentelemetry-common (~> 0.21)
|
96
|
+
opentelemetry-registry (~> 0.1)
|
97
|
+
opentelemetry-instrumentation-rack (0.24.6)
|
98
|
+
opentelemetry-api (~> 1.0)
|
99
|
+
opentelemetry-instrumentation-base (~> 0.22.1)
|
100
|
+
opentelemetry-instrumentation-rails (0.31.2)
|
101
|
+
opentelemetry-api (~> 1.0)
|
102
|
+
opentelemetry-instrumentation-action_mailer (~> 0.1.0)
|
103
|
+
opentelemetry-instrumentation-action_pack (~> 0.9.0)
|
104
|
+
opentelemetry-instrumentation-action_view (~> 0.7.0)
|
105
|
+
opentelemetry-instrumentation-active_job (~> 0.7.0)
|
106
|
+
opentelemetry-instrumentation-active_record (~> 0.7.0)
|
107
|
+
opentelemetry-instrumentation-active_support (~> 0.6.0)
|
108
|
+
opentelemetry-instrumentation-base (~> 0.22.1)
|
109
|
+
opentelemetry-registry (0.3.1)
|
110
|
+
opentelemetry-api (~> 1.1)
|
111
|
+
opentelemetry-sdk (1.5.0)
|
112
|
+
opentelemetry-api (~> 1.1)
|
113
|
+
opentelemetry-common (~> 0.20)
|
114
|
+
opentelemetry-registry (~> 0.2)
|
115
|
+
opentelemetry-semantic_conventions
|
116
|
+
opentelemetry-semantic_conventions (1.10.1)
|
117
|
+
opentelemetry-api (~> 1.0)
|
52
118
|
parallel (1.22.1)
|
53
119
|
parser (3.2.1.1)
|
54
120
|
ast (~> 2.4.1)
|
@@ -129,6 +195,10 @@ DEPENDENCIES
|
|
129
195
|
ecs-logging (~> 1.0)
|
130
196
|
lograge
|
131
197
|
logstash-event
|
198
|
+
opentelemetry-api
|
199
|
+
opentelemetry-exporter-otlp
|
200
|
+
opentelemetry-instrumentation-rails
|
201
|
+
opentelemetry-sdk
|
132
202
|
rake (~> 13.0)
|
133
203
|
researchable_loggable!
|
134
204
|
rspec (~> 3.0)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'opentelemetry/sdk'
|
4
|
+
require 'opentelemetry/instrumentation/all'
|
5
|
+
|
6
|
+
module Loggable
|
7
|
+
# The OpenTelemetryConfig module provides a method to configure OpenTelemetry for Rails applications.
|
8
|
+
# It sets up the instrumentation and tracing with a specified service name, relying on environment
|
9
|
+
# variables for exporter configuration, such as sending traces to a remote backend like Grafana Cloud.
|
10
|
+
module OpenTelemetryConfig
|
11
|
+
# Configures OpenTelemetry for the application
|
12
|
+
def self.configure(service_name)
|
13
|
+
::OpenTelemetry::SDK.configure do |c|
|
14
|
+
c.use_all
|
15
|
+
c.service_name = service_name
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
data/lib/loggable/railtie.rb
CHANGED
@@ -20,6 +20,8 @@ module Loggable
|
|
20
20
|
if production_like
|
21
21
|
Rails.logger = ::EcsLogging::Logger.new($stdout)
|
22
22
|
Rails.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase || 'INFO')
|
23
|
+
|
24
|
+
Loggable::OpenTelemetryConfig.configure(Rails.application.class.module_parent_name.underscore.dasherize)
|
23
25
|
end
|
24
26
|
|
25
27
|
# lograge configuration
|
@@ -54,6 +56,8 @@ module Loggable
|
|
54
56
|
if Rails.env.production? || config.loggable.production_like
|
55
57
|
Delayed::Worker.logger = ::EcsLogging::Logger.new($stdout)
|
56
58
|
Delayed::Worker.logger.level = ActiveSupport::Logger.const_get(config.log_level.to_s.upcase || 'INFO')
|
59
|
+
Loggable::OpenTelemetryConfig.configure("#{Rails.application.class.module_parent_name.underscore.dasherize}
|
60
|
+
-worker")
|
57
61
|
else
|
58
62
|
Delayed::Worker.logger = Logger.new($stdout)
|
59
63
|
Delayed::Worker.logger.level = Logger::DEBUG
|
data/lib/loggable/version.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require_relative 'loggable/version'
|
4
4
|
require_relative 'loggable/railtie' if defined?(Rails::Railtie)
|
5
|
+
require_relative 'loggable/opentelemetry_config'
|
5
6
|
require_relative 'loggable/ecs_logging/formatter_monkey_patch'
|
6
7
|
require_relative 'loggable/lograge/formatter'
|
7
8
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: researchable_loggable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Researchable
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ecs-logging
|
@@ -52,6 +52,48 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: opentelemetry-exporter-otlp
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.28'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.28'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: opentelemetry-instrumentation-all
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.63'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.63'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: opentelemetry-sdk
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.5'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.5'
|
55
97
|
description: |2
|
56
98
|
Researchable's Loggable relies on lograge and elastic's ecs format to log events in a way that is easy to ingest by
|
57
99
|
logstash. This enables log correlation with traces across multiple services.
|
@@ -74,6 +116,7 @@ files:
|
|
74
116
|
- Rakefile
|
75
117
|
- lib/loggable/ecs_logging/formatter_monkey_patch.rb
|
76
118
|
- lib/loggable/lograge/formatter.rb
|
119
|
+
- lib/loggable/opentelemetry_config.rb
|
77
120
|
- lib/loggable/railtie.rb
|
78
121
|
- lib/loggable/version.rb
|
79
122
|
- lib/researchable_loggable.rb
|
@@ -81,13 +124,13 @@ files:
|
|
81
124
|
- node_modules/semantic-release-rubygem/src/__tests__/fixtures/prerelease/lib/test-gem/version.rb
|
82
125
|
- node_modules/semantic-release-rubygem/src/__tests__/fixtures/valid/lib/test-gem/version.rb
|
83
126
|
- sig/loggable.rbs
|
84
|
-
homepage: https://gitlab.com/researchable/general/gems/loggable/-/blob/v1.
|
127
|
+
homepage: https://gitlab.com/researchable/general/gems/loggable/-/blob/v1.2.0/README.md
|
85
128
|
licenses:
|
86
129
|
- MIT
|
87
130
|
metadata:
|
88
|
-
homepage_uri: https://gitlab.com/researchable/general/gems/loggable/-/blob/v1.
|
131
|
+
homepage_uri: https://gitlab.com/researchable/general/gems/loggable/-/blob/v1.2.0/README.md
|
89
132
|
source_code_uri: https://gitlab.com/researchable/general/gems/loggable
|
90
|
-
changelog_uri: https://gitlab.com/researchable/general/gems/loggable/-/blob/v1.
|
133
|
+
changelog_uri: https://gitlab.com/researchable/general/gems/loggable/-/blob/v1.2.0/CHANGELOG.md
|
91
134
|
post_install_message:
|
92
135
|
rdoc_options: []
|
93
136
|
require_paths:
|
@@ -103,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
146
|
- !ruby/object:Gem::Version
|
104
147
|
version: '0'
|
105
148
|
requirements: []
|
106
|
-
rubygems_version: 3.
|
149
|
+
rubygems_version: 3.5.11
|
107
150
|
signing_key:
|
108
151
|
specification_version: 4
|
109
152
|
summary: Researchable's gem to standardize logging on all Rails applications.
|