Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 3 commits
  • 5 files changed
  • 0 comments
  • 1 contributor
3  Gemfile
... ...
@@ -1,4 +1,5 @@
1 1
 # A sample Gemfile
2 2
 source "https://rubygems.org"
3 3
 
4  
-gem 'rack'
  4
+gem 'rack'
  5
+gem 'newrelic_rpm'
2  Gemfile.lock
... ...
@@ -1,10 +1,12 @@
1 1
 GEM
2 2
   remote: https://rubygems.org/
3 3
   specs:
  4
+    newrelic_rpm (3.6.0.78)
4 5
     rack (1.5.1)
5 6
 
6 7
 PLATFORMS
7 8
   ruby
8 9
 
9 10
 DEPENDENCIES
  11
+  newrelic_rpm
10 12
   rack
2  config.ru
... ...
@@ -1,3 +1,5 @@
  1
+require 'newrelic_rpm'
  2
+
1 3
 use Rack::Static, 
2 4
   urls: %w{/css /images /js /lib},
3 5
   root: "public"
255  config/newrelic.yml
... ...
@@ -0,0 +1,255 @@
  1
+# Here are the settings that are common to all environments
  2
+common: &default_settings
  3
+  # ============================== LICENSE KEY ===============================
  4
+
  5
+  # You must specify the license key associated with your New Relic
  6
+  # account.  This key binds your Agent's data to your account in the
  7
+  # New Relic service.
  8
+  license_key: '<%= ENV["NEW_RELIC_LICENSE_KEY"] %>'
  9
+  
  10
+  # Agent Enabled (Rails Only)
  11
+  # Use this setting to force the agent to run or not run.
  12
+  # Default is 'auto' which means the agent will install and run only
  13
+  # if a valid dispatcher such as Mongrel is running.  This prevents
  14
+  # it from running with Rake or the console.  Set to false to
  15
+  # completely turn the agent off regardless of the other settings.
  16
+  # Valid values are true, false and auto.
  17
+  #
  18
+  # agent_enabled: auto
  19
+  
  20
+  # Application Name Set this to be the name of your application as
  21
+  # you'd like it show up in New Relic. The service will then auto-map
  22
+  # instances of your application into an "application" on your
  23
+  # dashboard page. If you want to map this instance into multiple
  24
+  # apps, like "AJAX Requests" and "All UI" then specify a semicolon
  25
+  # separated list of up to three distinct names, or a yaml list.
  26
+  # Defaults to the capitalized RAILS_ENV or RACK_ENV (i.e.,
  27
+  # Production, Staging, etc)
  28
+  #
  29
+  # Example:
  30
+  #
  31
+  #   app_name:
  32
+  #       - Ajax Service
  33
+  #       - All Services
  34
+  # 
  35
+  app_name: <%= ENV["NEW_RELIC_APP_NAME"] %>
  36
+
  37
+  # When "true", the agent collects performance data about your 
  38
+  # application and reports this data to the New Relic service at 
  39
+  # newrelic.com. This global switch is normally overridden for each 
  40
+  # environment below. (formerly called 'enabled')
  41
+  monitor_mode: true
  42
+
  43
+  # Developer mode should be off in every environment but
  44
+  # development as it has very high overhead in memory.
  45
+  developer_mode: false
  46
+
  47
+  # The newrelic agent generates its own log file to keep its logging
  48
+  # information separate from that of your application.  Specify its
  49
+  # log level here.
  50
+  log_level: info
  51
+
  52
+  # Optionally set the path to the log file This is expanded from the
  53
+  # root directory (may be relative or absolute, e.g. 'log/' or
  54
+  # '/var/log/') The agent will attempt to create this directory if it
  55
+  # does not exist.
  56
+  # log_file_path: 'log'
  57
+  
  58
+  # Optionally set the name of the log file, defaults to 'newrelic_agent.log'
  59
+  # log_file_name: 'newrelic_agent.log'
  60
+
  61
