chronos-ruby 0.9.0.pre.3 → 1.0.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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +34 -0
  3. data/README.md +101 -181
  4. data/contracts/integration-verification-response-v1.schema.json +76 -0
  5. data/docs/adr/ADR-007-feature-detection.md +25 -0
  6. data/docs/adr/ADR-008-context-store.md +25 -0
  7. data/docs/adr/ADR-009-sampling.md +25 -0
  8. data/docs/adr/ADR-010-opentelemetry-interoperability.md +25 -0
  9. data/docs/adr/ADR-018-pre-1.0-hardening.md +6 -2
  10. data/docs/compatibility.md +30 -23
  11. data/docs/data-collected.md +3 -0
  12. data/docs/deprecation-policy.md +1 -1
  13. data/docs/migration-from-airbrake.md +1 -1
  14. data/docs/modules/breadcrumbs.md +23 -0
  15. data/docs/modules/context.md +21 -0
  16. data/docs/modules/deploys.md +23 -0
  17. data/docs/modules/integration-verification.md +65 -0
  18. data/docs/modules/job-monitoring.md +22 -0
  19. data/docs/modules/request-monitoring.md +20 -0
  20. data/docs/modules/runtime-metrics.md +22 -0
  21. data/docs/modules/sampling.md +22 -0
  22. data/docs/modules/sidekiq-legacy.md +1 -1
  23. data/docs/modules/sql-monitoring.md +22 -0
  24. data/docs/performance.md +13 -2
  25. data/docs/protocol-v1.md +3 -1
  26. data/docs/release-1.0-readiness.md +17 -15
  27. data/docs/security-review.md +4 -3
  28. data/docs/troubleshooting.md +6 -0
  29. data/lib/chronos/adapters/net_http_transport.rb +36 -2
  30. data/lib/chronos/agent.rb +21 -0
  31. data/lib/chronos/application/delivery_pipeline.rb +6 -3
  32. data/lib/chronos/application/verify_integration.rb +262 -0
  33. data/lib/chronos/core/integration_verification_result.rb +108 -0
  34. data/lib/chronos/errors.rb +11 -0
  35. data/lib/chronos/ports/transport.rb +18 -1
  36. data/lib/chronos/rails/railtie.rb +5 -0
  37. data/lib/chronos/rake_tasks.rb +41 -0
  38. data/lib/chronos/version.rb +1 -1
  39. data/lib/chronos.rb +26 -0
  40. metadata +35 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a834300cdaf9acd0d75e625d6cc811c677bd8cf2f701aed885e0bbae417aaca0
4
- data.tar.gz: 1b2e992ee0c9428e25bac17a8cbe21ae0bc167ebb519b63ae9c2e1cdb3ec3cc7
3
+ metadata.gz: 3fc9daff111666fdf7309797c5f8aa81a639c8f59ea1733be48740b9aea6b247
4
+ data.tar.gz: a8d7cd786b233078e5516e3d1ce0c92b986d045ebd4d8c29a7d9cd80ae75fb93
5
5
  SHA512:
6
- metadata.gz: 53be3a9634f8a47b9701897f4b6b58e1f0d023b536a2f6f4a7649f2d31344cb07f161e9f5d11c7636217194bdf31fe8181f5c6d1e916ef6049020f59b1ff2c4a
7
- data.tar.gz: 40b56150fed7170583f514552cd34894c98e6b8011c09f8a188af29accc5dfe36ab72b78375875e88059324025b7d82f7ef4cbb13b184a034b0bff22e7a38ca5
6
+ metadata.gz: 1f60a09480aa5766676d673579ffe1b5b007d044881fc9b1f70f672c414ddf7e1a014cc63eaeee8ee6f63fa7261aa5dc92f8f9b1cc6089898ecf015d1940a83c
7
+ data.tar.gz: '08342c5a665004cbfa9fec52164f86e82d003b3d587bf931ae220c44ec4188c91141852e424f726f55a7b7d5dec4592190dc7cef9dc6c4e05f0eec8255bd32b4'
data/CHANGELOG.md CHANGED
@@ -4,6 +4,40 @@ All notable changes are documented here. The project follows Semantic Versioning
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.0.0] - 2026-07-29
8
+
9
+ ### Added
10
+
11
+ - stable legacy release gates for Ruby 2.2.10 through 2.6.10, Rails 4.2/5.2, Sidekiq 4/5, documentation, repeatable comparison, and fake-endpoint load validation;
12
+ - the remaining mandatory module documents and ADRs for feature detection, context storage, sampling, and future OpenTelemetry interoperability.
13
+
14
+ ### Changed
15
+
16
+ - promoted the reviewed public API and protocol v1 implementation from `0.9.0.pre.4` to `1.0.0`;
17
+ - release publishing now accepts `v1.*` tags and cannot publish until every legacy compatibility and release-readiness job succeeds;
18
+ - compatibility status is now `Supported` only for the exact runtime/framework combinations covered by green release gates.
19
+
20
+ ### Security
21
+
22
+ - stable artifacts continue to use RubyGems Trusted Publishing, SHA-256 checksums, SPDX SBOMs, strict payload privacy contracts, and dependency auditing;
23
+ - package signing remains deferred until a trusted signing-key lifecycle is available.
24
+
25
+ ## [0.9.0.pre.4] - 2026-07-22
26
+
27
+ ### Added
28
+
29
+ - `Chronos.verify_integration` and `chronos:verify_integration` send a correlated synthetic exception and report credential, project, receiver, and receipt status as bounded JSON;
30
+ - strict integration-verification response contract v1, Rails task registration, failure classification, security limits, and end-to-end tests.
31
+
32
+ ### Changed
33
+
34
+ - version advanced to `0.9.0.pre.4` because `0.9.0.pre.3` had already been published before integration verification was added.
35
+
36
+ ### Fixed
37
+
38
+ - legacy dependency resolution pins `parallel` to Ruby 2.2-compatible `1.19.2` and the Sidekiq 5 smoke pins `rack-protection` to Ruby 2.5-compatible `2.2.4`.
39
+ - the Rails verification task now always depends on `environment`, even when Rails defines that Rake task after the Chronos Railtie hook runs.
40
+
7
41
  ## [0.9.0.pre.3] - 2026-07-21
