Project

General

Profile

Bug #22764

Telemetry errors out with undefined method `[]' for nil:NilClass on Rails code reload

Added by Lukas Zapletal 5 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

This only happens when reloading Rails in dev mode.

lib/foreman/telemetry.rb:49:in `block (2 levels) in register_rails'
lib/foreman/telemetry.rb:48:in `each'
lib/foreman/telemetry.rb:48:in `block in register_rails'
lib/middleware/telemetry.rb:9:in `call'
lib/middleware/catch_json_parse_errors.rb:8:in `call'
lib/middleware/session_safe_logging.rb:17:in `call'
lib/middleware/tagged_logging.rb:18:in `call'

Problem on

increment_counter(metric_name, after[ruby_key] - before[ruby_key], :controller => controller, :action => action) if after.include?(ruby_key)

Related issues

Related to Foreman - Feature #18675: Add telemetry to Foreman coreClosed2017-02-26

Associated revisions

Revision f3d7d02c (diff)
Added by Lukas Zapletal 5 months ago

Fixes #22764 - gc stat metric works on rails reload

History

#1 Updated by Lukas Zapletal 5 months ago

  • Description updated (diff)

#2 Updated by The Foreman Bot 5 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5293 added

#3 Updated by Ivan Necas 5 months ago

  • Legacy Backlogs Release (now unused) set to 330
  • Status changed from Ready For Testing to Closed

#4 Updated by Lukas Zapletal 5 months ago

Also available in: Atom PDF