chronos-ruby 1.2.0.pre.1 → 1.2.0.pre.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c13c2858edcb41d4b2a0bfc83049349ee13a5a9ecee873798750b4bf9f1da48c
4
- data.tar.gz: a21babcc28ce763e7d867f35064735d661214724c1ed9d256e8d174a1a04c5dc
3
+ metadata.gz: 28ccfc363bc7f73eb18a10d36e0457d8697ffe52dae4f939fa81a4cbe6938609
4
+ data.tar.gz: ac5d64237250a9d9d1e26da86649698dd09eda1afb7a115fb87eb2edf6d3183b
5
5
  SHA512:
6
- metadata.gz: 81ab0672785236e1ffaeecf0fbb5ae3187f319be349a06f724eee50dd0d20963afb74a84485267e8ea5e3a7dd37dacef15ab456783fee622bef901110b98344a
7
- data.tar.gz: 835ee551ddcec646a44376dcdfc09748e12c0fa360fee62365455e6776503a0597baed504a33276059853e652f5a90458ad7ae43bb582f7647303af9940a5d1f
6
+ metadata.gz: 58987b0079af3abcd99ee06f6c2739833719d95ae29ef7764997f37c01745f269521453d610a7bfd7b9081c26593590c469d58d52a502ab752668d1d1d2d4e19
7
+ data.tar.gz: ba3277ee0bbc7fd67186e605505659ae2db7a1add6cad35c08bcf30669b1e7140f5c004ad9ace8154d2a25a72af9d6938aacf2ac04ea0da4dd9924700b0c2df8
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.2.0.pre.2] - 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, including when applications omit `config.host`;
13
+ - generated initializers no longer read `CHRONOS_HOST`, while explicit `config.host` assignments remain supported.
14
+
7
15
  ## [1.2.0.pre.1] - 2026-08-11
8
16
 
9
17
  ### Added
data/README.md CHANGED
@@ -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 candidata 1.2.0.pre.1 inicia 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 e coexistência com um SDK OpenTelemetry já configurado. Use-a explicitamente em staging enquanto a matriz transitional é validada; as linhas legadas permanecem disponíveis em releases anteriores.
27
+ A versão candidata 1.2.0.pre.2 continua 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 e coexistência com um SDK OpenTelemetry já configurado. Use-a explicitamente em staging enquanto a matriz transitional é validada; 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
 
@@ -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`, `project_key` e `host` HTTPS. Recomendado: definir ambiente e serviço explicitamente.
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://chronos.example.com"
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"]
@@ -1,6 +1,6 @@
1
1
  # Compatibility
2
2
 
3
- Chronos Ruby 1.2.0.pre.1 is the first candidate of the transitional line for Rails 7 and Sidekiq 7. Combinations remain `Best effort` until their dedicated CI and real-application gates pass. 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.
3
+ Chronos Ruby 1.2.0.pre.2 is the current candidate of the transitional line for Rails 7 and Sidekiq 7. Combinations remain `Best effort` until their dedicated CI and real-application gates pass. 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
 
@@ -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` | Yes when enabled | `nil` | Absolute Chronos HTTP endpoint; HTTPS is required by default |
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
@@ -106,7 +107,7 @@ module Chronos
106
107
  def initialize_core_defaults
107
108
  @project_id = nil
108
109
  @project_key = nil
109
- @host = nil
110
+ @host = DEFAULT_HOST
110
111
  @environment = "production"
111
112
  @app_version = nil
112
113
  @service_name = nil
@@ -1,4 +1,4 @@
1
1
  module Chronos
2
2
  # Current version of the transitional Chronos Ruby agent.
3
- VERSION = "1.2.0.pre.1".freeze
3
+ VERSION = "1.2.0.pre.2".freeze
4
4
  end
@@ -1,20 +1,186 @@
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
- # Chronos reads only the environment variables explicitly selected here.
6
+ # Identification and authentication
7
+
8
+ # Identifies the project that will receive monitoring events.
5
9
  config.project_id = ENV["CHRONOS_PROJECT_ID"]
10
+ # Authenticates event delivery. Keep this value in a secret manager.
6
11
  config.project_key = ENV["CHRONOS_PROJECT_KEY"]
7
- config.host = ENV["CHRONOS_HOST"]
12
+ # Defines the Chronos Monitor endpoint used to deliver events.
13
+ config.host = "https://chronosmonitor.com.br"
14
+ # Labels events with the current Rails environment.
8
15
  config.environment = Rails.env.to_s
