This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Ember from 'ember'; | |
| export default Ember.Component.extend({ | |
| sourceInternal: 'default', | |
| logs: [], | |
| source: Ember.computed('sourceInternal', { | |
| get: function() { | |
| this._log(`[source getter] sourceInternal=${this.get('sourceInternal')}`); | |
| return this.get('sourceInternal'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| class AdapterSetupComponent < ApplicationComponent | |
| def initialize(app, process_type) | |
| @app = app | |
| @process_type = process_type | |
| end | |
| def template | |
| render ModalComponent.new do |modal| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Apply a sample rate to Scout so it only instruments a portion of requests | |
| # or jobs. Here's an example of how to use it in a controller action or job: | |
| # ScoutApm::Transaction.use_sample_rate 0.001 | |
| module ScoutApm | |
| module Transaction | |
| # Set SCOUT_SAMPLING=false to disable sampling. This will send all transactions to Scout, | |
| # and very quickly use up our monthly transaction limit. | |
| USE_SAMPLING = ENV["SCOUT_SAMPLING"] != "false" | |
| def self.use_sample_rate(rate) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brew install angle-grinder | |
| heroku logs -t -d router -a app-name | agrind '* | |
| | parse regex "(?P<timestamp>\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{6})" | |
| | timeslice(parseDate(timestamp)) 1m as time | |
| | logfmt | |
| | count as reqs, | |
| count(at == "error") as errors, | |
| avg(connect) as avg_connect, | |
| avg(service) as avg_service |
OlderNewer