Sha256: 0d28b415c983960172e263fd7667e88d444c32bfd85bea033053e5f0dba9d1c2

Contents?: true

Size: 592 Bytes

Versions: 22

Compression:

Stored size: 592 Bytes

Contents

# typed: false
# frozen_string_literal: true

class ApplicationController < ActionController::Base
  include ActionController::MimeResponds

  include Hephaestus::Responses

  rescue_from ActionController::UnknownFormat, with: :not_acceptable

  before_action :set_request_span_context
  def set_request_span_context
  end

  after_action :set_response_span_context
  def set_response_span_context
    OpenTelemetry::Trace.current_span.add_attributes({
      OpenTelemetry::SemanticConventions::Trace::HTTP_RESPONSE_CONTENT_LENGTH => response.headers["content-length"] || 0,
    })
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
hephaestus-0.7.7.2 templates/app/controllers/application_controller.rb
hephaestus-0.7.7 templates/app/controllers/application_controller.rb
hephaestus-0.7.6.2 templates/app/controllers/application_controller.rb
hephaestus-0.7.6.1 templates/app/controllers/application_controller.rb
hephaestus-0.7.6 templates/app/controllers/application_controller.rb
hephaestus-0.7.5.3 templates/app/controllers/application_controller.rb
hephaestus-0.7.5.2 templates/app/controllers/application_controller.rb
hephaestus-0.7.5.1 templates/app/controllers/application_controller.rb
hephaestus-0.7.5 templates/app/controllers/application_controller.rb
hephaestus-0.7.4.2 templates/app/controllers/application_controller.rb
hephaestus-0.7.4.1 templates/app/controllers/application_controller.rb
hephaestus-0.7.4 templates/app/controllers/application_controller.rb
hephaestus-0.7.3.1 templates/app/controllers/application_controller.rb
hephaestus-0.7.3 templates/app/controllers/application_controller.rb
hephaestus-0.7.2.5 templates/app/controllers/application_controller.rb
hephaestus-0.7.2.4 templates/app/controllers/application_controller.rb
hephaestus-0.7.2.3 templates/app/controllers/application_controller.rb
hephaestus-0.7.2.2 templates/app/controllers/application_controller.rb
hephaestus-0.7.2.1 templates/app/controllers/application_controller.rb
hephaestus-0.7.2 templates/app/controllers/application_controller.rb