profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/smingins/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Shane Mingins smingins Wellington, New Zealand

dylanz/i18n_backend_database 123

Database Backend for Rails I18n

dylanz/ehcache 27

ehcache

smingins/zookeeper 23

Ruby Interface to ZooKeeper

ce/ruby-zookeeper 16

Ruby bindings for ZooKeeper

jeberly/active_merchant 2

Active Merchant is a simple payment abstraction library used in and sponsored by Shopify. It is written by Tobias Luetke, Cody Fauser, and contributors. The aim of the project is to feel natural to Ruby users and to abstract as many parts as possible away from the user to offer a consistent interface across all supported gateways.

smingins/i18n_backend_database_demo 2

Demo Rails App for i18n_backend_database

smingins/panda 2

Video encoding made easy with AWS

smingins/test 2

testing some stuff

smingins/capybara-demo 1

Rails 3, RSpec 2, Capybara - testing a page with javascript

smingins/enrolment_states 1

experimenting with states and actions

pull request commentscoutapp/scout_apm_ruby

Improve blind delegation of ActiveRecordInstruments#log

Any chance of merging this? We've disabled scout on production because load_async is more valuable for us than having Scout (at the moment, where we know the app is stable performance wise).

casperisfine

comment created time in 12 hours

issue openedscoutapp/scout_apm_python

Investigate removal of X-Amzn-Trace-Id for queuetime

https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-request-tracing.html

The X-Amzn-Trace-Id header that Amazon adds to ELB only gives time since epoch in seconds as opposed to milliseconds. This isn't a very accurate measurement, and seems to impact apps negatively

Whether Amazon is truncating the time or rounding the time to the second may need to be investigated, but either way unless queuetime is above a second this measurement doesn't add much value

created time in a day

issue commentscoutapp/scout_apm_ruby

Custom instrumentation for rake tasks?

Thanks for the update @mkilling! 👍

mkilling

comment created time in a day

issue commentscoutapp/scout_apm_ruby

Custom instrumentation for rake tasks?

@seth-macpherson we actually ended up switching to NewRelic, which supports this out of the box and is actually cheaper than Scout for our workload.

mkilling

comment created time in 2 days

issue commentscoutapp/scout_apm_ruby

Custom instrumentation for rake tasks?

@mkilling Did you ever get this working? I'd really like to see something like this incorporated into Scout.

mkilling

comment created time in 2 days

issue commentscoutapp/scout_apm_ruby

When using scout together with datadog, app can't start up

Hi, we have this issue as well. Error is fatal - machine stack overflow in critical region:

ddtrace 0.45.0 scout_apm 4.0.4

I tried, but it did not make a difference.

development:
  disabled_instruments:
    - NetHttp

ruby 3.0.0 rails 6.0.3.5

w32-blaster

comment created time in 2 days

PR opened scoutapp/scout_apm_ruby

Improve blind delegation of ActiveRecordInstruments#log

Should fix: https://github.com/scoutapp/scout_apm_ruby/issues/393

Context

Rails edge changed the signature of #log, it now includes a keyword arg (see https://github.com/rails/rails/pull/40037)

The only proper way to blind delegate keyword args across versions is to use ruby2_keywords, see https://eregon.me/blog/2021/02/13/correct-delegation-in-ruby-2-27-3.html for details.

+2 -0

0 comment

1 changed file

pr created time in 4 days

issue openedscoutapp/scout_apm_ruby

Scout broken on Rails Master due to change on `log` in `abstract_adapter`

Hello there. We are using Scout and Rails Master on production and just stumbled into a problem caused either by, I believe, Rails PR 40037.

This PR added the load_async methods in order to allow multiple queries to run in the background at the same time. It also changed the signature of the log method in the abstract_adpater which Scout seems to rely on. The error message we are seeing is wrong number of arguments (given 6, expected 1..5). Below I have added the full stack trace.

The cause seems to be the file scout_apm/instruments/active_record.rb which calls rails log (which was modified) on line 256.

Disabling Scout solved the problem for us.