+  # The newrelic agent communicates with the service via http by
  62
+  # default.  If you want to communicate via https to increase
  63
+  # security, then turn on SSL by setting this value to true.  Note,
  64
+  # this will result in increased CPU overhead to perform the
  65
+  # encryption involved in SSL communication, but this work is done
  66
+  # asynchronously to the threads that process your application code,
  67
+  # so it should not impact response times.
  68
+  ssl: false
  69
+
  70
+  # EXPERIMENTAL: enable verification of the SSL certificate sent by
  71
+  # the server. This setting has no effect unless SSL is enabled
  72
+  # above. This may block your application. Only enable it if the data
  73
+  # you send us needs end-to-end verified certificates.
  74
+  #
  75
+  # This means we cannot cache the DNS lookup, so each request to the
  76
+  # service will perform a lookup. It also means that we cannot
  77
+  # use a non-blocking lookup, so in a worst case, if you have DNS
  78
+  # problems, your app may block indefinitely.
  79
+  # verify_certificate: true
  80
+  
  81
+  # Set your application's Apdex threshold value with the 'apdex_t'
  82
+  # setting, in seconds. The apdex_t value determines the buckets used
  83
+  # to compute your overall Apdex score. 
  84
+  # Requests that take less than apdex_t seconds to process will be
  85
+  # classified as Satisfying transactions; more than apdex_t seconds
  86
+  # as Tolerating transactions; and more than four times the apdex_t
  87
+  # value as Frustrating transactions. 
  88
+  # For more about the Apdex standard, see
  89
+  # http://newrelic.com/docs/general/apdex
  90
+
  91
+  apdex_t: 0.5
  92
+  
  93
+  #============================== Browser Monitoring ===============================
  94
+  # New Relic Real User Monitoring gives you insight into the performance real users are
  95
+  # experiencing with your website. This is accomplished by measuring the time it takes for
  96
+  # your users' browsers to download and render your web pages by injecting a small amount
  97
+  # of JavaScript code into the header and footer of each page. 
  98
+  browser_monitoring:
  99
+      # By default the agent automatically injects the monitoring JavaScript 
  100
+      # into web pages. Set this attribute to false to turn off this behavior.
  101
+      auto_instrument: true
  102
+
  103
+  # Proxy settings for connecting to the service.
  104
+  #
  105
+  # If a proxy is used, the host setting is required.  Other settings
  106
+  # are optional.  Default port is 8080.
  107
+  #
  108
+  # proxy_host: hostname
  109
+  # proxy_port: 8080
  110
+  # proxy_user:
  111
+  # proxy_pass:
  112
+
  113
+  
  114
+  # Tells transaction tracer and error collector (when enabled)
  115
+  # whether or not to capture HTTP params.  When true, frameworks can
  116
+  # exclude HTTP parameters from being captured.
  117
+  # Rails: the RoR filter_parameter_logging excludes parameters
  118
+  # Java: create a config setting called "ignored_params" and set it to
  119
+  #     a comma separated list of HTTP parameter names.
  120
+  #     ex: ignored_params: credit_card, ssn, password 
  121
+  capture_params: false
  122
+
  123
+
  124
+  # Transaction tracer captures deep information about slow
  125
+  # transactions and sends this to the service once a
  126
+  # minute. Included in the transaction is the exact call sequence of
  127
+  # the transactions including any SQL statements issued.
  128
+  transaction_tracer:
  129
+  
  130
+    # Transaction tracer is enabled by default. Set this to false to
  131
+    # turn it off. This feature is only available at the Professional
  132
+    # and above product levels.
  133
+    enabled: true
  134
+    
  135
+    # Threshold in seconds for when to collect a transaction
  136
+    # trace. When the response time of a controller action exceeds
  137
+    # this threshold, a transaction trace will be recorded and sent to
  138
+    # the service. Valid values are any float value, or (default)
  139
+    # "apdex_f", which will use the threshold for an dissatisfying
  140
+    # Apdex controller action - four times the Apdex T value.
  141
