rails-profiler 0.37.0 → 0.39.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 +22 -0
- data/app/assets/builds/profiler.js +10 -10
- data/app/controllers/profiler/api/profiles_controller.rb +10 -0
- data/lib/profiler/collectors/cache_collector.rb +3 -0
- data/lib/profiler/collectors/database_collector.rb +1 -0
- data/lib/profiler/collectors/view_collector.rb +2 -0
- data/lib/profiler/configuration.rb +11 -0
- data/lib/profiler/current_context.rb +10 -0
- data/lib/profiler/instrumentation/net_http_instrumentation.rb +20 -0
- data/lib/profiler/middleware/profiler_middleware.rb +26 -4
- data/lib/profiler/middleware/streamed_profile.rb +5 -2
- data/lib/profiler/models/profile.rb +7 -1
- data/lib/profiler/models/sql_query.rb +4 -2
- data/lib/profiler/otel/scoped_id_generator.rb +46 -0
- data/lib/profiler/otel/sdk.rb +146 -0
- data/lib/profiler/otel/trace_exporter.rb +180 -0
- data/lib/profiler/storage/base_store.rb +5 -0
- data/lib/profiler/storage/file_store.rb +25 -6
- data/lib/profiler/storage/memory_store.rb +15 -2
- data/lib/profiler/storage/redis_store.rb +23 -0
- data/lib/profiler/storage/sqlite_store.rb +20 -3
- data/lib/profiler/trace_context.rb +48 -0
- data/lib/profiler/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6bc10ed77cb2126254ad1b94fb697766bd7e8305fdeb957e7a5dd44909e622dd
|
|
4
|
+
data.tar.gz: d250a8a1b41ea1668b6835cbf07a0371422fa90b3c820be182da4c6734e82dd1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c5c4774740ee3f12f3411cba23c3ff0c9c2f28db248d50a1d84f800a5a66d59bff11016f761d4fd1639105a854217c7190ebd5753febfaac08a3c80b1228eb2
|
|
7
|
+
data.tar.gz: 41d9f3e676848d74bd27c02062d0fe593f12c50aa2ef7de62f7bc1913e6a6ba8816858fade838969eaf1aacb1ca83a13a8f722215a0d4c72b2cdddeed76c6fa9
|
data/CHANGELOG.md
CHANGED
|
@@ -19,6 +19,28 @@ every commit of every tag interval is accounted for one way or the other.
|
|
|
19
19
|
|
|
20
20
|
## [Unreleased]
|
|
21
21
|
|
|
22
|
+
## [0.39.0] - 2026-10-19
|
|
23
|
+
|
|
24
|
+
<!-- stamped -->
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- **OpenTelemetry:** with `config.otel_enabled = true`, each profiled request is exported as a trace: a root span carrying the profile's own `trace_id` and `span_id`, and a child span for each SQL query, view or partial render, cache operation and outbound `Net::HTTP` call. An application that already initialised OpenTelemetry keeps its own tracer provider; otherwise the gem sends the spans itself over OTLP `http/protobuf` to `config.otel_otlp_endpoint`, with `config.otel_service_name` (the application's name by default).
|
|
29
|
+
- **OpenTelemetry:** the gem does not depend on OpenTelemetry. Add `opentelemetry-sdk` and `opentelemetry-exporter-otlp` to the application's `Gemfile` to use it; without them, `otel_enabled = true` writes one message to the log and exports nothing. With `otel_enabled` at `false` (the default) nothing of OpenTelemetry is loaded.
|
|
30
|
+
- **Collectors:** the SQL, view and cache events now record their `started_at` (epoch seconds), which the trace export uses to place their spans.
|
|
31
|
+
|
|
32
|
+
## [0.38.0] - 2026-10-19
|
|
33
|
+
|
|
34
|
+
<!-- stamped -->
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
|
|
38
|
+
- **Tracing:** a request carrying a valid W3C `traceparent` header continues that trace: the profile records its `trace_id`, a `span_id` of its own and the caller's span as `parent_span_id`. Without a header, or with an invalid one, the request starts a new trace.
|
|
39
|
+
- **Instrumentation:** an outgoing `Net::HTTP` call made while a profiled request runs carries a `traceparent` header with that request's `trace_id`, unless the application set one itself or the host is listed in `http_skip_hosts`.
|
|
40
|
+
- **Storage:** every backend answers `find_by_trace(trace_id)`; the SQLite database gains `trace_id`, `span_id` and `parent_span_id` columns on its own.
|
|
41
|
+
- **API:** `GET /_profiler/api/profiles?trace_id=...` lists the profiles sharing a trace.
|
|
42
|
+
- **Dashboard:** a `Trace` tab shows the trace, span and parent span ids of a profile and links to the other profiles of the trace.
|
|
43
|
+
|
|
22
44
|
## [0.37.0] - 2026-10-18
|
|
23
45
|
|
|
24
46
|
<!-- stamped -->
|