ElasticAPM.agent.config.disable_send = true if ZuoraConnect.configuration.enable_apm && !defined?(Rails::Console) case Rails.env.to_s when 'production' ElasticAPM.agent.config.server_url = "http://apm-server.logging:8200" ElasticAPM.agent.config.transaction_sample_rate = 0.20 ElasticAPM.agent.config.capture_body = false when 'staging' ElasticAPM.agent.config.server_url = "http://apm-server.logging:8200" ElasticAPM.agent.config.transaction_sample_rate = 1.0 when 'development' ElasticAPM.agent.config.server_url = "http://logging.0.ecc.auw2.zuora:8200" ElasticAPM.agent.config.transaction_sample_rate = 1.0 end ElasticAPM.agent.config.pool_size = 1 ElasticAPM.agent.config.transaction_max_spans = 500 ElasticAPM.agent.config.ignore_url_patterns = ['^\/admin\/resque.*', '^\/admin\/redis.*', '^\/admin\/peek.*', '^\/peek.*'] ElasticAPM.agent.config.verify_server_cert = false ElasticAPM.agent.config.log_level = Logger::INFO ElasticAPM.agent.config.disable_send = false end