You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: health_controller.rb
    path of file: ./repos/dd-trace-rb/integration/apps/rails-five/app/controllers
    
    the code of the file until where you have to start completion: require 'json'

class HealthController < ApplicationController
  #
  # Check if web application is responsive
  # Return 204 No Content to signal healthy state.
  #
  def check
    head :no_content
  end

  def detailed_check
    render json: {
      webserver_process: $PROGRAM_NAME,
      profiler_avail
    
  def detailed_check
    render json: {
      webserver_process: $PROGRAM_NAME,
      profiler_available: Datadog::Profiling.start_if_enabled,
      profiler_threads: Thread.list.map(&:name).select { |it| it && it.include?('Profiling') },
      telemetry_enabled: Datadog.configuration.telemetry.enabled,
      telemetry_client_enabled: Datadog.send(:components).telemetry.enabled,
      telemetry_worker_enabled: Datadog.send(:components).telemetry.worker.enabled?
    }
  end