+    transaction_threshold: apdex_f
  142
+ 
  143
+    # When transaction tracer is on, SQL statements can optionally be
  144
+    # recorded. The recorder has three modes, "off" which sends no
  145
+    # SQL, "raw" which sends the SQL statement in its original form,
  146
+    # and "obfuscated", which strips out numeric and string literals
  147
+    record_sql: obfuscated
  148
+    
  149
+    # Threshold in seconds for when to collect stack trace for a SQL
  150
+    # call. In other words, when SQL statements exceed this threshold,
  151
+    # then capture and send the current stack trace. This is
  152
+    # helpful for pinpointing where long SQL calls originate from
  153
+    stack_trace_threshold: 0.500
  154
+
  155
+    # Determines whether the agent will capture query plans for slow
  156
+    # SQL queries.  Only supported in mysql and postgres.  Should be
  157
+    # set to false when using other adapters.
  158
+    # explain_enabled: true
  159
+
  160
+    # Threshold for query execution time below which query plans will not 
  161
+    # not be captured.  Relevant only when `explain_enabled` is true.
  162
+    # explain_threshold: 0.5
  163
+  
  164
+  # Error collector captures information about uncaught exceptions and
  165
+  # sends them to the service for viewing
  166
+  error_collector:
  167
+    
  168
+    # Error collector is enabled by default. Set this to false to turn
  169
+    # it off. This feature is only available at the Professional and above
  170
+    # product levels
  171
+    enabled: true
  172
+    
  173
+    # Rails Only - tells error collector whether or not to capture a 
  174
+    # source snippet around the place of the error when errors are View 
  175
+    # related.
  176
+    capture_source: true    
  177
+    
  178
+    # To stop specific errors from reporting to New Relic, set this property
  179
+    # to comma separated values.  Default is to ignore routing errors
  180
+    # which are how 404's get triggered.
  181
+    #
  182
+    ignore_errors: ActionController::RoutingError
  183
+
  184
+  # (Advanced) Uncomment this to ensure the cpu and memory samplers
  185
+  # won't run.  Useful when you are using the agent to monitor an
  186
+  # external resource
  187
+  # disable_samplers: true
  188
+  
  189
+  # If you aren't interested in visibility in these areas, you can
  190
+  # disable the instrumentation to reduce overhead.
  191
+  #
  192
+  # disable_view_instrumentation: true
  193
+  # disable_activerecord_instrumentation: true
  194
+  # disable_memcache_instrumentation: true
  195
+  # disable_dj: true
  196
+
  197
+  # If you're interested in capturing memcache keys as though they
  198
+  # were SQL uncomment this flag. Note that this does increase
  199
+  # overhead slightly on every memcached call, and can have security
  200
+  # implications if your memcached keys are sensitive
  201
+  # capture_memcache_keys: true
  202
+  
  203
+  # Certain types of instrumentation such as GC stats will not work if 
  204
+  # you are running multi-threaded.  Please let us know.
  205
+  # multi_threaded = false
  206
+
  207
+# Application Environments
  208
+# ------------------------------------------
  209
+# Environment specific settings are in this section.
  210
+# For Rails applications, RAILS_ENV is used to determine the environment
  211
+# For Java applications, pass -Dnewrelic.environment <environment> to set
  212
+# the environment
  213
+
  214
+# NOTE if your application has other named environments, you should
  215
+# provide newrelic configuration settings for these environments here.
  216
+
  217
+development:
  218
+  <<: *default_settings
  219
+  # Turn off communication to New Relic service in development mode (also 
  220
+  # 'enabled').
  221
+  # NOTE: for initial evaluation purposes, you may want to temporarily 
  222
+  # turn the agent on in development mode.
  223
+  monitor_mode: false
  224
+
  225
+  # Rails Only - when running in Developer Mode, the New Relic Agent will 
  226
+  # present performance information on the last 100 transactions you have
  227
+  # executed since starting the mongrel.
  228
