chronos-ruby 1.2.0.pre.1 → 1.2.0
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
- data/CHANGELOG.md +33 -0
- data/README.md +17 -14
- data/docs/compatibility.md +2 -2
- data/docs/configuration.md +1 -1
- data/docs/release-1.2-readiness.md +33 -0
- data/lib/chronos/configuration/snapshot.rb +2 -2
- data/lib/chronos/configuration.rb +2 -1
- data/lib/chronos/rails/installer.rb +19 -0
- data/lib/chronos/rails.rb +13 -1
- data/lib/chronos/version.rb +1 -1
- data/lib/generators/chronos/install/templates/chronos.rb +52 -10
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 77021c8f603c5908e1e31bb85824a1dcadb6b73917492f51e617128a81170157
|
|
4
|
+
data.tar.gz: af6c9e930a0c6ea86154c9cfb89b60e2dd6920d934d2afca611a2d129496fa3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f2b69c2ef1d1acaaf1e6ded9182e2daeb78549b71ae48e06b0e982fe79d41655f6c4d5c44a0736f683cdb476a90558d5df2561e2f090013e235d4a3ccc1eeddd
|
|
7
|
+
data.tar.gz: 4989786700879e83e42fb70b9bdfec2e025271d0f97edf294d75e1c2138f40fb1e80e8a7477cadb4cd634fa3fb1c2e80295b7b47858444fad4903df2e831d918
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,39 @@ All notable changes are documented here. The project follows Semantic Versioning
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [1.2.0] - 2026-08-12
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- automatic Sidekiq client and server middleware installation when Sidekiq is available in a Rails application;
|
|
12
|
+
- Rails application namespace discovery as the default service name when `CHRONOS_SERVICE_NAME` is absent;
|
|
13
|
+
- environment-driven defaults for the most frequently customized Rails, transport, privacy, and APM settings in the generated initializer.
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- promoted the Ruby 2.7–3.4 transitional line from `1.2.0.pre.2` to the stable `1.2.0` release;
|
|
18
|
+
- simplified the generated Rails initializer while retaining safe SDK defaults and explicit application overrides;
|
|
19
|
+
- kept the official Chronos endpoint internal instead of exposing `config.host` in generated initializers;
|
|
20
|
+
- Sidekiq telemetry now activates through the ordinary Rails integration without requiring `chronos/sidekiq` explicitly.
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- configuration snapshots no longer freeze the Rails-owned logger, preventing `FrozenError` during later Rails 8 and dotenv logger initialization;
|
|
25
|
+
- Rails logger lookup and optional Sidekiq installation remain contained so integration failures cannot abort application boot.
|
|
26
|
+
|
|
27
|
+
### Security
|
|
28
|
+
|
|
29
|
+
- boolean environment overrides accept only explicit true/false forms and fall back to documented safe defaults;
|
|
30
|
+
- existing bounded payload, sanitization, trace validation, and optional OpenTelemetry behavior remain unchanged under protocol v1.
|
|
31
|
+
|
|
32
|
+
## [1.2.0.pre.2] - 2026-08-11
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- the Rails install generator now writes every public configuration option with explanatory English comments;
|
|
37
|
+
- the official `https://chronosmonitor.com.br` endpoint is now the default host, including when applications omit `config.host`;
|
|
38
|
+
- generated initializers no longer read `CHRONOS_HOST`, while explicit `config.host` assignments remain supported.
|
|
39
|
+
|
|
7
40
|
## [1.2.0.pre.1] - 2026-08-11
|
|
8
41
|
|
|
9
42
|
### Added
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Chronos Ruby
|
|
2
2
|
|
|
3
|
-
Chronos Ruby 1.
|
|
3
|
+
Chronos Ruby 1.2.0 é o agente para enviar exceções, métricas e telemetria limitada de aplicações Ruby e Rails ao Chronos. Esta é a linha estável atual para Ruby 2.7–3.4, compatível com o protocolo v1.
|
|
4
4
|
|
|
5
5
|
## O que a gem coleta
|
|
6
6
|
|
|
@@ -24,7 +24,7 @@ A gem não varre variáveis de ambiente, sistema de arquivos ou lockfiles e não
|
|
|
24
24
|
|
|
25
25
|
## Versões Ruby e Rails suportadas
|
|
26
26
|
|
|
27
|
-
A versão
|
|
27
|
+
A versão estável 1.2.0 atende a linha transitional para Ruby 2.7–3.4, Rails 7.x e Sidekiq 7. Ela adiciona contexto por Fiber, Rails Error Reporter, Action Cable, Faraday, Trace Context W3C opcional, integração automática com Sidekiq em Rails e coexistência com um SDK OpenTelemetry já configurado. Combinações ainda classificadas como `Best effort` devem ser validadas pela aplicação antes da adoção em produção; as linhas legadas permanecem disponíveis em releases anteriores.
|
|
28
28
|
|
|
29
29
|
Rubies e frameworks antigos estão fora do suporte de segurança de seus mantenedores. A Chronos oferece compatibilidade técnica, não manutenção de segurança do runtime. Veja [Compatibilidade](docs/compatibility.md).
|
|
30
30
|
|
|
@@ -33,14 +33,14 @@ Rubies e frameworks antigos estão fora do suporte de segurança de seus mantene
|
|
|
33
33
|
Obrigatório: adicione a versão estável ao `Gemfile`.
|
|
34
34
|
|
|
35
35
|
```ruby
|
|
36
|
-
gem "chronos-ruby", "~> 1.
|
|
36
|
+
gem "chronos-ruby", "~> 1.2.0"
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
Use Bundler 2 em um runtime suportado:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
42
|
-
gem install bundler -v
|
|
43
|
-
bundle
|
|
42
|
+
gem install bundler -v "~> 2.4"
|
|
43
|
+
bundle install
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
Sem Bundler:
|
|
@@ -67,7 +67,8 @@ A Versão 0.5 introduziu Railtie, middleware e subscribers idempotentes por APIs
|
|
|
67
67
|
|
|
68
68
|
## Configuração mínima
|
|
69
69
|
|
|
70
|
-
Obrigatório quando o agente está habilitado: `project_id
|
|
70
|
+
Obrigatório quando o agente está habilitado: `project_id` e `project_key`. O `host` usa
|
|
71
|
+
`https://chronosmonitor.com.br` por padrão. Recomendado: definir ambiente e serviço explicitamente.
|
|
71
72
|
|
|
72
73
|
```ruby
|
|
73
74
|
require "chronos"
|
|
@@ -75,7 +76,7 @@ require "chronos"
|
|
|
75
76
|
Chronos.configure do |config|
|
|
76
77
|
config.project_id = ENV["CHRONOS_PROJECT_ID"]
|
|
77
78
|
config.project_key = ENV["CHRONOS_PROJECT_KEY"]
|
|
78
|
-
config.host = "https://
|
|
79
|
+
config.host = "https://chronosmonitor.com.br"
|
|
79
80
|
config.environment = ENV["APP_ENV"] || "production"
|
|
80
81
|
config.service_name = "billing"
|
|
81
82
|
config.app_version = ENV["APP_VERSION"]
|
|
@@ -204,15 +205,18 @@ Por padrão, SQL bruto e binds não são lidos pelo pipeline de análise. A insp
|
|
|
204
205
|
|
|
205
206
|
## Sidekiq e Active Job
|
|
206
207
|
|
|
207
|
-
A integração
|
|
208
|
+
A integração Rails detecta o Sidekiq e instala automaticamente os middlewares de cliente e servidor. O carregamento
|
|
209
|
+
explícito continua disponível para aplicações sem Rails e suporta a API pública de middleware do Sidekiq 7:
|
|
208
210
|
|
|
209
211
|
O suporte histórico começou em `0.6.0.pre.1`; aplicações em Sidekiq 4/5 devem permanecer numa release legada compatível.
|
|
210
212
|
|
|
211
213
|
```ruby
|
|
212
214
|
gem "sidekiq", "~> 5.0"
|
|
213
|
-
gem "chronos-ruby", "~> 1.1.0"
|
|
215
|
+
gem "chronos-ruby", "~> 1.1.0"
|
|
214
216
|
```
|
|
215
217
|
|
|
218
|
+
Em uma aplicação Ruby sem Rails, use `require "chronos/sidekiq"`.
|
|
219
|
+
|
|
216
220
|
O envelope de contexto não altera argumentos públicos e contém somente IDs limitados de trace/span/request e flags. Active Job usa um campo serializado com namespace (`chronos_context`) e hooks públicos. Erros aninhados são deduplicados e reerguidos. Veja [Sidekiq legado](docs/modules/sidekiq-legacy.md), [Active Job](docs/modules/active-job.md) e [Jobs](docs/modules/job-monitoring.md).
|
|
217
221
|
|
|
218
222
|
## Deploy tracking
|
|
@@ -304,21 +308,20 @@ Migre por etapas e mantenha os dois agentes juntos somente durante a validação
|
|
|
304
308
|
|
|
305
309
|
## Desenvolvimento local
|
|
306
310
|
|
|
307
|
-
Instale
|
|
311
|
+
Instale as dependências:
|
|
308
312
|
|
|
309
313
|
```bash
|
|
310
|
-
gem install bundler -v 1.17.3
|
|
311
314
|
bin/setup
|
|
312
315
|
```
|
|
313
316
|
|
|
314
|
-
Use `bin/console` para inspeção e `bundle
|
|
317
|
+
Use `bin/console` para inspeção e `bundle exec rake install` para instalar a fonte localmente. A arquitetura hexagonal está descrita em [Arquitetura](docs/architecture.md).
|
|
315
318
|
|
|
316
319
|
## Testes
|
|
317
320
|
|
|
318
321
|
Execute suíte e lint no runtime atual:
|
|
319
322
|
|
|
320
323
|
```bash
|
|
321
|
-
bundle
|
|
324
|
+
bundle exec rake
|
|
322
325
|
```
|
|
323
326
|
|
|
324
327
|
A matriz CI cobre a linha transitional e os checks de pacote/documentação; workflows legados preservam evidência das releases anteriores.
|
data/docs/compatibility.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Compatibility
|
|
2
2
|
|
|
3
|
-
Chronos Ruby 1.2.0
|
|
3
|
+
Chronos Ruby 1.2.0 is the current stable release of the transitional line for modern Ruby, Rails, and Sidekiq applications. Individual combinations remain `Best effort` until their dedicated CI and real-application gates pass; a stable package version does not by itself promote an unverified combination to `Supported`. Technical compatibility does not make an end-of-life Ruby, Rails, Rack, or Sidekiq release secure. Versions 1.0 and 1.1 remain the frozen legacy line.
|
|
4
4
|
|
|
5
5
|
## Core and Rack
|
|
6
6
|
|
|
@@ -27,7 +27,7 @@ Chronos Ruby 1.2.0.pre.1 is the first candidate of the transitional line for Rai
|
|
|
27
27
|
|
|
28
28
|
Active Job uses the public `serialize`, `deserialize`, and `perform_now` extension points with a bounded namespaced field. Support follows the validated Rails pairs above. Adapters that bypass these hooks require their own evidence.
|
|
29
29
|
|
|
30
|
-
Historical evidence remains in [Version 1.0 readiness](release-1.0-readiness.md) and [Version 1.1 readiness](release-1.1-readiness.md).
|
|
30
|
+
Release evidence is recorded in [Version 1.2 readiness](release-1.2-readiness.md). Historical evidence remains in [Version 1.0 readiness](release-1.0-readiness.md) and [Version 1.1 readiness](release-1.1-readiness.md).
|
|
31
31
|
|
|
32
32
|
Status meanings:
|
|
33
33
|
|
data/docs/configuration.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|---|---:|---|---|
|
|
7
7
|
| `project_id` | Yes when enabled | `nil` | Public project identifier included in the envelope |
|
|
8
8
|
| `project_key` | Yes when enabled | `nil` | Secret authentication key sent only as an HTTP header |
|
|
9
|
-
| `host` |
|
|
9
|
+
| `host` | Optional | `https://chronosmonitor.com.br` | Absolute Chronos HTTP endpoint; HTTPS is required by default |
|
|
10
10
|
| `environment` | Recommended | `production` | Application environment |
|
|
11
11
|
| `app_version` | Optional | `nil` | Application release/version identifier |
|
|
12
12
|
| `service_name` | Recommended | `nil` | Logical service name |
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Version 1.2 release readiness
|
|
2
|
+
|
|
3
|
+
Version `1.2.0` promotes the transitional Ruby 2.7–3.4 line to a stable package. It includes Rails 7 integration, Sidekiq 7 middleware, fiber-aware context, optional W3C Trace Context, Rails Error Reporter, Action Cable, Faraday, and coexistence with an application-managed OpenTelemetry SDK. The wire protocol remains `schema_version: "1.0"`.
|
|
4
|
+
|
|
5
|
+
## Release gates
|
|
6
|
+
|
|
7
|
+
The `v1.2.0` tag must match `Chronos::VERSION`. The release workflow blocks publishing until all of these jobs succeed:
|
|
8
|
+
|
|
9
|
+
- the full RSpec and RuboCop suite on Ruby 2.7, 3.0, 3.1, 3.2, 3.3, and 3.4;
|
|
10
|
+
- documentation and contract verification through `script/verify_docs`;
|
|
11
|
+
- bounded query-analysis and comparative benchmarks;
|
|
12
|
+
- the 500-event fake-endpoint delivery and privacy gate;
|
|
13
|
+
- a second full suite run on the publishing runtime;
|
|
14
|
+
- gem build, SHA-256 checksum, SPDX SBOM generation, and RubyGems Trusted Publishing.
|
|
15
|
+
|
|
16
|
+
Local release preparation must additionally verify syntax, package contents, version consistency, and a clean generated initializer. Publication is performed only by the protected GitHub Actions environment; do not run `gem push` manually.
|
|
17
|
+
|
|
18
|
+
## Compatibility claims
|
|
19
|
+
|
|
20
|
+
A stable gem version and a supported framework/runtime pair are separate claims. Only combinations with complete CI and real-application evidence may be marked `Supported` in [compatibility](compatibility.md). Other intended combinations remain `Best effort` and should be validated in staging before production adoption.
|
|
21
|
+
|
|
22
|
+
Legacy Ruby 2.2–2.6, Rails 4/5, and Sidekiq 4/5 applications must remain on a compatible 1.0/1.1 release. Version 1.2 requires Ruby `>= 2.7` and `< 3.5`.
|
|
23
|
+
|
|
24
|
+
## Publishing
|
|
25
|
+
|
|
26
|
+
After the final commit and all branch checks are green:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
git tag v1.2.0
|
|
30
|
+
git push origin v1.2.0
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
After Trusted Publishing completes, verify a clean install and run `chronos:verify_integration` against a non-production project before announcing the release as latest.
|
|
@@ -3,7 +3,7 @@ module Chronos
|
|
|
3
3
|
#
|
|
4
4
|
# @responsibility Expose validated settings without mutable containers.
|
|
5
5
|
# @motivation Keep capture behavior stable while multiple threads run.
|
|
6
|
-
# @limits
|
|
6
|
+
# @limits Snapshot values cannot be edited; the host application's logger remains externally owned.
|
|
7
7
|
# @collaborators Configuration and runtime services.
|
|
8
8
|
# @thread_safety Safe to share between threads after construction.
|
|
9
9
|
# @compatibility Ruby 2.2.10 through Ruby 2.6.
|
|
@@ -17,7 +17,7 @@ module Chronos
|
|
|
17
17
|
def initialize(values)
|
|
18
18
|
Configuration::ATTRIBUTES.each do |attribute|
|
|
19
19
|
value = values[attribute]
|
|
20
|
-
deep_freeze(value)
|
|
20
|
+
deep_freeze(value) unless attribute == :logger
|
|
21
21
|
instance_variable_set("@#{attribute}", value)
|
|
22
22
|
end
|
|
23
23
|
freeze
|
|
@@ -23,6 +23,7 @@ module Chronos
|
|
|
23
23
|
class Configuration
|
|
24
24
|
include Internal::ConfigurationValidation
|
|
25
25
|
include Internal::ApmConfigurationValidation
|
|
26
|
+
DEFAULT_HOST = "https://chronosmonitor.com.br".freeze
|
|
26
27
|
DEFAULT_BLOCKLIST_KEYS = %w(
|
|
27
28
|
password password_confirmation passwd secret api_key apikey authorization
|
|
28
29
|
token access_token refresh_token private_key client_secret cookie set-cookie
|
|
@@ -106,7 +107,7 @@ module Chronos
|
|
|
106
107
|
def initialize_core_defaults
|
|
107
108
|
@project_id = nil
|
|
108
109
|
@project_key = nil
|
|
109
|
-
@host =
|
|
110
|
+
@host = DEFAULT_HOST
|
|
110
111
|
@environment = "production"
|
|
111
112
|
@app_version = nil
|
|
112
113
|
@service_name = nil
|
|
@@ -34,6 +34,7 @@ module Chronos
|
|
|
34
34
|
|
|
35
35
|
install_middleware(application, options)
|
|
36
36
|
install_active_job
|
|
37
|
+
install_sidekiq
|
|
37
38
|
install_error_reporter
|
|
38
39
|
@subscriber.install
|
|
39
40
|
self.class.applications[application.object_id] = true
|
|
@@ -66,6 +67,24 @@ module Chronos
|
|
|
66
67
|
Chronos::Integrations::ActiveJob.install(::ActiveJob::Base, @notifier)
|
|
67
68
|
end
|
|
68
69
|
|
|
70
|
+
def install_sidekiq
|
|
71
|
+
library = sidekiq_library
|
|
72
|
+
return false unless library
|
|
73
|
+
|
|
74
|
+
Chronos::Integrations::Sidekiq.install(library, @notifier)
|
|
75
|
+
rescue StandardError
|
|
76
|
+
false
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def sidekiq_library
|
|
80
|
+
return ::Sidekiq if defined?(::Sidekiq)
|
|
81
|
+
|
|
82
|
+
require "sidekiq"
|
|
83
|
+
::Sidekiq if defined?(::Sidekiq)
|
|
84
|
+
rescue LoadError
|
|
85
|
+
nil
|
|
86
|
+
end
|
|
87
|
+
|
|
69
88
|
def install_error_reporter
|
|
70
89
|
return false unless defined?(::Rails) && ::Rails.respond_to?(:error)
|
|
71
90
|
|
data/lib/chronos/rails.rb
CHANGED
|
@@ -3,6 +3,7 @@ require "chronos/rails/active_record_query_inspector"
|
|
|
3
3
|
require "chronos/rails/notifications_subscriber"
|
|
4
4
|
require "chronos/rails/error_reporter_subscriber"
|
|
5
5
|
require "chronos/integrations/active_job"
|
|
6
|
+
require "chronos/integrations/sidekiq"
|
|
6
7
|
require "chronos/rails/installer"
|
|
7
8
|
|
|
8
9
|
require "chronos/rails/railtie" if defined?(::Rails::Railtie)
|
|
@@ -15,5 +16,16 @@ module Chronos
|
|
|
15
16
|
# @limits Version 0.5 targets public APIs present in Rails 4.2 and 5.2.
|
|
16
17
|
# @thread_safety Installation and subscriptions are protected against duplication.
|
|
17
18
|
# @compatibility Rails 4.2 through Rails 5.2 with their supported legacy Rubies.
|
|
18
|
-
module Rails
|
|
19
|
+
module Rails
|
|
20
|
+
class << self
|
|
21
|
+
# Returns the namespace that owns the Rails application class.
|
|
22
|
+
def application_name(application = ::Rails.application)
|
|
23
|
+
class_name = application.class.name.to_s
|
|
24
|
+
name = class_name.sub(/::Application\z/, "")
|
|
25
|
+
name.empty? || name == class_name ? nil : name
|
|
26
|
+
rescue StandardError
|
|
27
|
+
nil
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
19
31
|
end
|
data/lib/chronos/version.rb
CHANGED
|
@@ -1,20 +1,62 @@
|
|
|
1
1
|
require "chronos/rails"
|
|
2
2
|
|
|
3
|
+
# Common Chronos settings. Every environment variable is optional unless your
|
|
4
|
+
# Chronos project requires it; omitted values fall back to safe SDK defaults.
|
|
5
|
+
env_boolean = lambda do |name, default|
|
|
6
|
+
value = ENV[name]
|
|
7
|
+
normalized = value.to_s.downcase
|
|
8
|
+
next true if %w(1 true yes on).include?(normalized)
|
|
9
|
+
next false if %w(0 false no off).include?(normalized)
|
|
10
|
+
|
|
11
|
+
default
|
|
12
|
+
end
|
|
13
|
+
|
|
3
14
|
Chronos.configure do |config|
|
|
4
|
-
#
|
|
15
|
+
# Identification and authentication
|
|
5
16
|
config.project_id = ENV["CHRONOS_PROJECT_ID"]
|
|
6
17
|
config.project_key = ENV["CHRONOS_PROJECT_KEY"]
|
|
7
|
-
config.
|
|
8
|
-
config.
|
|
9
|
-
config.service_name = ENV["CHRONOS_SERVICE_NAME"]
|
|
18
|
+
config.environment = ENV.fetch("CHRONOS_ENVIRONMENT", Rails.env.to_s)
|
|
19
|
+
config.service_name = ENV["CHRONOS_SERVICE_NAME"] || Chronos::Rails.application_name
|
|
10
20
|
config.app_version = ENV["CHRONOS_APP_VERSION"]
|
|
11
|
-
config.
|
|
21
|
+
config.revision = ENV["CHRONOS_REVISION"]
|
|
22
|
+
|
|
23
|
+
# General behavior and transport
|
|
24
|
+
config.enabled = env_boolean.call("CHRONOS_ENABLED", true)
|
|
25
|
+
config.error_notifications = env_boolean.call("CHRONOS_ERROR_NOTIFICATIONS", true)
|
|
26
|
+
config.ssl_verify = env_boolean.call("CHRONOS_SSL_VERIFY", true)
|
|
27
|
+
config.timeout = ENV.fetch("CHRONOS_TIMEOUT", "5").to_f
|
|
28
|
+
config.open_timeout = ENV.fetch("CHRONOS_OPEN_TIMEOUT", "2").to_f
|
|
29
|
+
config.queue_size = ENV.fetch("CHRONOS_QUEUE_SIZE", "100").to_i
|
|
30
|
+
config.workers = ENV.fetch("CHRONOS_WORKERS", "1").to_i
|
|
31
|
+
config.sampling_rate = ENV.fetch("CHRONOS_SAMPLING_RATE", "1.0").to_f
|
|
32
|
+
config.ignored_environments = ENV.fetch("CHRONOS_IGNORED_ENVIRONMENTS", "")
|
|
33
|
+
.split(",").map(&:strip).reject(&:empty?)
|
|
34
|
+
|
|
35
|
+
# Rails integration and privacy
|
|
36
|
+
config.root_directory = Rails.root.to_s
|
|
37
|
+
config.rails_enabled = env_boolean.call("CHRONOS_RAILS_ENABLED", true)
|
|
38
|
+
config.rails_capture_in_console = env_boolean.call("CHRONOS_RAILS_CAPTURE_IN_CONSOLE", false)
|
|
39
|
+
config.rails_capture_in_test = env_boolean.call("CHRONOS_RAILS_CAPTURE_IN_TEST", false)
|
|
40
|
+
config.anonymize_ip = env_boolean.call("CHRONOS_ANONYMIZE_IP", true)
|
|
41
|
+
|
|
42
|
+
# Application performance monitoring
|
|
43
|
+
config.apm_enabled = env_boolean.call("CHRONOS_APM_ENABLED", true)
|
|
44
|
+
config.apm_slow_query_threshold_ms = ENV.fetch(
|
|
45
|
+
"CHRONOS_APM_SLOW_QUERY_THRESHOLD_MS", "500"
|
|
46
|
+
).to_f
|
|
47
|
+
config.apm_long_transaction_threshold_ms = ENV.fetch(
|
|
48
|
+
"CHRONOS_APM_LONG_TRANSACTION_THRESHOLD_MS", "1000"
|
|
49
|
+
).to_f
|
|
50
|
+
config.apm_n_plus_one_threshold = ENV.fetch("CHRONOS_APM_N_PLUS_ONE_THRESHOLD", "5").to_i
|
|
51
|
+
config.external_http_enabled = env_boolean.call("CHRONOS_EXTERNAL_HTTP_ENABLED", false)
|
|
12
52
|
|
|
13
|
-
#
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
53
|
+
# Chronos keeps the shared Rails logger mutable and contains logger failures.
|
|
54
|
+
begin
|
|
55
|
+
config.logger = Rails.logger if Rails.respond_to?(:logger)
|
|
56
|
+
rescue StandardError
|
|
57
|
+
# Chronos safely continues without an application logger.
|
|
58
|
+
end
|
|
17
59
|
end
|
|
18
60
|
|
|
19
|
-
#
|
|
61
|
+
# Installation is idempotent, regardless of when the Railtie was evaluated.
|
|
20
62
|
Chronos::Rails::Installer.new.install(Rails.application)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: chronos-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.0
|
|
4
|
+
version: 1.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Antonio Jefferson
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-08-
|
|
11
|
+
date: 2026-08-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -164,6 +164,7 @@ files:
|
|
|
164
164
|
- docs/protocol-v1.md
|
|
165
165
|
- docs/release-1.0-readiness.md
|
|
166
166
|
- docs/release-1.1-readiness.md
|
|
167
|
+
- docs/release-1.2-readiness.md
|
|
167
168
|
- docs/security-review.md
|
|
168
169
|
- docs/semver.md
|
|
169
170
|
- docs/troubleshooting.md
|
|
@@ -267,9 +268,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
267
268
|
version: '3.5'
|
|
268
269
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
269
270
|
requirements:
|
|
270
|
-
- - "
|
|
271
|
+
- - ">="
|
|
271
272
|
- !ruby/object:Gem::Version
|
|
272
|
-
version:
|
|
273
|
+
version: '0'
|
|
273
274
|
requirements: []
|
|
274
275
|
rubygems_version: 3.4.22
|
|
275
276
|
signing_key:
|