9
- config.service_name = ENV["CHRONOS_SERVICE_NAME"]
16
+ # Identifies the deployed application version in events and releases.
10
17
  config.app_version = ENV["CHRONOS_APP_VERSION"]
18
+ # Distinguishes this application from other monitored services.
19
+ config.service_name = ENV["CHRONOS_SERVICE_NAME"]
20
+ # Records the source revision, such as a Git commit SHA.
21
+ config.revision = ENV["CHRONOS_REVISION"]
22
+ # Associates events with a specific deployment.
23
+ config.deploy_id = ENV["CHRONOS_DEPLOY_ID"]
24
+ # Identifies the infrastructure region where the application is running.
25
+ config.region = ENV["CHRONOS_REGION"]
26
+ # Identifies the process, container, or host that produced an event.
27
+ config.instance_id = ENV["CHRONOS_INSTANCE_ID"]
28
+ # Removes the application root from file paths reported to Chronos.
29
+ config.root_directory = Rails.root.to_s
30
+ # Sends internal Chronos diagnostics through the Rails logger.
11
31
  config.logger = Rails.logger if Rails.respond_to?(:logger)
12
32
 
13
- # Safe legacy defaults: test and console integrations remain disabled.
14
- config.rails_capture_in_test = false
33
+ # Transport and delivery
34
+
35
+ # Limits how long an established request may wait for the Chronos server.
36
+ config.timeout = 5
37
+ # Limits how long Chronos may wait while opening a network connection.
38
+ config.open_timeout = 2
39
+ # Sets the maximum number of events waiting in the in-memory queue.
40
+ config.queue_size = 100
41
+ # Sets the number of background workers that deliver queued events.
42
+ config.workers = 1
43
+ # Enables or disables all Chronos event collection and delivery.
44
+ config.enabled = true
45
+ # Controls whether captured exceptions are sent to Chronos.
46
+ config.error_notifications = true
47
+ # Prevents delivery from the listed application environments.
48
+ config.ignored_environments = []
49
+ # Routes outbound requests through a proxy URL when one is required.
50
+ config.proxy = nil
51
+ # Verifies the TLS certificate presented by the Chronos endpoint.
52
+ config.ssl_verify = true
53
+ # Identifies this SDK in outbound HTTP requests.
54
+ config.user_agent = "chronos-ruby/#{Chronos::VERSION}"
55
+ # Rejects serialized events larger than this number of bytes.
56
+ config.max_payload_size = 1_048_576
57
+ # Compresses request payloads with gzip when enabled.
58
+ config.gzip = false
59
+
60
+ # Privacy and filtering
61
+
62
+ # Removes values whose keys commonly contain credentials or private data.
63
+ config.blocklist_keys = Chronos::Configuration::DEFAULT_BLOCKLIST_KEYS.dup
64
+ # Keeps only the listed keys when this list is not empty.
65
+ config.allowlist_keys = []
66
+ # Applies custom callables that can transform or discard events.
67
+ config.filters = []
68
+ # Replaces values for these keys with stable hashes instead of raw data.
69
+ config.hash_keys = []
70
+ # Removes the final segment of captured IP addresses.
71
+ config.anonymize_ip = true
72
+ # Discards events that match any configured ignore rule.
73
+ config.ignore_rules = []
74
+ # Limits the number of ignore rules evaluated for each event.
75
+ config.max_ignore_rules = 20
76
+
77
+ # Reliability and remote configuration
78
+
79
+ # Sets the number of delivery retries after a recoverable failure.
80
+ config.max_retries = 3
81
+ # Sets the initial delay, in seconds, for exponential retry backoff.
82
+ config.retry_base_interval = 0.5
83
+ # Caps the retry delay, in seconds.
84
+ config.retry_max_interval = 30
85
+ # Randomizes retry delays to prevent synchronized retry traffic.
86
+ config.retry_jitter = 0.25
87
+ # Keeps this many failed events in memory for later delivery attempts.
88
+ config.backlog_size = 100
89
+ # Opens the circuit breaker after this many consecutive failures.
90
+ config.circuit_failure_threshold = 5
91
+ # Waits this many seconds before testing an open circuit again.
92
+ config.circuit_reset_timeout = 30
93
+ # Allows the server to supply bounded runtime configuration updates.
94
+ config.remote_configuration = true
95
+ # Limits the size of an accepted remote configuration response, in bytes.
96
+ config.remote_config_max_bytes = 4_096
97
+ # Captures this fraction of eligible events, from 0.0 to 1.0.
98
+ config.sampling_rate = 1.0
99
+ # Restricts remote collection to these event categories.
100
+ config.enabled_event_types = %w(
101
+ exception request query job cache external_http dependencies deploy metric_batch
102
+ )
103
+ # Caps the server-requested interval between deliveries, in seconds.
104
+ config.max_remote_send_interval = 60
105
+
106
+ # Execution context and breadcrumbs
107
+
108
+ # Isolates trace and request context between concurrent fibers.
109
+ config.context_store = :fiber_local
110
+ # Keeps this many recent breadcrumbs per execution context.
111
+ config.breadcrumb_capacity = 20
112
+ # Limits the serialized size of each breadcrumb, in bytes.
113
+ config.breadcrumb_max_bytes = 2_048
114
+
115
+ # Rails integration
116
+
117
+ # Installs Rails request, job, cache, SQL, and error integrations.
118
+ config.rails_enabled = true
119
+ # Captures events from Rails console sessions when enabled.
15
120
  config.rails_capture_in_console = false
