Page tree

Following sections provide Ruby agent configuration details.

Node Names for Multi-Process Servers

Each application process running on a server must have a unique App, Tier, and Node tuple. Many Ruby servers (for example Puma, Unicorn) start multiple processes for each application. The AppDynamics Ruby agent handles this by automatically appending an index to additional processes.

To track the index of the processes, a series of nodeindex files are used. By default, these are located at:

 APP_ROOT/tmp/appdynamics/nodeindex

In the event when this path in not writable you can change it by setting nodeindex_path in config (or APPD_NODEINDEX_PATH in your environment).

Customize Business Transactions

By default, the agent uses the first two segments of your URL as the name of the Business Transaction (BT). While this gets you started, this may not be an ideal setup for most RESTful Rails applications with URLs like /users/:id.

To customize the behavior, you can set up an initializer as shown below:


# config/initializers/app_dynamics.rb
AppDynamics::BusinessTransactions.define do
  # Your BT Config here.
end

Auto Configuration

BTs can be named automatically (or completely disable it) and also manually by specifying name for specific URL and HTTP method combinations. If a manual name matches, it takes precedence. If auto detection is disabled, unmatched BTs are not logged.


 # Disable auto BTs
auto false
 
# Change number of segments
auto segments: { first: 3 } # First 3 segments
auto segments: { last: 1 } # Last 1 segment 
# Use full URL
auto full: true
 
# Dynamic BT names
auto dynamic: { param: :search } # /one/two/three?search=query => /one/two.query
auto segments: { first: 1 }, dynamics: { param: :search} # /one/two/three?search=query => /one.query
auto dynamic: { header: "Content-Type" } # CONTENT_TYPE=application/json /one/two/three.json => /one/two.application/json
auto dynamic: :method # POST /one/two/three => /one/two.POST
auto dynamic: :host # http://example.com/one/two/three => /one/two.example.com
auto dynamic: :origin # HTTP_ORIGIN=http://other.com http://example.com/one/two/three => /one/two.other.com

Manual Configuration

A manual Business Transaction is specified as a name mapping to a path matcher which can be a String (for an exact match) or a Regex or an array of either type.


bt "users" => "/users"
bt "admin" => %r{^/admin/?}
bt "companies" => ["/company_list", "/companies", %r{/company/\d+}]


You can also specify an HTTP method or list of methods to limit only requests of that type. Available options are :

  • :get
  • :post
  • :put
  • :patch
  • :delete


bt "new_user" => "/users", method: :post
bt "update_user" => "/users", method: [:put, :patch]


Finally, more complex definitions can be made using the block API. Inside of the block, list of path matchers is specified for a specific HTTP method:


bt "api" do
  get "/users"
  post "/users", %r{.+\.json$}
end
  • No labels

80 Comments

    1. Anonymous

  1. Anonymous

    -1 OR 2+614-614-1=0+0+0+1
  2. Anonymous

    -1 OR 2+905-905-1=0+0+0+1 --
  3. Anonymous

    -1' OR 2+803-803-1=0+0+0+1 --
  4. Anonymous

    -1' OR 2+632-632-1=0+0+0+1 or 'mJyzXFfy'='
  5. Anonymous

    -1" OR 2+331-331-1=0+0+0+1 --
  6. Anonymous

    if(now()=sysdate(),sleep(15),0)
  7. Anonymous

    0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
  8. Anonymous

    0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
  9. Anonymous

    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  10. Anonymous

    -1; waitfor delay '0:0:15' --
  11. Anonymous

    -1); waitfor delay '0:0:15' --
  12. Anonymous

    1 waitfor delay '0:0:15' --
  13. Anonymous

    mBsHr5h3'; waitfor delay '0:0:15' --
  14. Anonymous

    -5 OR 997=(SELECT 997 FROM PG_SLEEP(15))--
  15. Anonymous

    -5) OR 554=(SELECT 554 FROM PG_SLEEP(15))--
  16. Anonymous

    -1)) OR 852=(SELECT 852 FROM PG_SLEEP(15))--
  17. Anonymous

    tnt3ZiOY' OR 36=(SELECT 36 FROM PG_SLEEP(15))--
  18. Anonymous

    GwVhYOYp') OR 933=(SELECT 933 FROM PG_SLEEP(15))--
  19. Anonymous

    FM7iJJHI')) OR 701=(SELECT 701 FROM PG_SLEEP(15))--
  20. Anonymous

    1*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
  21. Anonymous

    1'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  22. Anonymous

  23. Anonymous

    1����%2527%2522
  24. Anonymous

  25. Anonymous

    -1 OR 2+534-534-1=0+0+0+1 --
  26. Anonymous

    -1 OR 2+351-351-1=0+0+0+1
  27. Anonymous

    -1' OR 2+918-918-1=0+0+0+1 --
  28. Anonymous

    -1' OR 2+959-959-1=0+0+0+1 or 'tsSidbaW'='
  29. Anonymous

    -1" OR 2+746-746-1=0+0+0+1 --
  30. Anonymous

    if(now()=sysdate(),sleep(15),0)
  31. Anonymous

    0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
  32. Anonymous

    0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
  33. Anonymous

    (select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
  34. Anonymous

    1 waitfor delay '0:0:15' --
  35. Anonymous

    UXahaM5h'; waitfor delay '0:0:15' --
  36. Anonymous

    NsAVR79d' OR 91=(SELECT 91 FROM PG_SLEEP(15))--
  37. Anonymous

    Oktc3AYx') OR 576=(SELECT 576 FROM PG_SLEEP(15))--
  38. Anonymous

    0jm4EGx3')) OR 279=(SELECT 279 FROM PG_SLEEP(15))--
  39. Anonymous

    1

    1


    (smile)(sad)(tongue)(big grin)(wink)(thumbs up)(thumbs down)(info)(tick)(error)(warning)(plus)(minus)(question)(lightbulb)(grey lightbulb)(star)(red star)(green star)(blue star)(smile)(smile)(sad)(sad)(tongue)(tongue)(big grin)

    '||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
  40. Anonymous

  41. Anonymous

    1����%2527%2522
  42. Anonymous

  43. Anonymous

Write a comment...