+  # NOTE: There is substantial overhead when running in developer mode.
  229
+  # Do not use for production or load testing.  
  230
+  developer_mode: true
  231
+  
  232
+  # Enable textmate links
  233
+  textmate: true
  234
+
  235
+test:
  236
+  <<: *default_settings
  237
+  # It almost never makes sense to turn on the agent when running
  238
+  # unit, functional or integration tests or the like.
  239
+  monitor_mode: false
  240
+
  241
+# Turn on the agent in production for 24x7 monitoring.  NewRelic
  242
+# testing shows an average performance impact of < 5 ms per
  243
+# transaction, you you can leave this on all the time without
  244
+# incurring any user-visible performance degradation.
  245
+production:
  246
+  <<: *default_settings
  247
+  monitor_mode: true
  248
+
  249
+# Many applications have a staging environment which behaves
  250
+# identically to production.  Support for that environment is provided
  251
+# here.  By default, the staging environment has the agent turned on.
  252
+staging:
  253
+  <<: *default_settings
  254
+  monitor_mode: true
  255
+  app_name: <%= ENV["NEW_RELIC_APP_NAME"] %> (Staging)
12  public/js/input.js
@@ -3,7 +3,6 @@ $("#channel").focus();
3 3
 (function ($) {
4 4
   
5 5
   Input = Backbone.Model.extend({
6  
-    //Create a model to hold input atribute
7 6
     channel: null,
8 7
     name: null,
9 8
     mic: null,
@@ -12,10 +11,8 @@ $("#channel").focus();
12 11
   });
13 12
   
14 13
   InputList = Backbone.Collection.extend({
15  
-    //This is our InputList collection and holds our Input models
16 14
     initialize: function (models, options) {
17 15
       this.bind("add", options.view.addInputTr);
18  
-      //Listen for new additions to the collection and call a view function if so
19 16
     }
20 17
   });
21 18
   
@@ -25,8 +22,6 @@ $("#channel").focus();
25 22
         
26 23
     initialize: function () {
27 24
       this.input_list = new InputList( null, { view: this });
28  
-      //Create a input_list collection when the view is initialized.
29  
-      //Pass it a reference to this view to create a connection between the two
30 25
     },
31 26
         
32 27
     events: {
@@ -48,10 +43,9 @@ $("#channel").focus();
48 43
                                       provided:    provided_string,
49 44
                                       stand:       input_stand, });
50 45
                                           
51  
-        //Add a new input model to our input collection
52 46
       this.input_list.add( input_model );
53 47
           
54  
-      // Extract this:
  48
+      // TODO: Extract this:
55 49
       $(".field").val("");
56 50
       $("#provided").attr("checked", false);
57 51
       $("#channel").focus();
@@ -64,14 +58,13 @@ $("#channel").focus();
64 58
     },
65 59
     
66 60
     addInputTr: function (model) {
67  
-      //The parameter passed is a reference to the model that was added
68 61
       $("#input-list").append("<tr class='input'></tr>");
69 62
       $("#input-list tr:last").append("<td>" + model.get('channel') + "</td>");
70 63
       $("#input-list tr:last").append("<td>" + model.get('name') + "</td>");
71 64
       $("#input-list tr:last").append("<td>" + model.get('mic') + model.get('provided') + "</td>");
72 65
       $("#input-list tr:last").append("<td>" + model.get('stand') + "</td>");
73  
-      //Use .get to receive attributes of the model
74 66
     },
  67
+    
75 68
     displayBoolean: function(param) {
76 69
       if (param === true){
77 70
         return "*"
@@ -85,6 +78,7 @@ $("#channel").focus();
85 78
   var appview = new AppView;
86 79
 })($);
87 80
 
  81
+// Google Analytics
88 82
 var _gaq = _gaq || [];
89 83
 _gaq.push(['_setAccount', 'UA-38110744-1']);
90 84
 _gaq.push(['_trackPageview']);

No commit comments for this range

Something went wrong with that request. Please try again.