irb(main):001:1* begin
irb(main):002:1*   Website.last
irb(main):003:1* rescue => e
irb(main):004:1*   puts e.backtrace
irb(main):005:1* end
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb:697:in `log'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/scout_apm-4.0.4/lib/scout_apm/instruments/active_record.rb:256:in `log'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:688:in `exec_cache'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb:654:in `execute_and_clear'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/connection_adapters/postgresql/database_statements.rb:51:in `exec_query'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:547:in `select'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:66:in `select_all'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:110:in `select_all'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/querying.rb:51:in `_query_by_sql'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation.rb:923:in `block in exec_main_query'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation.rb:945:in `skip_query_cache_if_necessary'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation.rb:909:in `exec_main_query'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation.rb:895:in `block in exec_queries'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation.rb:945:in `skip_query_cache_if_necessary'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation.rb:889:in `exec_queries'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/scout_apm-4.0.4/lib/scout_apm/instruments/active_record.rb:381:in `exec_queries'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation.rb:683:in `load'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation.rb:254:in `records'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation.rb:249:in `to_ary'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation/finder_methods.rb:562:in `find_nth_with_limit'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation/finder_methods.rb:547:in `find_nth'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation/finder_methods.rb:148:in `first'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/relation/finder_methods.rb:179:in `last'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/activerecord/lib/active_record/querying.rb:22:in `last'
(irb):2:in `<main>'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb/workspace.rb:116:in `eval'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb/workspace.rb:116:in `evaluate'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb/context.rb:450:in `evaluate'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb.rb:557:in `block (2 levels) in eval_input'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb.rb:721:in `signal_status'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb.rb:538:in `block in eval_input'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb/ruby-lex.rb:186:in `block (2 levels) in each_top_level_statement'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb/ruby-lex.rb:171:in `loop'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb/ruby-lex.rb:171:in `block in each_top_level_statement'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb/ruby-lex.rb:170:in `catch'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb/ruby-lex.rb:170:in `each_top_level_statement'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb.rb:537:in `eval_input'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb.rb:472:in `block in run'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb.rb:471:in `catch'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb.rb:471:in `run'
/home/app/.rbenv/versions/3.0.0/lib/ruby/3.0.0/irb.rb:400:in `start'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/railties/lib/rails/commands/console/console_command.rb:70:in `start'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/railties/lib/rails/commands/console/console_command.rb:19:in `start'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/railties/lib/rails/commands/console/console_command.rb:102:in `perform'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/railties/lib/rails/command/base.rb:69:in `perform'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/railties/lib/rails/command.rb:50:in `invoke'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/bundler/gems/rails-ab8e3d22cbac/railties/lib/rails/commands.rb:18:in `<main>'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `require'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:23:in `block in require_with_bootsnap_lfi'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require_with_bootsnap_lfi'
/home/app/.rbenv/versions/3.0.0/lib/ruby/gems/3.0.0/gems/bootsnap-1.7.2/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:31:in `require'
bin/rails:4:in `<main>'

created time in 4 days

issue closedcypriss/mutations

I can't pass a Hash to the mutation

I pass a hash to the mutation this way :

DoSomething(var: my_hash)

In my DoSomething Class i have the following :

optional do
  hash :var
end

When i try to work with var i get an empty hash ps : my hash have a hash as a value

my gem version is the following: gem 'mutations', '~> 0.8.2'

closed time in 4 days

Ahmunna

PR opened scoutapp/scout_apm_ruby

Set up desc on new layers before starting the layer

Set up desc on new layers before starting the layer rather than setting it on the current layer after start_layer.

To fix : https://github.com/scoutapp/scout_apm_ruby/issues/391

This means that if the current layer isn't the one we just tried to start then the desc isn't set on a layer we weren't expecting.

I haven't managed to reproduce this in a test (it's not clear to me the best way to test layering integration of different instrumentation).

Reproducing in a separate application was achieved by an active record callback calling Typhoeus (through elasticsearch) and then further active record operations taking place.

+8 -6

0 comment

1 changed file

pr created time in 5 days

issue openediron-io/ironcli

Go module support

This tool is installable via brew. in order to maintain go 1.17 support please release a new version with go modules.

Homebrew/homebrew-core#47627

created time in 5 days

issue commentscoutapp/scout_apm_ruby

Active record instrumentation not expecting current_layer.desc to be a string

@wilg I downgraded the scout_apm gem to 4.0.1 (before the library added Typhoeus instrumentation, which seems to be creating this issue) and it's working well. You can temporarily use that version as a workaround.

shadwell

comment created time in 7 days

issue commentscoutapp/scout_apm_ruby

Active record instrumentation not expecting current_layer.desc to be a string

@cschneid Any idea what this might be? It's preventing me from using Scout.

shadwell

comment created time in 7 days

issue commentscoutapp/scout_apm_ruby

Add ability to whitelist auto instruments for non-controller classes

i second this, i have pretty same issue as @J-Swift do, and would be happy to get concerns(and other non-controller classes) instrumented.

J-Swift

comment created time in 7 days

issue closedscoutapp/roadmap

Bitbucket Integration

It would be nice to have Bitbucket Integration the same way Scout integrates with Github.

closed time in 8 days

alispat

issue commentscoutapp/scout_apm_ruby

Active record instrumentation not expecting current_layer.desc to be a string

I'm also receiving this error when an exception is captured in our app's error tracker (Sentry). I thought it was similar to what was occurring in #378 but that has already been fixed.

shadwell

comment created time in 9 days

issue openedscoutapp/scout_apm_ruby

Active record instrumentation not expecting current_layer.desc to be a string

I'm getting an error in instruments/active_record#log where current_layer.desc is a String.

NoMethodError: undefined method `merge' for "xxx":String
    scout_apm (4.0.4) lib/scout_apm/instruments/active_record.rb:255:in `log'
    activerecord (6.1.1) lib/active_record/connection_adapters/abstract_mysql_adapter.rb:204:in `execute'
    activerecord (6.1.1) lib/active_record/connection_adapters/mysql/database_statements.rb:50:in `execute'

It looks like it might be the Typhoeus instrumentation setting the desc to be the URL it's dealing with and then the active_record instrumentation expecting current_layer.desc to be an SqlList.

What I'm doing is calling Typhoeus in a callback in the active record model (in order to index a saved record to elasticsearch).

created time in 11 days

issue openedscoutapp/scout_apm_ruby

Setting SCOUT_IGNORE to an array with an empty string will ignore all endpoints

Most likely not the intended outcome

created time in 14 days

issue openedscoutapp/scout_apm_ruby

[ScoutApm::Logger] uninitialized constant ScoutApm::Logger::KlassHelper

TL;DR: Setting the log_class option in the scout_apm.yml config file will raise an uninitialized constant error.

# current implementation

# lib/scout_apm/logger.rb#logger_class
def logger_class
  klass = @opts.fetch(:logger_class, ::Logger)
  case klass
  when String
    result = KlassHelper.lookup(klass) # => uninitialized constant ScoutApm::Logger::KlassHelper
    ...

# fix

# lib/scout_apm/logger.rb#logger_class
def logger_class
  klass = @opts.fetch(:logger_class, ::Logger)
  case klass
  when String
    result = Utils::KlassHelper.lookup(klass)
    ...


Syslog: I'm currently changing the logging of our rails application from a logfile-based approach to syslog. In addition to the rails logs, I want to log the Scout logs to syslog as well.

Therefore I changed the scout_apm.yml config:

production:
  log_class: 'Syslog::Logger'
  log_file_path: 'rails' # syslog tag name
  log_stdout: true
  log_stderr: true

After patching lib/scout_apm/logger.rb#logger_class this configuration works.


Implementation: The following snippets show how Scout is putting the pieces together. The logger_class method returns Syslog::Logger and I'm using the log_destination variable to set the syslog tag name.

# lib/scout_apm/logger.rb#build_logger
  def build_logger
    logger_class.new(@log_destination)
  end

To use the TaggedFormatter I'm enabling log_stdout, which is kind of a hacky solution.

# lib/scout_apm/logger.rb#build_formatter
def build_formatter
  if stdout? || stderr?
    TaggedFormatter.new
  else
    DefaultFormatter.new
  end
end

Anyway, I'll create a PR to fix this issue.

created time in 14 days

issue openedscoutapp/scout_apm_python

Test on Python 3.10

This is in its 5th alpha at current. We should test against it to ensure we're compatible.

created time in 15 days

issue openedscoutapp/scout_apm_python

Test on Django 3.2

This is in alpha: https://www.djangoproject.com/weblog/2021/jan/19/django-32-alpha-1-released/

We should test against it to detect incompatibilities early.

created time in 15 days

issue commentscoutapp/scout_apm_python

APM coverage requested for Python app using GRPC protocol to talk to nodeJS

Thanks Adam, yes to grpcio. it will require some code changes in our app but we will look into custom instrumentations

nobleShajeed

comment created time in 15 days

created tagscoutapp/scout_apm_ruby

tagv4.0.4

ScoutAPM Ruby Agent. Supports Rails, Sinatra, Grape, Rack, and many other frameworks

created time in 16 days

push eventscoutapp/scout_apm_ruby

Chris Schneider

commit sha 80a9b15e268cb544476ffe156afc26244c901aa9

VERSION and CHANGELOG for 4.0.4

view details

push time in 16 days

push eventscoutapp/scout_apm_ruby

Chris Schneider

commit sha fa83793b9e8d2f9a32c920f59b57d7f198f466b8

Add Faktory support (#385)

view details

push time in 16 days

PR merged scoutapp/scout_apm_ruby

Add Faktory support
+105 -0

0 comment

3 changed files

cschneid

pr closed time in 16 days

delete branch scoutapp/scout_apm_python

delete branch : pre_commit_ci

delete time in 17 days