8
42
 
9
43
  ### Changed
data/README.md CHANGED
@@ -1,73 +1,73 @@
1
1
  # Chronos Ruby
2
2
 
3
- Chronos Ruby is the framework-independent client for sending Ruby application errors and bounded telemetry to Chronos. Version 0.9 adds synchronous deploy tracking and bounded release correlation across every event.
3
+ Chronos Ruby 1.0.0 é 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
- ## What the gem collects
5
+ ## O que a gem coleta
6
6
 
7
- Version 0.9 can collect:
7
+ A versão 1.0 pode coletar:
8
8
 
9
- - exception class, message, structured backtrace, and chained causes;
10
- - timestamp, severity, tags, and an optional fingerprint;
11
- - application-supplied context, parameters, session, and user fields;
12
- - Ruby version, engine, platform, process ID, opaque thread ID, and hostname;
13
- - application version, environment, and service name.
14
- - Rack method, normalized route, status, duration, request ID, host, query-free path, optional user agent, controller/action, response size, trace ID, and already-parsed parameters when the middleware is used;
15
- - bounded breadcrumbs explicitly supplied by the application or integration.
16
- - release, revision, deploy ID, environment, service, region, and instance correlation;
17
- - explicit bounded deployment metadata supplied through the public API or integration.
9
+ - classe, mensagem, backtrace estruturado e causas encadeadas da exceção;
10
+ - timestamp, severidade, tags e fingerprint opcional;
11
+ - contexto, parâmetros, sessão e usuário fornecidos pela aplicação;
12
+ - versão, engine e plataforma Ruby, PID, thread opaca e hostname;
13
+ - ambiente, serviço, versão da aplicação, release, revision, deploy ID, região e instância;
14
+ - método, rota normalizada, status, duração e breakdown de requests Rack/Rails;
15
+ - SQL normalizado sem literais/binds e sinais heurísticos de desempenho;
16
+ - jobs Sidekiq/Active Job, cache, HTTP externo explicitamente instrumentado e dependências carregadas;
17
+ - breadcrumbs limitados fornecidos pela aplicação ou por integrações.
18
18
 
19
- See [Data collected](docs/data-collected.md) for the complete field table.
19
+ Veja a tabela completa em [Dados coletados](docs/data-collected.md).
20
20
 
21
- ## What is not collected by default
21
+ ## O que não é coletado por padrão
22
22
 
23
- Chronos Ruby does not inspect environment variables, request/response bodies, cookies, Authorization headers, source code, database contents, lockfiles, or gem paths. Dependency reporting reads only already loaded gem names and versions once per agent. Application-supplied fields are recursively sanitized, but applications should still avoid sending unnecessary personal, health, financial, or authentication data.
23
+ A gem não varre variáveis de ambiente, sistema de arquivos ou lockfiles e não lê bodies HTTP, cookies, headers de autorização, conteúdo de e-mail, SQL bruto, binds, valores de cache ou código-fonte. O inventário de dependências contém somente nomes e versões carregados, uma vez por agente. A aplicação continua responsável por minimização e base legal dos dados enviados.
24
24
 
25
- ## Supported Ruby and Rails versions
25
+ ## Versões Ruby e Rails suportadas
26
26
 
27
- Version 0.x targets Ruby 2.2.10 through Ruby 2.6. Version 0.5 provides best-effort Rails 4.2 through 5.2 integration through public framework APIs and feature detection. All supported combinations must pass dedicated CI before being listed as supported.
27
+ A versão 1.0.0 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.
28
28
 
29
- See [Compatibility](docs/compatibility.md).
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
 
31
- ## Plain Ruby installation
31
+ ## Instalação em Ruby puro
32
32
 
