Skip to content

[WIP] Telemetry Scaffold GC pressure health check - #360

Draft
Abishekcs wants to merge 1 commit into
rage-rb:mainfrom
Abishekcs:telemetry/gc-pressure-health-check
Draft

[WIP] Telemetry Scaffold GC pressure health check#360
Abishekcs wants to merge 1 commit into
rage-rb:mainfrom
Abishekcs:telemetry/gc-pressure-health-check

Conversation

@Abishekcs

Copy link
Copy Markdown
Member

Work In Progress

Sets up the structure for a new periodic health check mechanism, distinct from the existing span-based telemetry system:

- config.telemetry.gc_pressure_monitoring_enabled (default: false)

- Rage::Telemetry::HealthChecks.__initialize, wired via Iodine.on_state(:on_start), following the same boot pattern as Rage::Deferred

-Rage::Telemetry::HealthChecks::GCPressureChecker#gc_stats left unimplemented GC.stat sampling to follow in a follow-up commit
@rsamoilov

Copy link
Copy Markdown
Member

Hey @Abishekcs

I'm super excited to see the first steps here!

Do you think it makes sense to define what the end result would look like first?

The reason I'm asking is because I thought it would make sense to decouple Rage from metrics. My vision was that:

  • Rage::Telemetry would expose generic helpers to collect metrics (e.g. Rage::Telemetry.every(ms) {}) and some framework-specific metrics (e.g. Rage::Telemetry.raw[:backlog_size])
  • the metrics like GC pressure or request count would instead be collected by a specific instrumentation, e.g. OpenTelemetry.

WDYT?

@Abishekcs

Copy link
Copy Markdown
Member Author

Do you think it makes sense to define what the end result would look like first?

Sure, I will open a github issue this weekend for this telemetry project laying out everything.

The reason I'm asking is because I thought it would make sense to decouple Rage from metrics. My vision was that:

  • Rage::Telemetry would expose generic helpers to collect metrics (e.g. Rage::Telemetry.every(ms) {}) and some framework-specific metrics (e.g. Rage::Telemetry.raw[:backlog_size])
  • the metrics like GC pressure or request count would instead be collected by a specific instrumentation, e.g. OpenTelemetry.

WDYT?

Sounds good, I'll rework the scaffolding into a generic Rage::Telemetry and move the GC-specific logic over to opentelemetry-instrumentation, matching the existing handler pattern.

I've been going through GC.stat, planning to track deltas of :time (% of interval), minor_gc_count/major_gc_count, and heap occupancy still figuring out which of these actually signal real GC pressure. will try to read through some blog post about ruby gc this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants