chronos-ruby 1.1.0 → 1.1.1
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 +8 -0
- data/README.md +9 -8
- data/docs/configuration.md +1 -1
- data/lib/chronos/configuration.rb +2 -1
- data/lib/chronos/version.rb +1 -1
- data/lib/generators/chronos/install/templates/chronos.rb +152 -6
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f2ff96797e03af3f2ec69047e39bd05cce161f74704264851903d72508120399
|
|
4
|
+
data.tar.gz: 7b809747cbdfcee40abc07989945c76b25576176f20b8792ac6840f6b9624e36
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 15bbdc2faf14f1e2684a9c3f27ee5fec193c34cd3342d9910e3a617ba9ea113e3e221904fb0d736c842465f4bbbe59d1d293b32cce2f820f954156fc36ae41d4
|
|
7
|
+
data.tar.gz: c47fbd431496ab36cbc3d7c0b1cc5a0360ba6433cfc1aef1efce12b14a793f7ea7cda443da2e27edcde88604de3c203aa911ce5846e9acf2361bf35bc4fe25b9
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,14 @@ All notable changes are documented here. The project follows Semantic Versioning
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [1.1.1] - 2026-08-11
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- the Rails install generator now writes every public configuration option with explanatory English comments;
|
|
12
|
+
- the official `https://chronosmonitor.com.br` endpoint is now the default host when applications omit `config.host`;
|
|
13
|
+
- generated initializers no longer read `CHRONOS_HOST`, while explicit `config.host` assignments remain supported.
|
|
14
|
+
|
|
7
15
|
## [1.1.0] - 2026-08-05
|
|
8
16
|
|
|
9
17
|
### Added
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Chronos Ruby
|
|
2
2
|
|
|
3
|
-
Chronos Ruby 1.1.
|
|
3
|
+
Chronos Ruby 1.1.1 é o agente independente de framework para enviar exceções e telemetria limitada de aplicações Ruby ao Chronos. Esta é a linha estável legado, compatível com o protocolo v1 e voltada a Ruby 2.2.10–2.6.
|
|
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 1.1.
|
|
27
|
+
A versão 1.1.1 suporta Ruby puro e Rack em Ruby 2.2.10, 2.3.8, 2.4.10, 2.5.9 e 2.6.10. As combinações Rails validadas são Rails 4.2 com Ruby 2.2.10/2.3.8 e Rails 5.2 com Ruby 2.5.9/2.6.10. Sidekiq 4.2.10 com Ruby 2.2.10 e Sidekiq 5.2.10 com Ruby 2.5.9 também possuem gates dedicados. Ruby 2.7/Rails 6 não é declarado nesta release porque ainda não possui aplicação e matriz completas.
|
|
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,7 +33,7 @@ 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.1.
|
|
36
|
+
gem "chronos-ruby", "~> 1.1.1"
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
Em runtimes antigos, use Bundler compatível:
|
|
@@ -46,7 +46,7 @@ bundle _1.17.3_ install
|
|
|
46
46
|
Sem Bundler:
|
|
47
47
|
|
|
48
48
|
```bash
|
|
49
|
-
gem install chronos-ruby -v 1.1.
|
|
49
|
+
gem install chronos-ruby -v 1.1.1
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
## Instalação em Rails
|
|
@@ -54,7 +54,7 @@ gem install chronos-ruby -v 1.1.0
|
|
|
54
54
|
Obrigatório: carregue a integração Rails explicitamente para manter Rails/ActiveSupport fora de aplicações Ruby puras.
|
|
55
55
|
|
|
56
56
|
```ruby
|
|
57
|
-
gem "chronos-ruby", "~> 1.1.
|
|
57
|
+
gem "chronos-ruby", "~> 1.1.1", :require => "chronos/rails"
|
|
58
58
|
```
|
|
59
59
|
|
|
60
60
|
Gere o initializer:
|
|
@@ -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"]
|
|
@@ -208,7 +209,7 @@ A versão `0.6.0.pre.1` introduziu middleware Sidekiq 4/5; a API estável manté
|
|
|
208
209
|
|
|
209
210
|
```ruby
|
|
210
211
|
gem "sidekiq", "~> 5.0"
|
|
211
|
-
gem "chronos-ruby", "~> 1.1.
|
|
212
|
+
gem "chronos-ruby", "~> 1.1.1", :require => "chronos/sidekiq"
|
|
212
213
|
```
|
|
213
214
|
|
|
214
215
|
O envelope de contexto não altera argumentos públicos e contém somente IDs limitados de trace/request. 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).
|
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 |
|
|
@@ -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
|
|
@@ -105,7 +106,7 @@ module Chronos
|
|
|
105
106
|
def initialize_core_defaults
|
|
106
107
|
@project_id = nil
|
|
107
108
|
@project_key = nil
|
|
108
|
-
@host =
|
|
109
|
+
@host = DEFAULT_HOST
|
|
109
110
|
@environment = "production"
|
|
110
111
|
@app_version = nil
|
|
111
112
|
@service_name = nil
|
data/lib/chronos/version.rb
CHANGED
|
@@ -1,20 +1,166 @@
|
|
|
1
1
|
require "chronos/rails"
|
|
2
2
|
|
|
3
|
+
# This initializer lists every public Chronos option so the application's
|
|
4
|
+
# monitoring behavior is explicit and can be reviewed in one place.
|
|
3
5
|
Chronos.configure do |config|
|
|
4
|
-
#
|
|
6
|
+
# Identifies the project that will receive monitoring events.
|
|
5
7
|
config.project_id = ENV["CHRONOS_PROJECT_ID"]
|
|
8
|
+
# Authenticates event delivery. Keep this value in a secret manager.
|
|
6
9
|
config.project_key = ENV["CHRONOS_PROJECT_KEY"]
|
|
7
|
-
|
|
10
|
+
# Defines the Chronos Monitor endpoint used to deliver events.
|
|
11
|
+
config.host = "https://chronosmonitor.com.br"
|
|
12
|
+
# Labels events with the current Rails environment.
|
|
8
13
|
config.environment = Rails.env.to_s
|
|
9
|
-
|
|
14
|
+
# Identifies the deployed application version.
|
|
10
15
|
config.app_version = ENV["CHRONOS_APP_VERSION"]
|
|
16
|
+
# Distinguishes this application from other monitored services.
|
|
17
|
+
config.service_name = ENV["CHRONOS_SERVICE_NAME"]
|
|
18
|
+
# Records the source revision, such as a Git commit SHA.
|
|
19
|
+
config.revision = ENV["CHRONOS_REVISION"]
|
|
20
|
+
# Associates events with a specific deployment.
|
|
21
|
+
config.deploy_id = ENV["CHRONOS_DEPLOY_ID"]
|
|
22
|
+
# Identifies the infrastructure region running the application.
|
|
23
|
+
config.region = ENV["CHRONOS_REGION"]
|
|
24
|
+
# Identifies the process, container, or host producing an event.
|
|
25
|
+
config.instance_id = ENV["CHRONOS_INSTANCE_ID"]
|
|
26
|
+
# Removes the application root from reported file paths.
|
|
27
|
+
config.root_directory = Rails.root.to_s
|
|
28
|
+
# Sends internal Chronos diagnostics through the Rails logger.
|
|
11
29
|
config.logger = Rails.logger if Rails.respond_to?(:logger)
|
|
12
30
|
|
|
13
|
-
#
|
|
14
|
-
config.
|
|
31
|
+
# Limits how long an established request waits for the server.
|
|
32
|
+
config.timeout = 5
|
|
33
|
+
# Limits how long Chronos waits while opening a connection.
|
|
34
|
+
config.open_timeout = 2
|
|
35
|
+
# Sets the maximum number of events in the in-memory queue.
|
|
36
|
+
config.queue_size = 100
|
|
37
|
+
# Sets the number of background delivery workers.
|
|
38
|
+
config.workers = 1
|
|
39
|
+
# Enables or disables all event collection and delivery.
|
|
40
|
+
config.enabled = true
|
|
41
|
+
# Controls whether captured exceptions are sent to Chronos.
|
|
42
|
+
config.error_notifications = true
|
|
43
|
+
# Prevents delivery from the listed application environments.
|
|
44
|
+
config.ignored_environments = []
|
|
45
|
+
# Routes outbound requests through a proxy URL when required.
|
|
46
|
+
config.proxy = nil
|
|
47
|
+
# Verifies the TLS certificate presented by the endpoint.
|
|
48
|
+
config.ssl_verify = true
|
|
49
|
+
# Identifies this SDK in outbound HTTP requests.
|
|
50
|
+
config.user_agent = "chronos-ruby/#{Chronos::VERSION}"
|
|
51
|
+
# Rejects serialized events larger than this number of bytes.
|
|
52
|
+
config.max_payload_size = 1_048_576
|
|
53
|
+
# Compresses request payloads with gzip when enabled.
|
|
54
|
+
config.gzip = false
|
|
55
|
+
|
|
56
|
+
# Removes values whose keys commonly contain private data.
|
|
57
|
+
config.blocklist_keys = Chronos::Configuration::DEFAULT_BLOCKLIST_KEYS.dup
|
|
58
|
+
# Keeps only the listed keys when this list is not empty.
|
|
59
|
+
config.allowlist_keys = []
|
|
60
|
+
# Applies custom callables that transform or discard events.
|
|
61
|
+
config.filters = []
|
|
62
|
+
# Replaces values for these keys with stable hashes.
|
|
63
|
+
config.hash_keys = []
|
|
64
|
+
# Removes the final segment of captured IP addresses.
|
|
65
|
+
config.anonymize_ip = true
|
|
66
|
+
# Discards events matching any configured ignore rule.
|
|
67
|
+
config.ignore_rules = []
|
|
68
|
+
# Limits the ignore rules evaluated for each event.
|
|
69
|
+
config.max_ignore_rules = 20
|
|
70
|
+
|
|
71
|
+
# Sets the number of retries after a recoverable failure.
|
|
72
|
+
config.max_retries = 3
|
|
73
|
+
# Sets the initial exponential-backoff delay in seconds.
|
|
74
|
+
config.retry_base_interval = 0.5
|
|
75
|
+
# Caps the retry delay in seconds.
|
|
76
|
+
config.retry_max_interval = 30
|
|
77
|
+
# Randomizes retry delays to prevent synchronized traffic.
|
|
78
|
+
config.retry_jitter = 0.25
|
|
79
|
+
# Keeps this many failed events for later delivery attempts.
|
|
80
|
+
config.backlog_size = 100
|
|
81
|
+
# Opens the circuit breaker after consecutive failures.
|
|
82
|
+
config.circuit_failure_threshold = 5
|
|
83
|
+
# Waits this many seconds before testing an open circuit.
|
|
84
|
+
config.circuit_reset_timeout = 30
|
|
85
|
+
# Allows bounded runtime configuration from the server.
|
|
86
|
+
config.remote_configuration = true
|
|
87
|
+
# Limits an accepted remote configuration response in bytes.
|
|
88
|
+
config.remote_config_max_bytes = 4_096
|
|
89
|
+
# Captures this fraction of eligible events, from 0.0 to 1.0.
|
|
90
|
+
config.sampling_rate = 1.0
|
|
91
|
+
# Restricts remote collection to these event categories.
|
|
92
|
+
config.enabled_event_types = %w(
|
|
93
|
+
exception request query job cache external_http dependencies deploy metric_batch
|
|
94
|
+
)
|
|
95
|
+
# Caps the server-requested delivery interval in seconds.
|
|
96
|
+
config.max_remote_send_interval = 60
|
|
97
|
+
|
|
98
|
+
# Stores request and trace context independently in each thread.
|
|
99
|
+
config.context_store = :thread_local
|
|
100
|
+
# Keeps this many recent breadcrumbs per execution context.
|
|
101
|
+
config.breadcrumb_capacity = 20
|
|
102
|
+
# Limits each serialized breadcrumb in bytes.
|
|
103
|
+
config.breadcrumb_max_bytes = 2_048
|
|
104
|
+
|
|
105
|
+
# Installs Rails request, job, cache, SQL, and error integrations.
|
|
106
|
+
config.rails_enabled = true
|
|
107
|
+
# Captures events from Rails console sessions when enabled.
|
|
15
108
|
config.rails_capture_in_console = false
|
|
109
|
+
# Captures events from the Rails test environment when enabled.
|
|
110
|
+
config.rails_capture_in_test = false
|
|
111
|
+
# Includes the request User-Agent in metadata when enabled.
|
|
16
112
|
config.rails_capture_user_agent = false
|
|
113
|
+
|
|
114
|
+
# Enables transaction, span, query, and performance aggregation.
|
|
115
|
+
config.apm_enabled = true
|
|
116
|
+
# Limits the metric groups retained between flushes.
|
|
117
|
+
config.apm_max_groups = 200
|
|
118
|
+
# Flushes APM aggregates after this many observations.
|
|
119
|
+
config.apm_flush_count = 100
|
|
120
|
+
# Sends at most this many APM items in one request.
|
|
121
|
+
config.apm_batch_size = 50
|
|
122
|
+
# Limits SQL queries recorded for one request or transaction.
|
|
123
|
+
config.apm_max_queries_per_request = 100
|
|
124
|
+
# Marks queries slower than this duration in milliseconds.
|
|
125
|
+
config.apm_slow_query_threshold_ms = 500
|
|
126
|
+
# Marks transactions longer than this duration in milliseconds.
|
|
127
|
+
config.apm_long_transaction_threshold_ms = 1_000
|
|
128
|
+
# Reports repeated equivalent queries after this count.
|
|
129
|
+
config.apm_n_plus_one_threshold = 5
|
|
130
|
+
# Defines duration buckets in milliseconds for APM histograms.
|
|
131
|
+
config.apm_histogram_buckets = [5, 10, 25, 50, 100, 250, 500, 1_000, 2_500, 5_000]
|
|
132
|
+
# Retains active trace state for this many seconds.
|
|
133
|
+
config.apm_trace_ttl_seconds = 60
|
|
134
|
+
# Normalizes SQL and records bounded analysis metadata.
|
|
135
|
+
config.apm_query_analysis_enabled = true
|
|
136
|
+
# Limits analyzed queries retained per transaction.
|
|
137
|
+
config.apm_query_analysis_max_queries = 100
|
|
138
|
+
# Enables database-specific inspection for slow queries.
|
|
139
|
+
config.apm_query_inspection_enabled = false
|
|
140
|
+
# Collects database query statistics when supported.
|
|
141
|
+
config.apm_query_statistics_enabled = false
|
|
142
|
+
# Collects query execution plans when supported.
|
|
143
|
+
config.apm_query_plan_enabled = false
|
|
144
|
+
# Inspects only queries at least this slow in milliseconds.
|
|
145
|
+
config.apm_query_inspection_min_duration_ms = 500
|
|
146
|
+
# Limits inspected queries retained per transaction.
|
|
147
|
+
config.apm_query_inspection_max_queries = 20
|
|
148
|
+
# Tracks database transaction lifecycles and durations.
|
|
149
|
+
config.apm_transaction_tracking_enabled = true
|
|
150
|
+
# Limits database connections tracked for transaction state.
|
|
151
|
+
config.apm_transaction_max_connections = 100
|
|
152
|
+
|
|
153
|
+
# Instruments supported outbound HTTP clients when enabled.
|
|
154
|
+
config.external_http_enabled = false
|
|
155
|
+
# Propagates Chronos trace headers on outbound requests.
|
|
156
|
+
config.external_http_trace_headers = true
|
|
157
|
+
# Controls cache key reporting; :none collects no key material.
|
|
158
|
+
config.cache_key_mode = :none
|
|
159
|
+
# Reports a bounded inventory of application dependencies.
|
|
160
|
+
config.dependency_reporting = true
|
|
161
|
+
# Limits dependencies included in an inventory event.
|
|
162
|
+
config.dependency_max_items = 100
|
|
17
163
|
end
|
|
18
164
|
|
|
19
|
-
#
|
|
165
|
+
# Installation is idempotent, regardless of when the Railtie was evaluated.
|
|
20
166
|
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.1.
|
|
4
|
+
version: 1.1.1
|
|
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-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|