33
- The current public build is a pre-release. Add its exact version to the application's `Gemfile`:
33
+ Obrigatório: adicione a versão estável ao `Gemfile`.
34
34
 
35
35
  ```ruby
36
- gem "chronos-ruby", "0.9.0.pre.3"
36
+ gem "chronos-ruby", "~> 1.0.0"
37
37
  ```
38
38
 
39
- Install with a Bundler version compatible with the application. For the oldest supported runtime:
39
+ Em runtimes antigos, use Bundler compatível:
40
40
 
41
41
  ```bash
42
42
  gem install bundler -v 1.17.3
43
43
  bundle _1.17.3_ install
44
44
  ```
45
45
 
46
- Without Bundler:
46
+ Sem Bundler:
47
47
 
48
48
  ```bash
49
- gem install chronos-ruby --pre
49
+ gem install chronos-ruby -v 1.0.0
50
50
  ```
51
51
 
52
- ## Rails installation
52
+ ## Instalação em Rails
53
53
 
54
- Version 0.5 exposes Rails support explicitly, keeping Rails and ActiveSupport out of plain Ruby applications:
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", "0.9.0.pre.3", :require => "chronos/rails"
57
+ gem "chronos-ruby", "~> 1.0.0", :require => "chronos/rails"
58
58
  ```
59
59
 
60
- Generate the initializer with:
60
+ Gere o initializer:
61
61
 
62
62
  ```bash
63
63
  rails generate chronos:install
64
64
  ```
65
65
 
66
- The Railtie installs the Rack middleware and notification subscribers idempotently. Automatic integration is disabled in test and console by default and can be controlled with `rails_enabled`, `rails_capture_in_test`, `rails_capture_in_console`, and `rails_capture_user_agent`. See [Rails 4.2 and 5.2 integration](docs/modules/rails-legacy.md).
66
+ A Versão 0.5 introduziu Railtie, middleware e subscribers idempotentes por APIs públicas e feature detection. A coleta automática fica desativada em test e console por padrão. Veja [Rails legado](docs/modules/rails-legacy.md).
67
67
 
68
- ## Minimum configuration
68
+ ## Configuração mínima
69
69
 
70
- `project_id`, `project_key`, and an HTTPS `host` are required while the agent is enabled:
70
+ Obrigatório quando o agente está habilitado: `project_id`, `project_key` e `host` HTTPS. Recomendado: definir ambiente e serviço explicitamente.
71
71
 
72
72
  ```ruby
73
73
  require "chronos"
@@ -82,22 +82,28 @@ Chronos.configure do |config|
82
82
  end
83
83
  ```
84
84
 
85
- HTTPS verification is enabled by default. HTTP requires explicitly setting `ssl_verify = false` and should only be used with a local test server.
85
+ TLS é verificado por padrão. HTTP exige `ssl_verify = false` explicitamente e deve ser limitado a endpoints locais de teste. Depois de configurar, valide credenciais e ingestão:
86
86
 
87
- ## Automatic capture
87
+ ```bash
88
+ bundle exec rake chronos:verify_integration
89
+ ```
90
+
91
+ O task envia uma exceção sintética identificada e só retorna código `0` após uma resposta v1 correlacionada. Em Ruby puro, instale o task com `require "chronos/rake_tasks"` e `Chronos::RakeTasks.install`; por código, use `Chronos.verify_integration`. Veja [Verificação da integração](docs/modules/integration-verification.md).
88
92
 
89
- Rack applications can capture unhandled exceptions automatically and preserve the application error semantics:
93
+ ## Captura automática
94
+
95
+ Opcional em Rack: instale o middleware. Ele notifica exceções não tratadas, preserva a mesma exceção para a aplicação e não consome bodies.
90
96
 
91
97
  ```ruby
92
98
  use Chronos::Integrations::Rack::Middleware,
93
99
  :include_user_agent => false
94
100
  ```
95
101
 
96
- The middleware notifies asynchronously and re-raises the same exception. It never reads the request body, raw query string, cookies, authorization headers, or response body. See [Rack integration and context](docs/modules/rack-context.md).
102
+ Em Rails, o Railtie instala middleware e subscribers uma única vez. Veja [Monitoramento de requests](docs/modules/request-monitoring.md).
97
103
 
98
- ## Manual capture
104
+ ## Captura manual
99
105
 
100
- Asynchronous capture is recommended for application code:
106
+ Recomendado no fluxo da aplicação: captura assíncrona.
101
107
 
102
108
  ```ruby
103
109
  begin
@@ -108,27 +114,27 @@ rescue StandardError => error
108
114
  end
109
115
  ```
110
116
 
111
- Synchronous capture waits for the HTTP result and is useful in scripts or controlled shutdown paths:
117
+ Opcional para scripts e shutdown controlado: captura síncrona.
112
118
 
113
119
  ```ruby
114
120
  delivered = Chronos.notify_sync(RuntimeError.new("import failed"))
