appoptics_apm 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +43 -0
  3. data/.dockerignore +5 -0
  4. data/.gitignore +23 -0
  5. data/.rubocop.yml +5 -0
  6. data/.travis.yml +82 -0
  7. data/CHANGELOG.md +769 -0
  8. data/CONFIG.md +33 -0
  9. data/Dockerfile +41 -0
  10. data/Dockerfile_test +66 -0
  11. data/Gemfile +41 -0
  12. data/LICENSE +193 -0
  13. data/README.md +351 -0
  14. data/Rakefile +202 -0
  15. data/Vagrantfile +67 -0
  16. data/appoptics_apm.gemspec +55 -0
  17. data/build_gems.sh +15 -0
  18. data/docker-compose.yml +73 -0
  19. data/examples/DNT.md +35 -0
  20. data/examples/carrying_context.rb +220 -0
  21. data/examples/instrumenting_metal_controller.rb +8 -0
  22. data/examples/puma_on_heroku_config.rb +17 -0
  23. data/examples/tracing_async_threads.rb +124 -0
  24. data/examples/tracing_background_jobs.rb +53 -0
  25. data/examples/tracing_forked_processes.rb +99 -0
  26. data/examples/unicorn_on_heroku_config.rb +28 -0
  27. data/ext/oboe_metal/extconf.rb +54 -0
  28. data/ext/oboe_metal/lib/.keep +0 -0
  29. data/ext/oboe_metal/lib/liboboe-1.0.so.0.0.0 +0 -0
  30. data/ext/oboe_metal/noop/noop.c +7 -0
  31. data/ext/oboe_metal/src/VERSION +1 -0
  32. data/ext/oboe_metal/src/bson/bson.h +221 -0
  33. data/ext/oboe_metal/src/bson/platform_hacks.h +91 -0
  34. data/ext/oboe_metal/src/oboe.h +883 -0
  35. data/ext/oboe_metal/src/oboe.hpp +793 -0
  36. data/ext/oboe_metal/src/oboe_debug.h +50 -0
  37. data/ext/oboe_metal/src/oboe_wrap.cxx +6088 -0
  38. data/ext/oboe_metal/tests/test.rb +11 -0
  39. data/gemfiles/delayed_job.gemfile +36 -0
  40. data/gemfiles/frameworks.gemfile +44 -0
  41. data/gemfiles/instrumentation_mocked.gemfile +29 -0
  42. data/gemfiles/libraries.gemfile +85 -0
  43. data/gemfiles/rails23.gemfile +39 -0
  44. data/gemfiles/rails30.gemfile +42 -0
  45. data/gemfiles/rails31.gemfile +44 -0
  46. data/gemfiles/rails32.gemfile +54 -0
  47. data/gemfiles/rails40.gemfile +27 -0
  48. data/gemfiles/rails41.gemfile +27 -0
  49. data/gemfiles/rails42.gemfile +35 -0
  50. data/gemfiles/rails50.gemfile +44 -0
  51. data/gemfiles/rails51.gemfile +44 -0
  52. data/get_version.rb +5 -0
  53. data/init.rb +4 -0
  54. data/lib/appoptics_apm/api/layerinit.rb +39 -0
  55. data/lib/appoptics_apm/api/logging.rb +359 -0
  56. data/lib/appoptics_apm/api/memcache.rb +34 -0
  57. data/lib/appoptics_apm/api/profiling.rb +201 -0
  58. data/lib/appoptics_apm/api/tracing.rb +152 -0
  59. data/lib/appoptics_apm/api/util.rb +128 -0
  60. data/lib/appoptics_apm/api.rb +18 -0
  61. data/lib/appoptics_apm/base.rb +252 -0
  62. data/lib/appoptics_apm/config.rb +281 -0
  63. data/lib/appoptics_apm/frameworks/grape.rb +93 -0
  64. data/lib/appoptics_apm/frameworks/padrino/templates.rb +58 -0
  65. data/lib/appoptics_apm/frameworks/padrino.rb +52 -0
  66. data/lib/appoptics_apm/frameworks/rails/inst/action_controller.rb +106 -0
  67. data/lib/appoptics_apm/frameworks/rails/inst/action_controller2.rb +61 -0
  68. data/lib/appoptics_apm/frameworks/rails/inst/action_controller3.rb +58 -0
  69. data/lib/appoptics_apm/frameworks/rails/inst/action_controller4.rb +48 -0
  70. data/lib/appoptics_apm/frameworks/rails/inst/action_controller5.rb +50 -0
  71. data/lib/appoptics_apm/frameworks/rails/inst/action_controller_api.rb +50 -0
  72. data/lib/appoptics_apm/frameworks/rails/inst/action_view.rb +58 -0
  73. data/lib/appoptics_apm/frameworks/rails/inst/action_view_2x.rb +56 -0
  74. data/lib/appoptics_apm/frameworks/rails/inst/action_view_30.rb +50 -0
  75. data/lib/appoptics_apm/frameworks/rails/inst/active_record.rb +27 -0
  76. data/lib/appoptics_apm/frameworks/rails/inst/connection_adapters/mysql.rb +43 -0
  77. data/lib/appoptics_apm/frameworks/rails/inst/connection_adapters/mysql2.rb +28 -0
  78. data/lib/appoptics_apm/frameworks/rails/inst/connection_adapters/postgresql.rb +30 -0
  79. data/lib/appoptics_apm/frameworks/rails/inst/connection_adapters/utils.rb +120 -0
  80. data/lib/appoptics_apm/frameworks/rails/inst/connection_adapters/utils5x.rb +101 -0
  81. data/lib/appoptics_apm/frameworks/rails.rb +116 -0
  82. data/lib/appoptics_apm/frameworks/sinatra/templates.rb +56 -0
  83. data/lib/appoptics_apm/frameworks/sinatra.rb +71 -0
  84. data/lib/appoptics_apm/inst/bunny-client.rb +148 -0
  85. data/lib/appoptics_apm/inst/bunny-consumer.rb +92 -0
  86. data/lib/appoptics_apm/inst/curb.rb +329 -0
  87. data/lib/appoptics_apm/inst/dalli.rb +85 -0
  88. data/lib/appoptics_apm/inst/delayed_job.rb +92 -0
  89. data/lib/appoptics_apm/inst/em-http-request.rb +105 -0
  90. data/lib/appoptics_apm/inst/excon.rb +130 -0
  91. data/lib/appoptics_apm/inst/faraday.rb +77 -0
  92. data/lib/appoptics_apm/inst/http.rb +83 -0
  93. data/lib/appoptics_apm/inst/httpclient.rb +176 -0
  94. data/lib/appoptics_apm/inst/memcache.rb +102 -0
  95. data/lib/appoptics_apm/inst/memcached.rb +94 -0
  96. data/lib/appoptics_apm/inst/mongo.rb +242 -0
  97. data/lib/appoptics_apm/inst/mongo2.rb +225 -0
  98. data/lib/appoptics_apm/inst/moped.rb +466 -0
  99. data/lib/appoptics_apm/inst/rack.rb +146 -0
  100. data/lib/appoptics_apm/inst/redis.rb +275 -0
  101. data/lib/appoptics_apm/inst/resque.rb +151 -0
  102. data/lib/appoptics_apm/inst/rest-client.rb +50 -0
  103. data/lib/appoptics_apm/inst/sequel.rb +178 -0
  104. data/lib/appoptics_apm/inst/sidekiq-client.rb +53 -0
  105. data/lib/appoptics_apm/inst/sidekiq-worker.rb +67 -0
  106. data/lib/appoptics_apm/inst/twitter-cassandra.rb +294 -0
  107. data/lib/appoptics_apm/inst/typhoeus.rb +113 -0
  108. data/lib/appoptics_apm/instrumentation.rb +22 -0
  109. data/lib/appoptics_apm/legacy_method_profiling.rb +97 -0
  110. data/lib/appoptics_apm/loading.rb +66 -0
  111. data/lib/appoptics_apm/logger.rb +41 -0
  112. data/lib/appoptics_apm/method_profiling.rb +33 -0
  113. data/lib/appoptics_apm/ruby.rb +35 -0
  114. data/lib/appoptics_apm/support.rb +135 -0
  115. data/lib/appoptics_apm/test.rb +94 -0
  116. data/lib/appoptics_apm/thread_local.rb +26 -0
  117. data/lib/appoptics_apm/util.rb +312 -0
  118. data/lib/appoptics_apm/version.rb +15 -0
  119. data/lib/appoptics_apm/xtrace.rb +103 -0
  120. data/lib/appoptics_apm.rb +72 -0
  121. data/lib/joboe_metal.rb +214 -0
  122. data/lib/oboe/README +2 -0
  123. data/lib/oboe/backward_compatibility.rb +80 -0
  124. data/lib/oboe/inst/rack.rb +11 -0
  125. data/lib/oboe.rb +7 -0
  126. data/lib/oboe_metal.rb +187 -0
  127. data/lib/rails/generators/appoptics_apm/install_generator.rb +45 -0
  128. data/lib/rails/generators/appoptics_apm/templates/appoptics_apm_initializer.rb +222 -0
  129. data/ruby_setup.sh +47 -0
  130. data/run_docker_build_gem_upload_to_packagecloud.sh +20 -0
  131. data/run_tests_docker.rb +32 -0
  132. data/test/benchmark/README.md +65 -0
  133. data/test/benchmark/logging_bench.rb +54 -0
  134. data/test/benchmark/with_libraries_gemfile/bunny_bench.rb +69 -0
  135. data/test/benchmark/with_rails5x_gemfile/action_controller5x_bench.rb +43 -0
  136. data/test/frameworks/apps/grape_nested.rb +33 -0
  137. data/test/frameworks/apps/grape_simple.rb +80 -0
  138. data/test/frameworks/apps/padrino_simple.rb +80 -0
  139. data/test/frameworks/apps/sinatra_simple.rb +55 -0
  140. data/test/frameworks/grape_test.rb +286 -0
  141. data/test/frameworks/padrino_test.rb +222 -0
  142. data/test/frameworks/rails3x_test.rb +554 -0
  143. data/test/frameworks/rails4x_test.rb +570 -0
  144. data/test/frameworks/rails5x_api_test.rb +210 -0
  145. data/test/frameworks/rails5x_test.rb +376 -0
  146. data/test/frameworks/rails_shared_tests.rb +172 -0
  147. data/test/frameworks/sinatra_test.rb +140 -0
  148. data/test/instrumentation/bunny_client_test.rb +276 -0
  149. data/test/instrumentation/bunny_consumer_test.rb +204 -0
  150. data/test/instrumentation/curb_test.rb +398 -0
  151. data/test/instrumentation/dalli_test.rb +177 -0
  152. data/test/instrumentation/em_http_request_test.rb +89 -0
  153. data/test/instrumentation/excon_test.rb +231 -0
  154. data/test/instrumentation/faraday_test.rb +228 -0
  155. data/test/instrumentation/http_test.rb +143 -0
  156. data/test/instrumentation/httpclient_test.rb +320 -0
  157. data/test/instrumentation/memcache_test.rb +260 -0
  158. data/test/instrumentation/memcached_test.rb +229 -0
  159. data/test/instrumentation/mongo_v1_test.rb +479 -0
  160. data/test/instrumentation/mongo_v2_index_test.rb +124 -0
  161. data/test/instrumentation/mongo_v2_test.rb +584 -0
  162. data/test/instrumentation/mongo_v2_view_test.rb +435 -0
  163. data/test/instrumentation/moped_test.rb +517 -0
  164. data/test/instrumentation/rack_test.rb +165 -0
  165. data/test/instrumentation/redis_hashes_test.rb +268 -0
  166. data/test/instrumentation/redis_keys_test.rb +321 -0
  167. data/test/instrumentation/redis_lists_test.rb +310 -0
  168. data/test/instrumentation/redis_misc_test.rb +163 -0
  169. data/test/instrumentation/redis_sets_test.rb +296 -0
  170. data/test/instrumentation/redis_sortedsets_test.rb +328 -0
  171. data/test/instrumentation/redis_strings_test.rb +349 -0
  172. data/test/instrumentation/resque_test.rb +185 -0
  173. data/test/instrumentation/rest-client_test.rb +288 -0
  174. data/test/instrumentation/sequel_mysql2_test.rb +353 -0
  175. data/test/instrumentation/sequel_mysql_test.rb +334 -0
  176. data/test/instrumentation/sequel_pg_test.rb +336 -0
  177. data/test/instrumentation/sidekiq-client_test.rb +159 -0
  178. data/test/instrumentation/sidekiq-worker_test.rb +180 -0
  179. data/test/instrumentation/twitter-cassandra_test.rb +424 -0
  180. data/test/instrumentation/typhoeus_test.rb +284 -0
  181. data/test/jobs/delayed_job/db_worker_job.rb +29 -0
  182. data/test/jobs/delayed_job/error_worker_job.rb +10 -0
  183. data/test/jobs/delayed_job/remote_call_worker_job.rb +20 -0
  184. data/test/jobs/resque/db_worker_job.rb +29 -0
  185. data/test/jobs/resque/error_worker_job.rb +10 -0
  186. data/test/jobs/resque/remote_call_worker_job.rb +20 -0
  187. data/test/jobs/sidekiq/db_worker_job.rb +29 -0
  188. data/test/jobs/sidekiq/error_worker_job.rb +10 -0
  189. data/test/jobs/sidekiq/remote_call_worker_job.rb +20 -0
  190. data/test/minitest_helper.rb +276 -0
  191. data/test/mocked/curb_mocked_test.rb +311 -0
  192. data/test/mocked/excon_mocked_test.rb +166 -0
  193. data/test/mocked/faraday_mocked_test.rb +93 -0
  194. data/test/mocked/http_mocked_test.rb +129 -0
  195. data/test/mocked/httpclient_mocked_test.rb +245 -0
  196. data/test/mocked/rest_client_mocked_test.rb +103 -0
  197. data/test/mocked/typhoeus_mocked_test.rb +192 -0
  198. data/test/models/widget.rb +36 -0
  199. data/test/profiling/legacy_method_profiling_test.rb +201 -0
  200. data/test/profiling/method_profiling_test.rb +631 -0
  201. data/test/queues/delayed_job-client_test.rb +95 -0
  202. data/test/queues/delayed_job-worker_test.rb +91 -0
  203. data/test/reporter/reporter_test.rb +14 -0
  204. data/test/servers/delayed_job.rb +107 -0
  205. data/test/servers/rackapp_8101.rb +29 -0
  206. data/test/servers/rails3x_8140.rb +96 -0
  207. data/test/servers/rails4x_8140.rb +96 -0
  208. data/test/servers/rails5x_8140.rb +95 -0
  209. data/test/servers/rails5x_api_8150.rb +78 -0
  210. data/test/servers/sidekiq.rb +29 -0
  211. data/test/servers/sidekiq.yml +7 -0
  212. data/test/servers/sidekiq_initializer.rb +25 -0
  213. data/test/settings +0 -0
  214. data/test/support/auto_tracing_test.rb +50 -0
  215. data/test/support/backcompat_test.rb +276 -0
  216. data/test/support/config_test.rb +149 -0
  217. data/test/support/dnt_test.rb +98 -0
  218. data/test/support/init_report_test.rb +25 -0
  219. data/test/support/liboboe_settings_test.rb +110 -0
  220. data/test/support/logging_test.rb +130 -0
  221. data/test/support/noop_test.rb +88 -0
  222. data/test/support/sql_sanitize_test.rb +55 -0
  223. data/test/support/tracing_mode_test.rb +33 -0
  224. data/test/support/tvalias_test.rb +15 -0
  225. data/test/support/xtrace_test.rb +41 -0
  226. metadata +475 -0
