← Graph

config.log_tags

concept 1 connections

Rails application configuration setting (in application.rb) that defines a hash of tags attached to every request log entry. Supports a lambda syntax (receives the request object, so arbitrary methods can be called and combined) and a compact method-shortcut syntax that calls a named method on the request. Feeds directly into semantic_logger, so tagged attributes flow downstream to the observability tool. Demonstrated in the talk to add HTTP headers and user_agent to every request, which Callaghan considers critical and is surprised is not done by default.

category
practice
concept config.log_tags
related_to
Tags set via config.log_tags are forwarded through Rails logging to semantic_logger and then to the observability tool.

Provenance

Read by
1 extraction