121
+ # Captures events while the Rails test environment is running when enabled.
122
+ config.rails_capture_in_test = false
123
+ # Includes the request User-Agent in request metadata when enabled.
16
124
  config.rails_capture_user_agent = false
125
+
126
+ # Application performance monitoring
127
+
128
+ # Enables transaction, span, query, and aggregate performance monitoring.
129
+ config.apm_enabled = true
130
+ # Limits the number of metric groups retained between flushes.
131
+ config.apm_max_groups = 200
132
+ # Flushes APM aggregates after this many observations.
133
+ config.apm_flush_count = 100
134
+ # Sends at most this many APM items in one request.
135
+ config.apm_batch_size = 50
136
+ # Limits the SQL queries recorded for a single request or transaction.
137
+ config.apm_max_queries_per_request = 100
138
+ # Marks SQL queries slower than this duration, in milliseconds.
139
+ config.apm_slow_query_threshold_ms = 500
140
+ # Marks transactions longer than this duration, in milliseconds.
141
+ config.apm_long_transaction_threshold_ms = 1_000
142
+ # Reports repeated equivalent queries after this count is reached.
143
+ config.apm_n_plus_one_threshold = 5
144
+ # Defines the duration buckets, in milliseconds, used by APM histograms.
145
+ config.apm_histogram_buckets = [5, 10, 25, 50, 100, 250, 500, 1_000, 2_500, 5_000]
146
+ # Retains active trace state for this many seconds.
147
+ config.apm_trace_ttl_seconds = 60
148
+ # Normalizes SQL and records bounded query analysis metadata.
149
+ config.apm_query_analysis_enabled = true
150
+ # Limits the number of analyzed queries retained per transaction.
151
+ config.apm_query_analysis_max_queries = 100
152
+ # Enables database-specific query inspection for slow queries.
153
+ config.apm_query_inspection_enabled = false
154
+ # Collects database query statistics when inspection supports them.
155
+ config.apm_query_statistics_enabled = false
156
+ # Collects query execution plans when inspection supports them.
157
+ config.apm_query_plan_enabled = false
158
+ # Inspects only queries at least this slow, in milliseconds.
159
+ config.apm_query_inspection_min_duration_ms = 500
160
+ # Limits the inspected queries retained per transaction.
161
+ config.apm_query_inspection_max_queries = 20
162
+ # Tracks database transaction lifecycles and durations.
163
+ config.apm_transaction_tracking_enabled = true
164
+ # Limits the database connections tracked for transaction state.
165
+ config.apm_transaction_max_connections = 100
166
+
167
+ # Distributed tracing and integrations
168
+
169
+ # Instruments supported outbound HTTP clients when enabled.
170
+ config.external_http_enabled = false
171
+ # Propagates Chronos trace headers on instrumented outbound requests.
172
+ config.external_http_trace_headers = true
173
+ # Extracts and injects the standard W3C traceparent header when enabled.
174
+ config.w3c_trace_context = false
175
+ # Reuses an active OpenTelemetry span without configuring its SDK.
176
+ config.opentelemetry_bridge = true
177
+ # Controls cache key reporting; :none avoids collecting cache key material.
178
+ config.cache_key_mode = :none
179
+ # Reports a bounded inventory of application dependencies.
180
+ config.dependency_reporting = true
181
+ # Limits the number of dependencies included in an inventory event.
182
+ config.dependency_max_items = 100
17
183
  end
18
184
 
19
- # Safe when the Railtie already ran or will run later; installation is idempotent.
185
+ # Installation is idempotent, regardless of when the Railtie was evaluated.
20
186
  Chronos::Rails::Installer.new.install(Rails.application)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chronos-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0.pre.1
4
+ version: 1.2.0.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antonio Jefferson