data/CONFIG.md ADDED
@@ -0,0 +1,33 @@
1
+ # AppOpticsAPM Gem Configuration
2
+
3
+ ## Environment Variables
4
+
5
+ The following environment variables are detected by the appoptics_apm gem and affect how the gem functions.
6
+
7
+ ### General
8
+
9
+ Name | Description | Default
10
+ ---- | ----------- | -------
11
+ `APPOPTICS_SERVICE_KEY` | API token + service name combination, mandatory for metrics and traces to show in my.appoptics.com |
12
+ `IGNORE_APPOPTICS_WARNING` | tells the appoptics_apm gem to __not__ output the _missing AppOpticsAPM libraries_ message on stack initialization | `false`
13
+ `APPOPTICS_GEM_VERBOSE` | sets the verbose flag (`AppOpticsAPM::Config[:verbose]`) early in the gem loading process which may output valuable information | `false`
14
+ `APPOPTICS_CUUID` | Allows specifying the customer ID via environment variable to override/bypass the value in `/etc/tracelytics.conf` | `nil`
15
+
16
+ # Related to Tests
17
+
18
+ Name | Description | Default
19
+ ---- | ----------- | -------
20
+ `APPOPTICS_GEM_TEST` | puts the gem in test mode. Traces are written to /tmp/trace_output.bson. | `false`
21
+ `DBTYPE` | For tests on Ruby on Rails, specifies the database type to test against. `postgres`, `mysql` and `mysql2` are valid options. | `postgres`
22
+ `APPOPTICS_CASSANDRA_SERVER` | specifies the Cassandra server to test against. | `127.0.0.1:9160`
23
+ `APPOPTICS_MONGO_SERVER` | specifies the Mongo server to test against. | `127.0.0.1:27017`
24
+ `APPOPTICS_RABBITMQ_SERVER` | specifies the RabbitMQ server to test against. | `127.0.0.1`
25
+ `APPOPTICS_RABBITMQ_PORT` | port for the RabbitMQ connection. | `5672`
26
+ `APPOPTICS_RABBITMQ_USERNAME` | username for the RabbitMQ connection | `guest`
27
+ `APPOPTICS_RABBITMQ_PASSWORD` | password for the RabbitMQ connection | `guest`
28
+
29
+ ## AppOpticsAPM::Config
30
+
31
+ `AppOpticsAPM::Config` is a nested hash used by the appoptics_apm gem to store preferences and switches.
32
+
33
+ See [this Rails generator template file](https://github.com/librato/ruby-appoptics/blob/master/lib/rails/generators/appoptics_apm/templates/appoptics_initializer.rb) for documentation on all of the supported values.
data/Dockerfile ADDED
@@ -0,0 +1,41 @@
1
+ FROM ubuntu:16.04
2
+
3
+ # Use this Dockerfile to create the gem
4
+ # > docker build -f Dockerfile -t buildgem .
5
+ # > docker run --rm -v `pwd`:/code/ruby-appoptics buildgem bash -l -c 'cd /code/ruby-appoptics && ./build_gems.sh'
6
+
7
+ # install OS packages
8
+ RUN apt-get update \
9
+ && apt-get install -y --no-install-recommends \
10
+ build-essential \
11
+ curl \
12
+ git-core \
13
+ libpcre3-dev \
14
+ libreadline-dev \
15
+ libssl-dev \
16
+ openjdk-8-jdk \
17
+ zlib1g-dev \
18
+ less \
19
+ && rm -rf /var/lib/apt/lists/*
20
+
21
+ # rbenv setup
22
+ # use rbenv-default-gems to automatically install bundler for each ruby version
23
+ RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv \
24
+ && git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build \
25
+ && git clone https://github.com/rbenv/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems \
26
+ && echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile \
27
+ && echo 'eval "$(rbenv init -)"' >> ~/.profile \
28
+ && echo 'bundler' > ~/.rbenv/default-gems
29
+
30
+ # install rubies to build our gem against
31
+ RUN . ~/.profile \
32
+ && rbenv install 2.3.1
33
+ # && rbenv install jruby-9.0.5.0
34
+
35
+ # install swig 3.0.8
36
+ RUN curl -SL http://kent.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz \
37
+ | tar xzC /tmp \
38
+ && cd /tmp/swig-3.0.8 \
39
+ && ./configure && make && make install \
40
+ && cd \
41
+ && rm -rf /tmp/swig-3.0.8
data/Dockerfile_test ADDED
@@ -0,0 +1,66 @@
1
+ FROM ubuntu:16.04
2
+
3
+ # install OS packages
4
+ RUN apt-get update \
5
+ && apt-get install -y --no-install-recommends \
6
+ build-essential \
7
+ apt-utils \
8
+ curl \
9
+ git-core \
10
+ libpcre3-dev \
11
+ libreadline-dev \
12
+ libssl-dev \
13
+ openjdk-8-jdk \
14
+ zlib1g-dev \
15
+ libcurl4-gnutls-dev \
16
+ libmysqlclient-dev \
17
+ libpq-dev \
18
+ vim \
19
+ less \
20
+ tree \
21
+ psmisc \
22
+ && rm -rf /var/lib/apt/lists/*
23
+
24
+ # rbenv setup
25
+ # use rbenv-default-gems to automatically install bundler for each ruby version
26
+ RUN git clone https://github.com/rbenv/rbenv.git ~/.rbenv \
27
+ && git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build \
28
+ && git clone https://github.com/rbenv/rbenv-default-gems.git ~/.rbenv/plugins/rbenv-default-gems \
29
+ && echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.profile \
30
+ && echo 'eval "$(rbenv init -)"' >> ~/.profile \
31
+ && echo 'bundler' > ~/.rbenv/default-gems
32
+
33
+ # install rubies to build our gem against
34
+ RUN . ~/.profile \
35
+ && rbenv install 1.9.3-p551 \
36
+ && rbenv install 2.3.1 \
37
+ && rbenv install 2.4.1
38
+ # && rbenv install jruby-9.0.5.0
39
+
40
+ # install swig 3.0.8
41
+ RUN curl -SL http://kent.dl.sourceforge.net/project/swig/swig/swig-3.0.8/swig-3.0.8.tar.gz \
42
+ | tar xzC /tmp \
43
+ && cd /tmp/swig-3.0.8 \
44
+ && ./configure && make && make install \
45
+ && cd \
46
+ && rm -rf /tmp/swig-3.0.8
47
+
48
+ # install postgres, redis, and memcached
49
+ RUN apt-get update \
50
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
51
+ redis-server \
52
+ memcached \
53
+ postgresql \
54
+ postgresql-contrib \
55
+ && service postgresql start \
56
+ && echo "psql --command \"CREATE USER docker WITH SUPERUSER PASSWORD 'docker';\"" >> /tmp/config \
57
+ && echo "createdb -O docker travis_ci_test" >> /tmp/config \
58
+ && su postgres -c "bash /tmp/config" \
59
+ && rm -f /tmp/config
60
+
61
+ RUN apt-get update && \
62
+ apt-get -y install mysql-client libmysqlclient-dev
63
+
64
+ ENV PATH="/root/.rbenv/bin:/root/.rbenv/shims:$PATH"
65
+ ENV RUBY_ENV=test
66
+ ENV DOCKER_PSQL_PASS=docker
data/Gemfile ADDED
@@ -0,0 +1,41 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :development, :test do
4
+ gem 'rake'
5
+ gem 'minitest'
6
+ gem 'minitest-reporters', '< 1.0.18'
7
+ gem 'minitest-debugger', :require => false
8
+ gem 'rack-test'
9
+ gem 'puma'
10
+ if RUBY_VERSION < '1.9.3'
11
+ gem 'bson', '<= 1.12.3'
12
+ else
13
+ gem 'bson'
14
+ end
15
+ gem 'webmock' if RUBY_VERSION >= '2.0.0'
16
+ gem 'mocha'
17
+ gem 'rubocop', require: false
18
+ gem 'ruby-prof'
19
+ gem 'benchmark-ips'
20
+ end
21
+
22
+ group :development do
23
+ gem 'ruby-debug', :platforms => [:mri_18, :jruby]
24
+ gem 'debugger', :platform => :mri_19
25
+ gem 'byebug', :platforms => [:mri_20, :mri_21, :mri_22, :mri_23, :mri_24]
26
+ # gem 'perftools.rb', :platforms => [ :mri_20, :mri_21 ], :require => 'perftools'
27
+ if RUBY_VERSION >= '2.0.0'
28
+ gem 'pry'
29
+ gem 'pry-byebug', :platforms => [:mri_20, :mri_21, :mri_22, :mri_23, :mri_24]
30
+ else
31
+ gem 'pry', '~> 0.10.0'
32
+ end
33
+ end
34
+
35
+ if defined?(JRUBY_VERSION)
36
+ gem 'sinatra', :require => false
37
+ else
38
+ gem 'sinatra'
39
+ end
40
+
41
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,193 @@
1
+ Librato Open License
2
+ Version 1.0, October, 2016
3
+
4
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
5
+
6
+ 1. Definitions.
7
+
8
+ "License" shall mean the terms and conditions for use, reproduction, and
9
+ distribution as defined by Sections 1 through 11 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright
12
+ owner that is granting the License. Licensor can include Librato as an
13
+ original contributor to the Work as defined below.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities
16
+ that control, are controlled by, or are under common control with that entity.
17
+ For the purposes of this definition, "control" means (i) the power, direct or
18
+ indirect, to cause the direction or management of such entity, whether by
19
+ contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
20
+ outstanding shares, or (iii) beneficial ownership of such entity.
21
+
22
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
23
+ permissions granted by this License.
24
+
25
+ "Source" form shall mean the preferred form for making modifications, including
26
+ but not limited to software source code, documentation source, and
27
+ configuration files.
28
+
29
+ "Object" form shall mean any form resulting from mechanical transformation or
30
+ translation of a Source form, including but not limited to compiled object
31
+ code, generated documentation, and conversions to other media types.
32
+
33
+ "Work" shall mean the work of authorship, whether in Source or Object form,
34
+ made available under the License, as indicated by a copyright notice that is
35
+ included in or attached to the work.
36
+
37
+ "Derivative Works" shall mean any work, whether in Source or Object form, that
38
+ is based on (or derived from) the Work and for which the editorial revisions,
39
+ annotations, elaborations, or other modifications represent, as a whole, an
40
+ original work of authorship. For the purposes of this License, Derivative Works
41
+ shall not include works that remain separable from, or merely link (or bind by
42
+ name) to the interfaces of, the Work and Derivative Works thereof.
43
+
44
+ "Contribution" shall mean any work of authorship, including the original
45
+ version of the Work and any modifications or additions to that Work or
46
+ Derivative Works thereof, that is intentionally submitted to Licensor for
47
+ inclusion in the Work by the copyright owner or by an individual or Legal
48
+ Entity authorized to submit on behalf of the copyright owner. For the purposes
49
+ of this definition, "submitted" means any form of electronic, verbal, or
50
+ written communication sent to the Licensor or its representatives, including
51
+ but not limited to communication on electronic mailing lists, source code
52
+ control systems, and issue tracking systems that are managed by, or on behalf
53
+ of, the Licensor for the purpose of discussing and improving the Work, but
54
+ excluding communication that is conspicuously marked or otherwise designated in
55
+ writing by the copyright owner as "Not a Contribution."
56
+
57
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf
58
+ of whom a Contribution has been received by Licensor and subsequently
59
+ incorporated within the Work.
60
+
61
+ 2. Grant of Copyright License.
62
+
63
+ Subject to the terms and conditions of this License, each Contributor hereby
64
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
65
+ irrevocable copyright license to reproduce, prepare Derivative Works of,
66
+ publicly display, publicly perform, sublicense, and distribute the Work and
67
+ such Derivative Works in Source or Object form.
68
+
69
+ 3. Grant of Patent License.
70
+
71
+ Subject to the terms and conditions of this License, each Contributor hereby
72
+ grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
73
+ irrevocable (except as stated in this section) patent license to make, have
74
+ made, use, offer to sell, sell, import, and otherwise transfer the Work, where
75
+ such license applies only to those patent claims licensable by such Contributor
76
+ that are necessarily infringed by their Contribution(s) alone or by combination
77
+ of their Contribution(s) with the Work to which such Contribution(s) was
78
+ submitted. If You institute patent litigation against any entity (including a
79
+ cross-claim or counterclaim in a lawsuit) alleging that the Work or a
80
+ Contribution incorporated within the Work constitutes direct or contributory
81
+ patent infringement, then any patent licenses granted to You under this License
82
+ for that Work shall terminate as of the date such litigation is filed.
83
+
84
+ Each time You convey a covered Work, the recipient automatically receives a
85
+ license from the original Licensor(s), to run, modify and propagate that work,
86
+ subject to this License. You are not responsible for enforcing compliance by
87
+ third parties with this License.
88
+
89
+ You may not impose any further restrictions on the exercise of the rights
90
+ granted or affirmed under this License. For example, you may not impose a
91
+ license fee, royalty, or other charge for exercise of rights granted under this
92
+ License, and you may not initiate litigation (including a cross-claim or
93
+ counterclaim in a lawsuit) alleging that any patent claim is infringed by
94
+ making, using, selling, offering for sale, or importing the Work or any portion
95
+ of it.
96
+
97
+ 4. Redistribution.
98
+
99
+ You may reproduce and distribute copies of the Work or Derivative Works thereof
100
+ in any medium, with or without modifications, and in Source or Object form,
101
+ provided that You meet the following conditions:
102
+
103
+ 1. You must give any other recipients of the Work or Derivative Works a copy
104
+ of this License; and
105
+ 2. You must cause any modified files to carry prominent notices stating that
106
+ You changed the files; and
107
+ 3. You must retain, in the Source form of any Derivative Works that You
108
+ distribute, all copyright, patent, trademark, and attribution notices from the
109
+ Source form of the Work, excluding those notices that do not pertain to any
110
+ part of the Derivative Works; and
111
+ 4. If the Work includes a "NOTICE" text file as part of its distribution,
112
+ then any Derivative Works that You distribute must include a readable copy of
113
+ the attribution notices contained within such NOTICE file, excluding those
114
+ notices that do not pertain to any part of the Derivative Works, in at least
115
+ one of the following places: within a NOTICE text file distributed as part of
116
+ the Derivative Works; within the Source form or documentation, if provided
117
+ along with the Derivative Works; or, within a display generated by the
118
+ Derivative Works, if and wherever such third-party notices normally appear. The
119
+ contents of the NOTICE file are for informational purposes only and do not
120
+ modify the License. You may add Your own attribution notices within Derivative
121
+ Works that You distribute, alongside or as an addendum to the NOTICE text from
122
+ the Work, provided that such additional attribution notices cannot be construed
123
+ as modifying the License.
124
+
125
+ You may add Your own copyright statement to Your modifications and may provide
126
+ additional or different license terms and conditions for use, reproduction, or
127
+ distribution of Your modifications, or for any such Derivative Works as a
128
+ whole, provided Your use, reproduction, and distribution of the Work otherwise
129
+ complies with the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions.
132
+
133
+ Unless You explicitly state otherwise, any Contribution intentionally submitted
134
+ for inclusion in the Work by You to the Licensor shall be under the terms and
135
+ conditions of this License, without any additional terms or conditions.
136
+ Notwithstanding the above, nothing herein shall supersede or modify the terms
137
+ of any separate license agreement you may have executed with Licensor regarding
138
+ such Contributions.
139
+
140
+ 6. Trademarks.
141
+
142
+ This License does not grant permission to use the trade names, trademarks,
143
+ service marks, or product names of the Licensor, except as required for
144
+ reasonable and customary use in describing the origin of the Work and
145
+ reproducing the content of the NOTICE file.
146
+
147
+ 7. Disclaimer of Warranty.
148
+
149
+ Unless required by applicable law or agreed to in writing, Licensor provides
150
+ the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
151
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
152
+ including, without limitation, any warranties or conditions of TITLE,
153
+ NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
154
+ solely responsible for determining the appropriateness of using or
155
+ redistributing the Work and assume any risks associated with Your exercise of
156
+ permissions under this License.
157
+
158
+ 8. Limitation of Liability.
159
+
160
+ In no event and under no legal theory, whether in tort (including negligence),
161
+ contract, or otherwise, unless required by applicable law (such as deliberate
162
+ and grossly negligent acts) or agreed to in writing, shall any Contributor be
163
+ liable to You for damages, including any direct, indirect, special, incidental,
164
+ or consequential damages of any character arising as a result of this License
165
+ or out of the use or inability to use the Work (including but not limited to
166
+ damages for loss of goodwill, work stoppage, computer failure or malfunction,
167
+ or any and all other commercial damages or losses), even if such Contributor
168
+ has been advised of the possibility of such damages.
169
+
170
+ 9. Accepting Warranty or Additional Liability.
171
+
172
+ While redistributing the Work or Derivative Works thereof, You may choose to
173
+ offer, and charge a fee for, acceptance of support, warranty, indemnity, or
174
+ other liability obligations and/or rights consistent with this License.
175
+ However, in accepting such obligations, You may act only on Your own behalf and
176
+ on Your sole responsibility, not on behalf of any other Contributor, and only
177
+ if You agree to indemnify, defend, and hold each Contributor harmless for any
178
+ liability incurred by, or claims asserted against, such Contributor by reason
179
+ of your accepting any such warranty or additional liability.
180
+
181
+ 10. Noncompetition
182
+
183
+ You may install and execute the Work only in conjunction with the direct use of
184
+ Librato software. This Work, any file or any derivative thereof shall not be
185
+ used in conjunction with any product that competes with any Librato software.
186
+
187
+ 11. Termination
188
+
189
+ The License stated above is automatically terminated and revoked if you exceed
190
+ its scope or violate any of the terms of this License or any related License or
191
+ notice.
192
+
193
+ END OF TERMS AND CONDITIONS