Class: Skylight::Normalizers::Normalizer Private
- Includes:
- Util::Logging
- Defined in:
- lib/skylight/normalizers.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
ActionController::ProcessAction, ActionController::SendFile, ActionDispatch::ProcessMiddleware, ActionDispatch::RouteSet, ActiveJob::Perform, ActiveModelSerializers::Render, ActiveRecord::FutureResult, ActiveRecord::Instantiation, ActiveStorage, ActiveSupport::Cache, Coach::HandlerFinish, Coach::MiddlewareFinish, CouchPotato::Query, Default, Elasticsearch::Request, Faraday::Request, Grape::Endpoint, Grape::FormatResponse, GraphQL::Base, Graphiti::Render, Graphiti::Resolve, RenderNormalizer, SQL, Shrine
Instance Attribute Summary collapse
- #config ⇒ Object readonly private
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config) ⇒ Normalizer
constructor
private
A new instance of Normalizer.
- #normalize(_trace, _name, _payload) ⇒ Object private
- #normalize_after(trace, span, name, payload) ⇒ Object private
- #normalize_with_meta(trace, name, payload) ⇒ Object private
Methods included from Util::Logging
#config_for_logging, #debug, #error, #fmt, #info, #log, #log_context, #raise_on_error?, #t, #trace, #trace?, #warn
Constructor Details
#initialize(config) ⇒ Normalizer
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Normalizer.
57 58 59 60 |
# File 'lib/skylight/normalizers.rb', line 57 def initialize(config) @config = config setup if respond_to?(:setup) end |
Instance Attribute Details
#config ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
53 54 55 |
# File 'lib/skylight/normalizers.rb', line 53 def config @config end |
Class Method Details
.register(name, opts = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
49 50 51 |
# File 'lib/skylight/normalizers.rb', line 49 def self.register(name, opts = {}) Normalizers.register(name, self, opts) end |
Instance Method Details
#normalize(_trace, _name, _payload) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
62 63 64 |
# File 'lib/skylight/normalizers.rb', line 62 def normalize(_trace, _name, _payload) :skip end |
#normalize_after(trace, span, name, payload) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
78 79 |
# File 'lib/skylight/normalizers.rb', line 78 def normalize_after(trace, span, name, payload) end |
#normalize_with_meta(trace, name, payload) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/skylight/normalizers.rb', line 66 def (trace, name, payload) # If we have a normal response but no meta, add it cat, title, desc, = ret = normalize(trace, name, payload) return cat if cat == :skip ||= {} cache_key = ret.hash (trace, name, payload, , cache_key: cache_key) [cat, title, desc, ] end |