From f3a15ce313692cc438a7969136bec00829fa5c90 Mon Sep 17 00:00:00 2001
From: guange <8863824@gmail.com>
Date: Tue, 26 May 2015 23:09:10 +0800
Subject: [PATCH 1/6] =?UTF-8?q?=E5=8A=A0=E5=85=A5=E6=80=A7=E8=83=BD?=
=?UTF-8?q?=E5=88=86=E6=9E=90=20oneapm?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Gemfile | 4 ++
config/oneapm.yml | 135 ++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 139 insertions(+)
create mode 100644 config/oneapm.yml
diff --git a/Gemfile b/Gemfile
index fbe74f8dd..a43efbaeb 100644
--- a/Gemfile
+++ b/Gemfile
@@ -6,6 +6,10 @@ unless RUBY_PLATFORM =~ /w32/
gem 'iconv'
end
+source 'http://rubygems.oneapm.com' do
+ gem 'oneapm_rpm'
+end
+
gem "mysql2", "= 0.3.18"
gem 'redis-rails'
gem 'rubyzip'
diff --git a/config/oneapm.yml b/config/oneapm.yml
new file mode 100644
index 000000000..e5b2e7bed
--- /dev/null
+++ b/config/oneapm.yml
@@ -0,0 +1,135 @@
+#
+# OneApm RubyAgent Configuration
+#
+
+# Here are the settings that are common to all environments
+common: &default_settings
+ # ============================== LICENSE KEY ===============================
+
+ #
+ # Get your license key from oneapm.com
+ #
+ license_key: 'BAQMBw8FUwR2542UFFpDXFgVVk66e2dZWB4EBlQHSf846wgBGwICFQoD0498BAEfBgNIAlQ='
+
+ # Agent Enabled (Ruby/Rails Only)
+ # Valid values are true, false and auto.
+ #
+ # agent_enabled: auto
+
+ # This app_name will be the application name in oneapm.com in your account.
+ #
+ # Caution: If you change this name, a new application will appear in the OneApm
+ # user interface with the new name, and data will stop reporting to the
+ # app with the old name.
+ #
+ app_name: trusite
+
+ # When "true", the agent collects performance data about your
+ # application and reports this data to the OneApm service at
+ # oneapm.com. This global switch is normally overridden for each
+ # environment below. (formerly called 'enabled')
+ monitor_mode: true
+
+ # Specify its log level here.
+ log_level: info
+
+ # log_file_path: 'log'
+ # log_file_name: 'oneapm_agent.log'
+
+ # The oneapm agent communicates with the service via https by default.
+ # ssl: true
+
+ # ======================== Browser Monitoring =============================
+ browser_monitoring:
+ # By default the agent automatically injects the monitoring JavaScript
+ # into web pages. Set this attribute to false to turn off this behavior.
+ auto_instrument: true
+
+ # Proxy settings for connecting to the OneApm server.
+ #
+ # proxy_host: hostname
+ # proxy_port: 8080
+ # proxy_user:
+ # proxy_pass:
+
+ # Tells transaction tracer and error collector (when enabled)
+ # whether or not to capture HTTP params. When true, frameworks can
+ # exclude HTTP parameters from being captured.
+ # Rails: the RoR filter_parameter_logging excludes parameters
+ capture_params: false
+
+ # Transaction tracer captures deep information about slow
+ # transactions and sends this to the OneApm service once a
+ # minute. Included in the transaction is the exact call sequence of
+ # the transactions including any SQL statements issued.
+ transaction_tracer:
+
+ # Transaction tracer is enabled by default.
+ enabled: true
+
+ # Threshold in seconds for when to collect a transaction
+ # trace. When the response time of a controller action exceeds
+ # this threshold, a transaction trace will be recorded and sent to
+ # OneApm. Valid values are any float value, or (default) "apdex_f",
+ # which will use the threshold for an dissatisfying Apdex
+ # controller action - four times the Apdex T value.
+ transaction_threshold: apdex_f
+
+ # When transaction tracer is on, SQL statements can optionally be
+ # recorded. The recorder has three modes, "off" which sends no
+ # SQL, "raw" which sends the SQL statement in its original form,
+ # and "obfuscated", which strips out numeric and string literals.
+ record_sql: obfuscated
+
+ # Threshold in seconds for when to collect stack trace for a SQL
+ # call. In other words, when SQL statements exceed this threshold,
+ # then capture and send to OneApm the current stack trace. This is
+ # helpful for pinpointing where long SQL calls originate from.
+ stack_trace_threshold: 0.500
+
+ # Determines whether the agent will capture query plans for slow
+ # SQL queries. Only supported in mysql and postgres. Should be
+ # set to false when using other adapters.
+ # explain_enabled: true
+
+ # Threshold for query execution time below which query plans will
+ # not be captured. Relevant only when `explain_enabled` is true.
+ # explain_threshold: 0.5
+
+ # Error collector captures information about uncaught exceptions and
+ # sends them to OneApm for viewing
+ error_collector:
+
+ # Error collector is enabled by default.
+ enabled: true
+
+ # Ignore the following errors, add your own.
+ ignore_errors: "ActionController::RoutingError,Sinatra::NotFound"
+
+# ===================== Application Environments ========================
+# Environment-specific settings are in this section.
+# For Rails applications, RAILS_ENV is used to determine the environment.
+
+# NOTE if your application has other named environments, you should
+# provide oneapm configuration settings for these environments here.
+
+development:
+ <<: *default_settings
+ # Turn on communication to OneApm service in development mode
+ monitor_mode: true
+ app_name: My Application (Development)
+
+test:
+ <<: *default_settings
+ monitor_mode: false
+
+# Turn on the agent in production for 24x7 monitoring.
+production:
+ <<: *default_settings
+ monitor_mode: true
+
+# Staging environment which behaves identically to production.
+staging:
+ <<: *default_settings
+ monitor_mode: true
+ app_name: My Application (Staging)
From 9ce1916fbb3f309e2045e2e15f02372fb7eb8f81 Mon Sep 17 00:00:00 2001
From: guange <8863824@gmail.com>
Date: Tue, 26 May 2015 23:10:08 +0800
Subject: [PATCH 2/6] =?UTF-8?q?autologin=20token=20cookies=20domain?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/account_controller.rb | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb
index 7976e1aa4..75be302cd 100644
--- a/app/controllers/account_controller.rb
+++ b/app/controllers/account_controller.rb
@@ -336,6 +336,7 @@ class AccountController < ApplicationController
:expires => 1.month.from_now,
:path => (Redmine::Configuration['autologin_cookie_path'] || '/'),
:secure => (Redmine::Configuration['autologin_cookie_secure'] ? true : false),
+ :domain => '.trustie.net',
:httponly => true
}
cookies[autologin_cookie_name] = cookie_options
From 3fa5179026e83a57aa18c957d36e45ff13556026 Mon Sep 17 00:00:00 2001
From: guange <8863824@gmail.com>
Date: Tue, 26 May 2015 23:11:10 +0800
Subject: [PATCH 3/6] =?UTF-8?q?issue=E6=95=B0=E7=BB=9F=E8=AE=A1=E6=8B=96?=
=?UTF-8?q?=E6=85=A2=E6=80=A7=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/projects/_development_group.html.erb | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb
index 676761831..726e9646f 100644
--- a/app/views/projects/_development_group.html.erb
+++ b/app/views/projects/_development_group.html.erb
@@ -8,9 +8,10 @@
<% unless @project.enabled_modules.where("name = 'issue_tracking'").empty? %>