115
121
  ```
116
122
 
117
- Both methods return `false` instead of allowing an internal agent error to escape.
123
+ Falhas internas retornam `false` e não escapam para o fluxo principal.
118
124
 
119
- ## User context
125
+ ## Contexto de usuário
120
126
 
121
- User data is opt-in and must contain only values your application is allowed to send:
127
+ Contexto de usuário é opt-in. Envie somente campos necessários e autorizados:
122
128
 
123
129
  ```ruby
124
130
  Chronos.notify(error, :user => {"id" => "customer-42", "role" => "operator"})
125
131
  ```
126
132
 
127
- Version 0.4 sanitizes this context before delivery and before it can enter retry storage. Data minimization remains the application's responsibility.
133
+ O valor é limitado e sanitizado, mas a minimização continua sendo responsabilidade da aplicação. Veja [Contexto de execução](docs/modules/context.md).
128
134
 
129
135
  ## Breadcrumbs
130
136
 
131
- Breadcrumbs use a fixed circular buffer scoped to the current execution:
137
+ Breadcrumbs formam um buffer circular delimitado no escopo atual:
132
138
 
133
139
  ```ruby
134
140
  Chronos.add_breadcrumb(
@@ -138,35 +144,25 @@ Chronos.add_breadcrumb(
138
144
  )
139
145
  ```
140
146
 
141
- No log, SQL, HTTP, cache, job, request body, or response body payload is collected automatically. Unknown categories become `custom`, and metadata is bounded and sanitized before queueing.
147
+ A gem não transforma logs, SQL ou bodies em breadcrumbs brutos. Veja [Breadcrumbs](docs/modules/breadcrumbs.md).
142
148
 
143
- ## Filters and LGPD
149
+ ## Filtros e LGPD
144
150
 
145
- Version 0.4 recursively redacts sensitive keys and detects Bearer tokens, JWTs, e-mail addresses, CPF, CNPJ, and valid payment-card candidates in free text. IPv4 addresses are anonymized by default. Applications can add blocklist matchers, hash selected identifiers, or install custom filters:
151
+ A gem bloqueia chaves sensíveis e detecta Bearer tokens, JWTs, e-mails, CPF, CNPJ e candidatos válidos a cartão. IPv4 é anonimizado por padrão. Opcionalmente, amplie a blocklist, aplique hash irreversível ou filtros próprios:
146
152
 
147
153
  ```ruby
148
154
  Chronos.configure do |config|
149
- # required options omitted
150
155
  config.blocklist_keys += [:medical_record, /bank_account/i]
151
156
  config.hash_keys += [:customer_id]
152
157
  config.filters << proc { |key, value| key.to_s == "internal_reference" ? "[REMOVED]" : value }
153
158
  end
154
159
  ```
155
160
 
156
- Sanitization runs before queueing and transport. See [Privacy and LGPD](docs/privacy-lgpd.md) for behavior, limitations, health and financial examples, and a payload audit procedure.
161
+ Sanitização ocorre antes de fila, retry e backlog. Veja [Privacidade e LGPD](docs/privacy-lgpd.md).
157
162
 
158
163
  ## Ignore rules
159
164
 
160
- Entire environments can be ignored:
161
-
162
- ```ruby
163
- Chronos.configure do |config|
164
- # required options omitted
165
- config.ignored_environments = ["development", "test"]
166
- end
167
- ```
168
-
169
- Version `0.9.0.pre.2` adds bounded local rules after configuration:
165
+ Ambientes inteiros podem ser ignorados na configuração. A versão `0.9.0.pre.2` introduziu regras locais limitadas, preservadas na API estável:
170
166
 
171
167
  ```ruby
172
168
  Chronos.ignore_if do |notice|
@@ -174,17 +170,14 @@ Chronos.ignore_if do |notice|
174
170
  end
175
171
  ```
176
172
 
177
- Rules receive an immutable normalized notice, run before serialization/queueing, and must return exactly `true` to discard. The default limit is 20 and the hard configurable maximum is 100. A failing rule is contained. See [Bounded local ignore rules](docs/modules/ignore-rules.md).
173
+ A regra recebe um notice normalizado e imutável, e somente `true` descarta. Falhas do callback são contidas. Veja [Ignore rules](docs/modules/ignore-rules.md).
178
174
 
179
- ## Performance monitoring
175
+ ## Monitoramento de performance
180
176
 
181
- Version 0.7 aggregates request, query, and job observations into bounded `metric_batch` events. Groups include count, error count/rate, total/min/max/average duration, fixed histogram buckets, status counts, and component breakdown. Percentiles are calculated in the SaaS without retaining every local duration.
182
-
183
- SQL comments and literal values are removed before a bounded normalized query and SHA-256 fingerprint are produced. Binds are never read. Slow, repeated, possible N+1, long-transaction, connection-error, and deadlock signals are heuristic and require server-side confirmation. Group count, active trace count, fingerprints per trace, histogram buckets, and batch size all have fixed limits. See [Essential APM aggregation](docs/modules/apm-aggregation.md).
177
+ A Versão 0.7 introduziu agregação local de requests, queries e jobs em `metric_batch`; a Versão 0.8 adicionou HTTP externo. Grupos possuem contagem, erro, duração, histograma, status e breakdown limitados. Percentis são calculados no SaaS.
184
178
 
185
179
  ```ruby
186
180
  Chronos.configure do |config|
187
- # required connection settings omitted
188
181
  config.apm_enabled = true
189
182
  config.apm_max_groups = 200
190
183
  config.apm_flush_count = 100
@@ -195,42 +188,22 @@ Chronos.configure do |config|
195
188
  end
196
189
  ```
197
190
 
198
- ## Sidekiq and Active Job
199
-
200
- Version `0.6.0.pre.1` adds optional Sidekiq 4/5 middleware:
191
+ SQL bruto e binds não são lidos. Sinais de query lenta, repetição, possível N+1, transação longa, conexão e deadlock são heurísticos. Veja [APM](docs/modules/apm-aggregation.md), [Requests](docs/modules/request-monitoring.md) e [SQL](docs/modules/sql-monitoring.md).
201
192
 
202
- ```ruby
203
- gem "sidekiq", "~> 5.0"
204
- gem "chronos-ruby", "0.9.0.pre.3", :require => "chronos/sidekiq"
205
- ```
193
+ ## Sidekiq e Active Job
206
194
 
207
- The client middleware propagates only trace/request identifiers in a versioned Sidekiq-envelope field and never changes worker arguments. The server records class, queue, JID, retry count, duration, calculable queue latency, bounded arguments/tags, status, and error class. Values pass through the shared sanitizer before delivery. Failed jobs are notified once and the original exception is re-raised. See [Sidekiq 4/5 legacy integration](docs/modules/sidekiq-legacy.md).
208
-
209
- When Active Job is available, the Rails integration propagates only bounded trace/request identifiers in a namespaced serialized field without changing job arguments. It records adapter, job/provider IDs, class, queue, attempts, duration, status, and error class, and captures a supplied failure once. See [Active Job legacy integration](docs/modules/active-job.md).
210
-
211
- ## External HTTP, cache, and dependencies
212
-
213
- Version 0.8 instruments only explicitly selected `Net::HTTP` connection objects, avoiding a global monkey patch:
195
+ A versão `0.6.0.pre.1` introduziu middleware Sidekiq 4/5; a API estável mantém o require explícito:
214
196
 
215
197
  ```ruby
216
- Chronos.configure do |config|
217
- # required connection settings omitted
218
- config.external_http_enabled = true
219
- config.external_http_trace_headers = true
220
- end
221
-
222
- http = Net::HTTP.new("payments.example.com", 443)
223
- http.use_ssl = true
224
- Chronos.instrument_net_http(http)
198
+ gem "sidekiq", "~> 5.0"
199
+ gem "chronos-ruby", "~> 1.0.0", :require => "chronos/sidekiq"
225
200
  ```
226
201
 
227
- The wrapper records only sanitized host, method, status, duration, timeout, connection-error flag, and error class. It propagates `X-Chronos-Trace-ID` and `X-Chronos-Request-ID` when available and never reads URL path/query, Authorization, request body, response body, or error message.
228
-
229
- Rails cache telemetry omits raw keys by default. Set `cache_key_mode = :sha256` to emit a project-scoped hash; `:none` is the default. Dependency reporting is enabled by default, reads at most 100 already loaded gem specs, and emits one independent `dependencies` event per agent. Set `dependency_reporting = false` to disable it. See [External HTTP](docs/modules/external-http.md), [Cache observability](docs/modules/cache-observability.md), and [Dependency inventory](docs/modules/dependencies.md).
202
+ 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).
230
203
 
231
204
  ## Deploy tracking
232
205
 
233
- Version 0.9 sends deployment metadata synchronously and adds a bounded correlation block to every event:
206
+ A Versão 0.9 introduziu deploy síncrono e correlação fixa em todos os eventos:
234
207
 
235
208
  ```ruby
236
209
  Chronos.notify_deploy(
@@ -242,55 +215,35 @@ Chronos.notify_deploy(
242
215
  )
243
216
  ```
244
217
 
245
- Configure `app_version`, `revision`, `deploy_id`, `environment`, `service_name`, `region`, and `instance_id` in each newly deployed process so subsequent telemetry carries the same release identity. The gem never scans environment variables or Git automatically.
246
-
247
- Optional Capistrano support loads through `chronos/capistrano`. Manual, Kamal-command, and GitHub Actions examples share the explicit deploy command under `examples/deploy/`. See [Deploy tracking and release correlation](docs/modules/deploy-tracking.md).
218
+ Configure release/revision/deploy na inicialização de cada novo processo. A gem não Git ou variáveis automaticamente. Capistrano é opcional; Kamal e GitHub Actions usam exemplos em `examples/deploy/`. Veja [Deploys](docs/modules/deploys.md).
248
219
 
249
- ## Asynchronous queue
220
+ ## Fila assíncrona
250
221
 
251
- The queue has a fixed capacity and drops the newest event when full. Worker threads are created lazily after the first accepted event. The default capacity is 100 events with one worker.
222
+ A fila tem capacidade fixa, descarta o evento mais novo quando cheia e cria workers somente após a primeira captura aceita.
252
223
 
253
224
  ```mermaid
254
225
  flowchart LR
255
- E[Exception] --> N[Notice builder]
256
- N --> P[Privacy sanitizer]
257
- P --> S[Safe bounded serializer]
258
- S --> D[Delivery pipeline]
259
- D --> Q[Bounded queue]
260
- Q --> W[Fixed worker pool]
261
- W --> R[Retry and circuit breaker]
262
- R --> H[Net::HTTP transport]
263
- R --> B[Bounded memory backlog]
226
+ E[Exceção ou telemetria] --> N[Normalização]
227
+ N --> P[Sanitização]
228
+ P --> S[Serialização limitada]
229
+ S --> D[Pipeline de entrega]
230
+ D --> Q[Fila limitada]
231
+ Q --> W[Workers fixos]
232
+ W --> H[Net::HTTP]
233
+ W --> B[Backlog em memória]
264
234
  ```
265
235
 
266
- Use `Chronos.flush(timeout)` to wait for accepted events and `Chronos.close(timeout)` during shutdown. Workers are recreated after a process fork.
267
-
268
- ## Retry and backlog
269
-
270
- The resilience layer introduced in version 0.3 retries network errors, HTTP `408`, `429`, and `5xx` responses with exponential backoff, bounded jitter, and a finite attempt count. Other `4xx` responses are permanent and are not retried. A circuit breaker pauses requests after repeated failures, preventing retry storms.
271
-
272
- After retries are exhausted, the already sanitized `SerializedEvent` may enter a fixed-capacity memory backlog. The backlog drops new items when full, is lost when the process exits, and never writes to disk. A later successful half-open probe drains backlog items as new events arrive.
273
-
274
- The SaaS may return a JSON policy in the bounded `X-Chronos-Remote-Configuration` response header. Only sampling rate, enabled event types, a lower payload limit, exact ignored fingerprints, send interval, and kill switch are accepted. Remote values cannot change the host, project credentials, TLS, local maximums, code, or regular expressions. See [Retry and backlog](docs/modules/retry-backlog.md) and [Remote configuration](docs/modules/remote-configuration.md).
275
-
276
- ## How it works internally
236
+ Use `Chronos.flush(timeout)` antes de encerrar e `Chronos.close(timeout)` no shutdown. Workers são recriados após fork. Veja [Fila assíncrona](docs/modules/async-queue.md).
277
237
 
278
- The code follows hexagonal boundaries:
238
+ ## Retry e backlog
279
239
 
280
- - `Chronos::Core` contains immutable notices, sanitization, and safe normalization;
281
- - `Chronos::Application` coordinates capture;
282
- - `Chronos::Application::DeliveryPipeline` owns bounded retry and remote policy;
283
- - `Chronos::Ports` defines delivery behavior;
284
- - `Chronos::Adapters` implements Net::HTTP delivery and thread-local context;
285
- - `Chronos::Integrations::Rack` implements optional automatic Rack capture;
286
- - `Chronos::Rails` implements the optional Railtie, installer, generator, and public-notification adapters;
287
- - `Chronos::Internal` owns bounded queueing, workers, and defensive logging.
240
+ Retry cobre erros de rede, HTTP `408`, `429` e `5xx`, com backoff exponencial, jitter e tentativas limitadas. Outros `4xx` são permanentes. Circuit breaker reduz tempestades de retry.
288
241
 
289
- The core has no dependency on Rails, Rack, Sidekiq, or ActiveSupport. See [Architecture](docs/architecture.md).
242
+ O backlog guarda somente eventos já sanitizados/serializados, possui capacidade fixa, vive em memória e é perdido no encerramento. Configuração remota aceita apenas sampling, tipos habilitados, limite menor de payload, fingerprints exatas, intervalo e kill switch; nunca altera host, credenciais, TLS ou executa código. Veja [Retry e backlog](docs/modules/retry-backlog.md), [Sampling](docs/modules/sampling.md) e [Configuração remota](docs/modules/remote-configuration.md).
290
243
 
291
- ## Environment-specific configuration
244
+ ## Configuração por ambiente
292
245
 
293
- Configuration values are explicit; the gem never scans the process environment. Read only the variables your application chooses:
246
+ A gem não varre o ambiente. Leia somente variáveis escolhidas pela aplicação:
294
247
 
295
248
  ```ruby
296
249
  Chronos.configure do |config|
@@ -301,102 +254,69 @@ Chronos.configure do |config|
301
254
  config.enabled = ENV["CHRONOS_ENABLED"] != "false"
302
255
  config.queue_size = 100
303
256
  config.workers = 1
304
- config.timeout = 5.0
305
- config.open_timeout = 2.0
306
257
  config.max_retries = 3
307
- config.retry_base_interval = 0.5
308
- config.retry_max_interval = 30.0
309
- config.retry_jitter = 0.25
310
258
  config.backlog_size = 100
311
- config.circuit_failure_threshold = 5
312
- config.circuit_reset_timeout = 30.0
313
259
  config.remote_configuration = true
314
- config.context_store = :thread_local
315
- config.breadcrumb_capacity = 20
316
- config.breadcrumb_max_bytes = 2048
317
260
  config.apm_enabled = true
318
- config.apm_max_groups = 200
319
- config.apm_flush_count = 100
320
261
  config.external_http_enabled = false
321
262
  config.cache_key_mode = :none
322
263
  config.dependency_reporting = true
323
264
  config.app_version = ENV["APP_VERSION"]
324
265
  config.revision = ENV["GIT_SHA"]
325
266
  config.deploy_id = ENV["DEPLOY_ID"]
326
- config.region = ENV["REGION"]
327
- config.instance_id = ENV["INSTANCE_ID"]
328
267
  end
329
268
  ```
330
269
 
331
- All options are documented in [Configuration](docs/configuration.md).
270
+ Todas as opções, defaults e limites estão em [Configuração](docs/configuration.md).
332
271
 
333
272
  ## Troubleshooting
334
273
 
335
- Configuration errors are raised during `Chronos.configure`. Capture and delivery errors are contained and optionally reported to the configured logger. Verify credentials, HTTPS certificates, timeouts, and `Chronos.flush` results. See [Troubleshooting](docs/troubleshooting.md).
274
+ Erros de configuração são levantados durante `Chronos.configure`; falhas de captura/entrega são contidas e podem ir ao logger seguro. Confirme TLS, credenciais, timeouts e retorno de `flush`. Consulte [Troubleshooting](docs/troubleshooting.md).
336
275
 
337
276
  ## Benchmark
338
277
 
339
- Run the version 0.9 benchmarks with:
278
+ O gate estável executa comparação Rack repetível e carga contra endpoint fake:
340
279
 
341
280
  ```bash
342
- bundle _1.17.3_ exec ruby benchmarks/capture_exception.rb
343
- bundle _1.17.3_ exec ruby benchmarks/serialization.rb
344
- bundle _1.17.3_ exec ruby benchmarks/filtering.rb
345
- bundle _1.17.3_ exec ruby benchmarks/queue.rb
346
- bundle _1.17.3_ exec ruby benchmarks/retry_backlog.rb
347
- bundle _1.17.3_ exec ruby benchmarks/request_overhead.rb
348
- bundle _1.17.3_ exec ruby benchmarks/rails_notifications.rb
349
- bundle _1.17.3_ exec ruby benchmarks/sidekiq_middleware.rb
350
- bundle _1.17.3_ exec ruby benchmarks/apm_aggregation.rb
351
- bundle _1.17.3_ exec ruby benchmarks/external_http.rb
352
- bundle _1.17.3_ exec ruby benchmarks/correlation.rb
281
+ ITERATIONS=50000 WARMUP=5000 SAMPLES=7 bundle _1.17.3_ exec ruby benchmarks/comparative.rb
282
+ ITERATIONS=500 bundle _1.17.3_ exec ruby benchmarks/fake_endpoint_load.rb
353
283
  ```
354
284
 
355
- Results depend on runtime, hardware, and payload. No performance comparison is claimed until repeatable measurements are published.
285
+ Resultados dependem de runtime e hardware. Não há alegação genérica de superioridade; registre CPU, SO, Ruby, commit, warmup, amostras, mediana e dispersão. Outros benchmarks ficam em `benchmarks/` e estão descritos em [Performance](docs/performance.md).
356
286
 
357
- ## Migration from Airbrake
287
+ ## Migração do Airbrake
358
288
 
359
- An Airbrake migration guide will be added before the legacy 1.0 release. Version 0.9 does not claim API compatibility or automatic replacement.
289
+ Migre por etapas e mantenha os dois agentes juntos somente durante a validação, evitando duplicidade prolongada. Callbacks e notices não são API-compatíveis e devem ser traduzidos/testados explicitamente. Consulte o [guia de migração do Airbrake](docs/migration-from-airbrake.md).
360
290
 
361
- ## Local development
291
+ ## Desenvolvimento local
362
292
 
363
- Clone the repository, install Bundler 1.17.3, and run setup:
293
+ Instale Bundler 1.17.3 e as dependências:
364
294
 
365
295
  ```bash
366
296
  gem install bundler -v 1.17.3
367
297
  bin/setup
368
298
  ```
369
299
 
370
- Open an interactive console:
371
-
372
- ```bash
373
- bin/console
374
- ```
375
-
376
- Install the current source locally:
377
-
378
- ```bash
379
- bundle _1.17.3_ exec rake install
380
- ```
300
+ Use `bin/console` para inspeção e `bundle _1.17.3_ exec rake install` para instalar a fonte localmente. A arquitetura hexagonal está descrita em [Arquitetura](docs/architecture.md).
381
301
 
382
- ## Tests
302
+ ## Testes
383
303
 
384
- Run the complete suite on the current Ruby:
304
+ Execute suíte e lint no runtime atual:
385
305
 
386
306
  ```bash
387
307
  bundle _1.17.3_ exec rake
388
308
  ```
389
309
 
390
- The legacy CI matrix covers Ruby 2.2.10, 2.3.8, 2.4.10, 2.5.9, and 2.6.10. Network integration tests use a local fake HTTP server.
310
+ A matriz CI cobre Ruby 2.2.102.6.10, aplicações Rails 4.2/5.2 e Sidekiq 4/5. O workflow de release repete toda a matriz, documentação, benchmark comparativo e carga antes de publicar.
391
311
 
392
- ## Contributing
312
+ ## Contribuição
393
313
 
394
- Open an issue before introducing a new public API or dependency. Every public class requires YARD documentation, tests, module documentation, and compatibility evidence. See [CONTRIBUTING.md](CONTRIBUTING.md).
314
+ Abra uma issue antes de adicionar API pública ou dependência. Classes públicas precisam de YARD, testes, documentação de módulo e evidência de compatibilidade. Veja [CONTRIBUTING.md](CONTRIBUTING.md).
395
315
 
396
- ## Security
316
+ ## Segurança
397
317
 
398
- Never include credentials in event context or logs. Report vulnerabilities privately according to [SECURITY.md](SECURITY.md). Ruby 2.2 through 2.6 are end-of-life; Chronos provides technical compatibility, not runtime security maintenance.
318
+ Nunca inclua credenciais no contexto. Releases usam Trusted Publishing, checksum SHA-256 e SBOM; dependências passam por auditoria. Reporte vulnerabilidades pelo canal privado de [SECURITY.md](SECURITY.md).
399
319
 
400
- ## License
320
+ ## Licença
401
321
 
402
- Chronos Ruby is distributed under the terms of the MIT License. See [LICENSE.txt](LICENSE.txt).
322
+ Chronos Ruby é distribuída sob a licença MIT. Veja [LICENSE.txt](LICENSE.txt).
@@ -0,0 +1,76 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://chronos.example/schemas/integration-verification-response-v1.schema.json",
4
+ "title": "Chronos integration verification response v1",
5
+ "type": "object",
6
+ "additionalProperties": false,
7
+ "required": [
8
+ "schema_version",
9
+ "success",
10
+ "status",
11
+ "verification_id",
12
+ "credentials_valid",
13
+ "event_received",
14
+ "event",
15
+ "project",
16
+ "receiver",
17
+ "error"
18
+ ],
19
+ "properties": {
20
+ "schema_version": {"const": "1.0"},
21
+ "success": {"type": "boolean"},
22
+ "status": {
23
+ "enum": [
24
+ "accepted",
25
+ "invalid_credentials",
26
+ "project_inactive",
27
+ "receiver_unavailable",
28
+ "receiver_internal_error",
29
+ "request_rejected",
30
+ "rate_limited"
31
+ ]
32
+ },
33
+ "verification_id": {"type": "string", "minLength": 1, "maxLength": 128},
34
+ "credentials_valid": {"type": ["boolean", "null"]},
35
+ "event_received": {"type": "boolean"},
36
+ "event": {
37
+ "type": "object",
38
+ "additionalProperties": false,
39
+ "required": ["id"],
40
+ "properties": {
41
+ "id": {"type": ["string", "null"], "maxLength": 128}
42
+ }
43
+ },
44
+ "project": {
45
+ "type": ["object", "null"],
46
+ "additionalProperties": false,
47
+ "required": ["id", "name", "status", "environment"],
48
+ "properties": {
49
+ "id": {"type": ["string", "null"], "maxLength": 128},
50
+ "name": {"type": ["string", "null"], "maxLength": 128},
51
+ "status": {"type": ["string", "null"], "maxLength": 32},
52
+ "environment": {"type": ["string", "null"], "maxLength": 128}
53
+ }
54
+ },
55
+ "receiver": {
56
+ "type": ["object", "null"],
57
+ "additionalProperties": false,
58
+ "required": ["name", "status", "received_at"],
59
+ "properties": {
60
+ "name": {"type": ["string", "null"], "maxLength": 64},
61
+ "status": {"type": ["string", "null"], "maxLength": 32},
62
+ "received_at": {"type": ["string", "null"], "maxLength": 64}
63
+ }
64
+ },
65
+ "error": {
66
+ "type": ["object", "null"],
67
+ "additionalProperties": false,
68
+ "required": ["code", "message", "guidance"],
69
+ "properties": {
70
+ "code": {"type": "string", "maxLength": 64},
71
+ "message": {"type": "string", "maxLength": 512},
72
+ "guidance": {"type": "string", "maxLength": 512}
73
+ }
74
+ }
75
+ }
76
+ }