ddtrace 0.44.0 → 0.48.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +183 -15
- data/.circleci/images/primary/Dockerfile-2.0.0 +11 -1
- data/.circleci/images/primary/Dockerfile-2.1.10 +11 -1
- data/.circleci/images/primary/Dockerfile-2.2.10 +11 -1
- data/.circleci/images/primary/Dockerfile-2.3.8 +10 -0
- data/.circleci/images/primary/Dockerfile-2.4.6 +10 -0
- data/.circleci/images/primary/Dockerfile-2.5.6 +10 -0
- data/.circleci/images/primary/Dockerfile-2.6.4 +10 -0
- data/.circleci/images/primary/Dockerfile-2.7.0 +10 -0
- data/.circleci/images/primary/Dockerfile-jruby-9.2-latest +88 -0
- data/.circleci/images/primary/{Dockerfile-jruby-9.2 → Dockerfile-jruby-9.2.0.0} +1 -5
- data/.circleci/images/primary/Dockerfile-truffleruby-21.0.0 +73 -0
- data/.github/workflows/create-next-milestone.yml +2 -2
- data/.gitlab-ci.yml +18 -18
- data/.rubocop.yml +269 -7
- data/.rubocop_todo.yml +438 -0
- data/.simplecov +6 -0
- data/Appraisals +87 -9
- data/CHANGELOG.md +238 -1
- data/Gemfile +63 -3
- data/LICENSE-3rdparty.csv +2 -0
- data/README.md +1 -0
- data/Rakefile +65 -25
- data/bin/ddtracerb +15 -0
- data/ddtrace.gemspec +9 -36
- data/docker-compose.yml +75 -7
- data/docs/DevelopmentGuide.md +28 -0
- data/docs/GettingStarted.md +162 -68
- data/docs/ProfilingDevelopment.md +88 -0
- data/integration/README.md +67 -0
- data/integration/apps/rack/.dockerignore +1 -0
- data/integration/apps/rack/.envrc.sample +1 -0
- data/integration/apps/rack/.gitignore +4 -0
- data/integration/apps/rack/.rspec +1 -0
- data/integration/apps/rack/Dockerfile +28 -0
- data/integration/apps/rack/Dockerfile-ci +11 -0
- data/integration/apps/rack/Gemfile +24 -0
- data/integration/apps/rack/README.md +93 -0
- data/integration/apps/rack/app/acme.rb +80 -0
- data/integration/apps/rack/app/datadog.rb +17 -0
- data/integration/apps/rack/bin/run +22 -0
- data/integration/apps/rack/bin/setup +17 -0
- data/integration/apps/rack/bin/test +24 -0
- data/integration/apps/rack/config.ru +6 -0
- data/integration/apps/rack/config/puma.rb +14 -0
- data/integration/apps/rack/config/unicorn.rb +23 -0
- data/integration/apps/rack/docker-compose.ci.yml +62 -0
- data/integration/apps/rack/docker-compose.yml +78 -0
- data/integration/apps/rack/script/build-images +38 -0
- data/integration/apps/rack/script/ci +50 -0
- data/integration/apps/rack/spec/integration/basic_spec.rb +10 -0
- data/integration/apps/rack/spec/spec_helper.rb +16 -0
- data/integration/apps/rack/spec/support/integration_helper.rb +22 -0
- data/integration/apps/rails-five/.dockerignore +1 -0
- data/integration/apps/rails-five/.env +3 -0
- data/integration/apps/rails-five/.envrc.sample +1 -0
- data/integration/apps/rails-five/.gitignore +30 -0
- data/integration/apps/rails-five/Dockerfile +25 -0
- data/integration/apps/rails-five/Dockerfile-ci +11 -0
- data/integration/apps/rails-five/Gemfile +104 -0
- data/integration/apps/rails-five/README.md +94 -0
- data/integration/apps/rails-five/Rakefile +6 -0
- data/integration/apps/rails-five/app/channels/application_cable/channel.rb +4 -0
- data/integration/apps/rails-five/app/channels/application_cable/connection.rb +4 -0
- data/integration/apps/rails-five/app/controllers/application_controller.rb +2 -0
- data/integration/apps/rails-five/app/controllers/basic_controller.rb +36 -0
- data/integration/apps/rails-five/app/controllers/concerns/.keep +0 -0
- data/integration/apps/rails-five/app/controllers/health_controller.rb +9 -0
- data/integration/apps/rails-five/app/controllers/jobs_controller.rb +12 -0
- data/integration/apps/rails-five/app/jobs/application_job.rb +2 -0
- data/integration/apps/rails-five/app/jobs/test_job.rb +12 -0
- data/integration/apps/rails-five/app/mailers/application_mailer.rb +4 -0
- data/integration/apps/rails-five/app/models/application_record.rb +3 -0
- data/integration/apps/rails-five/app/models/concerns/.keep +0 -0
- data/integration/apps/rails-five/app/models/test.rb +2 -0
- data/integration/apps/rails-five/app/views/layouts/mailer.html.erb +13 -0
- data/integration/apps/rails-five/app/views/layouts/mailer.text.erb +1 -0
- data/integration/apps/rails-five/bin/bundle +3 -0
- data/integration/apps/rails-five/bin/rails +9 -0
- data/integration/apps/rails-five/bin/rake +9 -0
- data/integration/apps/rails-five/bin/run +24 -0
- data/integration/apps/rails-five/bin/setup +27 -0
- data/integration/apps/rails-five/bin/spring +17 -0
- data/integration/apps/rails-five/bin/test +21 -0
- data/integration/apps/rails-five/bin/update +28 -0
- data/integration/apps/rails-five/config.ru +5 -0
- data/integration/apps/rails-five/config/application.rb +97 -0
- data/integration/apps/rails-five/config/boot.rb +4 -0
- data/integration/apps/rails-five/config/cable.yml +10 -0
- data/integration/apps/rails-five/config/credentials.yml.enc +1 -0
- data/integration/apps/rails-five/config/database.yml +28 -0
- data/integration/apps/rails-five/config/environment.rb +5 -0
- data/integration/apps/rails-five/config/environments/development.rb +51 -0
- data/integration/apps/rails-five/config/environments/production.rb +82 -0
- data/integration/apps/rails-five/config/environments/test.rb +43 -0
- data/integration/apps/rails-five/config/initializers/datadog.rb +18 -0
- data/integration/apps/rails-five/config/initializers/filter_parameter_logging.rb +4 -0
- data/integration/apps/rails-five/config/initializers/resque.rb +4 -0
- data/integration/apps/rails-five/config/initializers/rollbar.rb +5 -0
- data/integration/apps/rails-five/config/initializers/wrap_parameters.rb +14 -0
- data/integration/apps/rails-five/config/locales/en.yml +33 -0
- data/integration/apps/rails-five/config/puma.rb +24 -0
- data/integration/apps/rails-five/config/routes.rb +11 -0
- data/integration/apps/rails-five/config/spring.rb +6 -0
- data/integration/apps/rails-five/config/unicorn.rb +29 -0
- data/integration/apps/rails-five/db/migrate/20190927215052_create_tests.rb +11 -0
- data/integration/apps/rails-five/db/schema.rb +23 -0
- data/integration/apps/rails-five/db/seeds.rb +7 -0
- data/integration/apps/rails-five/docker-compose.ci.yml +98 -0
- data/integration/apps/rails-five/docker-compose.yml +100 -0
- data/integration/apps/rails-five/lib/tasks/.keep +0 -0
- data/integration/apps/rails-five/log/.keep +0 -0
- data/integration/apps/rails-five/public/robots.txt +1 -0
- data/integration/apps/rails-five/script/build-images +35 -0
- data/integration/apps/rails-five/script/ci +50 -0
- data/integration/apps/rails-five/spec/integration/basic_spec.rb +10 -0
- data/integration/apps/rails-five/spec/spec_helper.rb +16 -0
- data/integration/apps/rails-five/spec/support/integration_helper.rb +22 -0
- data/integration/apps/rails-five/storage/.keep +0 -0
- data/integration/apps/rails-five/tmp/.keep +0 -0
- data/integration/apps/rails-five/vendor/.keep +0 -0
- data/integration/apps/ruby/.dockerignore +1 -0
- data/integration/apps/ruby/.envrc.sample +1 -0
- data/integration/apps/ruby/.gitignore +2 -0
- data/integration/apps/ruby/Dockerfile +25 -0
- data/integration/apps/ruby/Dockerfile-ci +11 -0
- data/integration/apps/ruby/Gemfile +11 -0
- data/integration/apps/ruby/README.md +70 -0
- data/integration/apps/ruby/agent.yaml +3 -0
- data/integration/apps/ruby/app/datadog.rb +13 -0
- data/integration/apps/ruby/app/fibonacci.rb +58 -0
- data/integration/apps/ruby/bin/run +20 -0
- data/integration/apps/ruby/bin/setup +17 -0
- data/integration/apps/ruby/bin/test +21 -0
- data/integration/apps/ruby/docker-compose.ci.yml +51 -0
- data/integration/apps/ruby/docker-compose.yml +63 -0
- data/integration/apps/ruby/script/build-images +38 -0
- data/integration/apps/ruby/script/ci +50 -0
- data/integration/images/agent/Dockerfile +2 -0
- data/integration/images/agent/agent.yaml +3 -0
- data/integration/images/include/datadog/analyzer.rb +71 -0
- data/integration/images/include/datadog/demo_env.rb +101 -0
- data/integration/images/include/http-health-check +33 -0
- data/integration/images/ruby/2.0/Dockerfile +54 -0
- data/integration/images/ruby/2.1/Dockerfile +54 -0
- data/integration/images/ruby/2.2/Dockerfile +54 -0
- data/integration/images/ruby/2.3/Dockerfile +70 -0
- data/integration/images/ruby/2.4/Dockerfile +54 -0
- data/integration/images/ruby/2.5/Dockerfile +54 -0
- data/integration/images/ruby/2.6/Dockerfile +54 -0
- data/integration/images/ruby/2.7/Dockerfile +54 -0
- data/integration/images/ruby/3.0/Dockerfile +54 -0
- data/integration/images/wrk/Dockerfile +33 -0
- data/integration/images/wrk/scripts/entrypoint.sh +17 -0
- data/integration/images/wrk/scripts/scenarios/basic/default.lua +1 -0
- data/integration/images/wrk/scripts/scenarios/basic/fibonacci.lua +1 -0
- data/integration/script/build-images +43 -0
- data/lib/ddtrace.rb +8 -5
- data/lib/ddtrace/analytics.rb +2 -0
- data/lib/ddtrace/auto_instrument.rb +3 -0
- data/lib/ddtrace/auto_instrument_base.rb +6 -0
- data/lib/ddtrace/buffer.rb +4 -4
- data/lib/ddtrace/configuration.rb +121 -26
- data/lib/ddtrace/configuration/base.rb +1 -1
- data/lib/ddtrace/configuration/components.rb +87 -5
- data/lib/ddtrace/configuration/option_definition.rb +1 -3
- data/lib/ddtrace/configuration/options.rb +4 -7
- data/lib/ddtrace/configuration/settings.rb +48 -3
- data/lib/ddtrace/context.rb +5 -6
- data/lib/ddtrace/context_provider.rb +0 -1
- data/lib/ddtrace/contrib/action_cable/event.rb +1 -0
- data/lib/ddtrace/contrib/action_cable/integration.rb +7 -0
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +1 -3
- data/lib/ddtrace/contrib/action_pack/integration.rb +7 -0
- data/lib/ddtrace/contrib/action_view/event.rb +1 -1
- data/lib/ddtrace/contrib/action_view/integration.rb +7 -0
- data/lib/ddtrace/contrib/action_view/utils.rb +1 -1
- data/lib/ddtrace/contrib/active_record/configuration/makara_resolver.rb +30 -0
- data/lib/ddtrace/contrib/active_record/configuration/resolver.rb +107 -18
- data/lib/ddtrace/contrib/active_record/integration.rb +7 -0
- data/lib/ddtrace/contrib/active_record/utils.rb +57 -20
- data/lib/ddtrace/contrib/active_support/integration.rb +7 -1
- data/lib/ddtrace/contrib/active_support/notifications/event.rb +2 -1
- data/lib/ddtrace/contrib/active_support/notifications/subscriber.rb +1 -0
- data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +9 -5
- data/lib/ddtrace/contrib/auto_instrument.rb +49 -0
- data/lib/ddtrace/contrib/aws/patcher.rb +1 -0
- data/lib/ddtrace/contrib/aws/services.rb +2 -0
- data/lib/ddtrace/contrib/configurable.rb +63 -39
- data/lib/ddtrace/contrib/configuration/resolver.rb +70 -5
- data/lib/ddtrace/contrib/configuration/resolvers/pattern_resolver.rb +19 -20
- data/lib/ddtrace/contrib/configuration/settings.rb +7 -6
- data/lib/ddtrace/contrib/cucumber/configuration/settings.rb +0 -10
- data/lib/ddtrace/contrib/cucumber/ext.rb +0 -2
- data/lib/ddtrace/contrib/cucumber/formatter.rb +5 -11
- data/lib/ddtrace/contrib/cucumber/integration.rb +5 -0
- data/lib/ddtrace/contrib/dalli/patcher.rb +0 -38
- data/lib/ddtrace/contrib/delayed_job/plugin.rb +0 -1
- data/lib/ddtrace/contrib/elasticsearch/patcher.rb +1 -0
- data/lib/ddtrace/contrib/elasticsearch/quantize.rb +3 -2
- data/lib/ddtrace/contrib/ethon/easy_patch.rb +10 -9
- data/lib/ddtrace/contrib/excon/middleware.rb +2 -6
- data/lib/ddtrace/contrib/extensions.rb +53 -3
- data/lib/ddtrace/contrib/faraday/middleware.rb +1 -3
- data/lib/ddtrace/contrib/faraday/patcher.rb +0 -36
- data/lib/ddtrace/contrib/grape/endpoint.rb +8 -15
- data/lib/ddtrace/contrib/grape/patcher.rb +0 -42
- data/lib/ddtrace/contrib/grpc/datadog_interceptor.rb +8 -8
- data/lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb +1 -0
- data/lib/ddtrace/contrib/grpc/patcher.rb +0 -36
- data/lib/ddtrace/contrib/http/circuit_breaker.rb +1 -3
- data/lib/ddtrace/contrib/http/instrumentation.rb +5 -5
- data/lib/ddtrace/contrib/httpclient/configuration/settings.rb +32 -0
- data/lib/ddtrace/contrib/httpclient/ext.rb +17 -0
- data/lib/ddtrace/contrib/httpclient/instrumentation.rb +147 -0
- data/lib/ddtrace/contrib/httpclient/integration.rb +43 -0
- data/lib/ddtrace/contrib/httpclient/patcher.rb +38 -0
- data/lib/ddtrace/contrib/httprb/instrumentation.rb +14 -20
- data/lib/ddtrace/contrib/httprb/patcher.rb +5 -2
- data/lib/ddtrace/contrib/mongodb/instrumentation.rb +2 -0
- data/lib/ddtrace/contrib/mongodb/subscribers.rb +2 -3
- data/lib/ddtrace/contrib/patchable.rb +18 -7
- data/lib/ddtrace/contrib/patcher.rb +9 -6
- data/lib/ddtrace/contrib/presto/patcher.rb +5 -2
- data/lib/ddtrace/contrib/qless/qless_job.rb +1 -0
- data/lib/ddtrace/contrib/qless/tracer_cleaner.rb +1 -0
- data/lib/ddtrace/contrib/que/ext.rb +19 -19
- data/lib/ddtrace/contrib/que/tracer.rb +1 -1
- data/lib/ddtrace/contrib/racecar/event.rb +1 -0
- data/lib/ddtrace/contrib/rack/configuration/settings.rb +3 -3
- data/lib/ddtrace/contrib/rack/integration.rb +7 -0
- data/lib/ddtrace/contrib/rack/middlewares.rb +6 -11
- data/lib/ddtrace/contrib/rack/patcher.rb +1 -3
- data/lib/ddtrace/contrib/rack/request_queue.rb +6 -1
- data/lib/ddtrace/contrib/rails/auto_instrument_railtie.rb +10 -0
- data/lib/ddtrace/contrib/rails/patcher.rb +6 -2
- data/lib/ddtrace/contrib/rails/utils.rb +4 -0
- data/lib/ddtrace/contrib/rake/instrumentation.rb +4 -2
- data/lib/ddtrace/contrib/rake/integration.rb +1 -1
- data/lib/ddtrace/contrib/redis/configuration/resolver.rb +11 -4
- data/lib/ddtrace/contrib/redis/quantize.rb +1 -0
- data/lib/ddtrace/contrib/redis/vendor/LICENSE +20 -0
- data/lib/ddtrace/contrib/redis/vendor/resolver.rb +6 -7
- data/lib/ddtrace/contrib/registry.rb +2 -2
- data/lib/ddtrace/contrib/resque/configuration/settings.rb +17 -1
- data/lib/ddtrace/contrib/resque/integration.rb +1 -1
- data/lib/ddtrace/contrib/resque/patcher.rb +4 -4
- data/lib/ddtrace/contrib/resque/resque_job.rb +24 -1
- data/lib/ddtrace/contrib/rest_client/request_patch.rb +1 -3
- data/lib/ddtrace/contrib/rspec/configuration/settings.rb +0 -10
- data/lib/ddtrace/contrib/rspec/example.rb +24 -10
- data/lib/ddtrace/contrib/rspec/ext.rb +0 -3
- data/lib/ddtrace/contrib/rspec/integration.rb +6 -1
- data/lib/ddtrace/contrib/rspec/patcher.rb +0 -2
- data/lib/ddtrace/contrib/sequel/utils.rb +5 -6
- data/lib/ddtrace/contrib/shoryuken/configuration/settings.rb +1 -0
- data/lib/ddtrace/contrib/shoryuken/tracer.rb +7 -4
- data/lib/ddtrace/contrib/sidekiq/server_tracer.rb +2 -7
- data/lib/ddtrace/contrib/sidekiq/tracing.rb +0 -1
- data/lib/ddtrace/contrib/sinatra/env.rb +1 -3
- data/lib/ddtrace/contrib/sinatra/headers.rb +1 -3
- data/lib/ddtrace/contrib/sinatra/tracer.rb +1 -3
- data/lib/ddtrace/contrib/sinatra/tracer_middleware.rb +3 -3
- data/lib/ddtrace/contrib/sneakers/ext.rb +11 -11
- data/lib/ddtrace/contrib/sneakers/tracer.rb +2 -4
- data/lib/ddtrace/contrib/status_code_matcher.rb +5 -3
- data/lib/ddtrace/correlation.rb +1 -0
- data/lib/ddtrace/diagnostics/environment_logger.rb +3 -2
- data/lib/ddtrace/distributed_tracing/headers/headers.rb +1 -0
- data/lib/ddtrace/distributed_tracing/headers/helpers.rb +1 -3
- data/lib/ddtrace/error.rb +2 -0
- data/lib/ddtrace/ext/ci.rb +43 -10
- data/lib/ddtrace/ext/distributed.rb +1 -1
- data/lib/ddtrace/ext/git.rb +0 -1
- data/lib/ddtrace/ext/http.rb +1 -1
- data/lib/ddtrace/ext/profiling.rb +52 -0
- data/lib/ddtrace/ext/runtime.rb +3 -1
- data/lib/ddtrace/ext/transport.rb +1 -0
- data/lib/ddtrace/forced_tracing.rb +2 -0
- data/lib/ddtrace/logger.rb +1 -1
- data/lib/ddtrace/metrics.rb +14 -6
- data/lib/ddtrace/opentracer/distributed_headers.rb +3 -0
- data/lib/ddtrace/opentracer/span.rb +2 -6
- data/lib/ddtrace/opentracer/thread_local_scope.rb +1 -0
- data/lib/ddtrace/patcher.rb +25 -4
- data/lib/ddtrace/pin.rb +8 -61
- data/lib/ddtrace/pipeline/span_filter.rb +1 -1
- data/lib/ddtrace/profiling.rb +54 -0
- data/lib/ddtrace/profiling/backtrace_location.rb +32 -0
- data/lib/ddtrace/profiling/buffer.rb +41 -0
- data/lib/ddtrace/profiling/collectors/stack.rb +253 -0
- data/lib/ddtrace/profiling/encoding/profile.rb +31 -0
- data/lib/ddtrace/profiling/event.rb +13 -0
- data/lib/ddtrace/profiling/events/stack.rb +102 -0
- data/lib/ddtrace/profiling/exporter.rb +23 -0
- data/lib/ddtrace/profiling/ext/cpu.rb +54 -0
- data/lib/ddtrace/profiling/ext/cthread.rb +134 -0
- data/lib/ddtrace/profiling/ext/forking.rb +97 -0
- data/lib/ddtrace/profiling/flush.rb +41 -0
- data/lib/ddtrace/profiling/pprof/builder.rb +121 -0
- data/lib/ddtrace/profiling/pprof/converter.rb +85 -0
- data/lib/ddtrace/profiling/pprof/message_set.rb +12 -0
- data/lib/ddtrace/profiling/pprof/payload.rb +18 -0
- data/lib/ddtrace/profiling/pprof/pprof.proto +212 -0
- data/lib/ddtrace/profiling/pprof/pprof_pb.rb +81 -0
- data/lib/ddtrace/profiling/pprof/stack_sample.rb +90 -0
- data/lib/ddtrace/profiling/pprof/string_table.rb +10 -0
- data/lib/ddtrace/profiling/pprof/template.rb +114 -0
- data/lib/ddtrace/profiling/preload.rb +3 -0
- data/lib/ddtrace/profiling/profiler.rb +28 -0
- data/lib/ddtrace/profiling/recorder.rb +87 -0
- data/lib/ddtrace/profiling/scheduler.rb +84 -0
- data/lib/ddtrace/profiling/tasks/setup.rb +77 -0
- data/lib/ddtrace/profiling/transport/client.rb +12 -0
- data/lib/ddtrace/profiling/transport/http.rb +122 -0
- data/lib/ddtrace/profiling/transport/http/api.rb +43 -0
- data/lib/ddtrace/profiling/transport/http/api/endpoint.rb +90 -0
- data/lib/ddtrace/profiling/transport/http/api/instance.rb +36 -0
- data/lib/ddtrace/profiling/transport/http/api/spec.rb +40 -0
- data/lib/ddtrace/profiling/transport/http/builder.rb +28 -0
- data/lib/ddtrace/profiling/transport/http/client.rb +33 -0
- data/lib/ddtrace/profiling/transport/http/response.rb +21 -0
- data/lib/ddtrace/profiling/transport/io.rb +30 -0
- data/lib/ddtrace/profiling/transport/io/client.rb +27 -0
- data/lib/ddtrace/profiling/transport/io/response.rb +16 -0
- data/lib/ddtrace/profiling/transport/parcel.rb +17 -0
- data/lib/ddtrace/profiling/transport/request.rb +15 -0
- data/lib/ddtrace/profiling/transport/response.rb +8 -0
- data/lib/ddtrace/propagation/grpc_propagator.rb +1 -0
- data/lib/ddtrace/propagation/http_propagator.rb +17 -2
- data/lib/ddtrace/quantization/http.rb +1 -0
- data/lib/ddtrace/runtime/cgroup.rb +2 -2
- data/lib/ddtrace/runtime/container.rb +32 -26
- data/lib/ddtrace/runtime/identity.rb +8 -0
- data/lib/ddtrace/sampler.rb +1 -1
- data/lib/ddtrace/sampling/rule_sampler.rb +4 -9
- data/lib/ddtrace/span.rb +7 -7
- data/lib/ddtrace/sync_writer.rb +12 -12
- data/lib/ddtrace/tasks/exec.rb +48 -0
- data/lib/ddtrace/tasks/help.rb +14 -0
- data/lib/ddtrace/tracer.rb +28 -5
- data/lib/ddtrace/transport/http.rb +15 -8
- data/lib/ddtrace/transport/http/adapters/net.rb +27 -8
- data/lib/ddtrace/transport/http/adapters/registry.rb +1 -0
- data/lib/ddtrace/transport/http/adapters/unix_socket.rb +2 -4
- data/lib/ddtrace/transport/http/builder.rb +7 -1
- data/lib/ddtrace/transport/http/env.rb +8 -0
- data/lib/ddtrace/transport/http/traces.rb +2 -3
- data/lib/ddtrace/transport/io.rb +1 -1
- data/lib/ddtrace/transport/io/client.rb +15 -8
- data/lib/ddtrace/transport/io/response.rb +1 -3
- data/lib/ddtrace/transport/io/traces.rb +6 -0
- data/lib/ddtrace/transport/parcel.rb +4 -0
- data/lib/ddtrace/transport/traces.rb +18 -1
- data/lib/ddtrace/utils/compression.rb +27 -0
- data/lib/ddtrace/utils/object_set.rb +41 -0
- data/lib/ddtrace/utils/only_once.rb +40 -0
- data/lib/ddtrace/utils/sequence.rb +17 -0
- data/lib/ddtrace/utils/string_table.rb +45 -0
- data/lib/ddtrace/utils/time.rb +32 -1
- data/lib/ddtrace/vendor/active_record/MIT-LICENSE +20 -0
- data/lib/ddtrace/vendor/multipart-post/LICENSE +11 -0
- data/lib/ddtrace/vendor/multipart-post/multipart.rb +12 -0
- data/lib/ddtrace/vendor/multipart-post/multipart/post.rb +8 -0
- data/lib/ddtrace/vendor/multipart-post/multipart/post/composite_read_io.rb +116 -0
- data/lib/ddtrace/vendor/multipart-post/multipart/post/multipartable.rb +57 -0
- data/lib/ddtrace/vendor/multipart-post/multipart/post/parts.rb +135 -0
- data/lib/ddtrace/vendor/multipart-post/multipart/post/version.rb +9 -0
- data/lib/ddtrace/vendor/multipart-post/net/http/post/multipart.rb +32 -0
- data/lib/ddtrace/version.rb +3 -1
- data/lib/ddtrace/workers.rb +5 -0
- data/lib/ddtrace/workers/async.rb +11 -3
- data/lib/ddtrace/workers/loop.rb +17 -3
- data/lib/ddtrace/workers/polling.rb +1 -0
- data/lib/ddtrace/workers/queue.rb +1 -0
- data/lib/ddtrace/workers/runtime_metrics.rb +14 -1
- data/lib/ddtrace/workers/trace_writer.rb +10 -10
- data/lib/ddtrace/writer.rb +7 -4
- metadata +213 -379
- data/lib/ddtrace/augmentation.rb +0 -13
- data/lib/ddtrace/augmentation/method_wrapper.rb +0 -20
- data/lib/ddtrace/augmentation/method_wrapping.rb +0 -38
- data/lib/ddtrace/augmentation/shim.rb +0 -102
- data/lib/ddtrace/contrib/rspec/example_group.rb +0 -61
- data/lib/ddtrace/monkey.rb +0 -58
@@ -58,6 +58,16 @@ RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cac
|
|
58
58
|
&& rm -rf /tmp/dockerize-linux-amd64.tar.gz \
|
59
59
|
&& dockerize --version
|
60
60
|
|
61
|
+
# Install Protobuf compiler
|
62
|
+
RUN export PROTOC_URL=$(curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep -e 'protoc-[.0-9]*-linux-x86_64\.zip' | sort -r | head -n 1) \
|
63
|
+
&& echo Protoc URL: $PROTOC_URL \
|
64
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \
|
65
|
+
&& ls -lha /tmp/protoc.zip \
|
66
|
+
&& unzip /tmp/protoc.zip -d /tmp/protoc \
|
67
|
+
&& mv /tmp/protoc/bin/* /usr/bin \
|
68
|
+
&& rm -rf /tmp/protoc /tmp/protoc.zip \
|
69
|
+
&& protoc --version
|
70
|
+
|
61
71
|
# Install RubyGems
|
62
72
|
RUN gem update --system
|
63
73
|
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
|
@@ -58,6 +58,16 @@ RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cac
|
|
58
58
|
&& rm -rf /tmp/dockerize-linux-amd64.tar.gz \
|
59
59
|
&& dockerize --version
|
60
60
|
|
61
|
+
# Install Protobuf compiler
|
62
|
+
RUN export PROTOC_URL=$(curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep -e 'protoc-[.0-9]*-linux-x86_64\.zip' | sort -r | head -n 1) \
|
63
|
+
&& echo Protoc URL: $PROTOC_URL \
|
64
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \
|
65
|
+
&& ls -lha /tmp/protoc.zip \
|
66
|
+
&& unzip /tmp/protoc.zip -d /tmp/protoc \
|
67
|
+
&& mv /tmp/protoc/bin/* /usr/bin \
|
68
|
+
&& rm -rf /tmp/protoc /tmp/protoc.zip \
|
69
|
+
&& protoc --version
|
70
|
+
|
61
71
|
# Install RubyGems
|
62
72
|
# RUN gem update --system # Upgrading disabled until https://github.com/thoughtbot/appraisal/issues/162 is fixed
|
63
73
|
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# Current version: https://github.com/cpuguy83/docker-jruby/blob/db08637839406420a254a9c825d94994cded5021/9000/jre/Dockerfile
|
2
|
+
FROM jruby:9.2.11.1
|
3
|
+
|
4
|
+
# Make apt non-interactive
|
5
|
+
RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \
|
6
|
+
&& echo 'DPkg::Options "--force-confnew";' >> /etc/apt/apt.conf.d/90circleci
|
7
|
+
|
8
|
+
ENV DEBIAN_FRONTEND=noninteractive
|
9
|
+
|
10
|
+
# Install required packages
|
11
|
+
RUN set -ex; \
|
12
|
+
apt-get update; \
|
13
|
+
mkdir -p /usr/share/man/man1; \
|
14
|
+
apt-get install -y --no-install-recommends \
|
15
|
+
git mercurial xvfb \
|
16
|
+
locales sudo openssh-client ca-certificates tar gzip parallel \
|
17
|
+
net-tools netcat unzip zip bzip2 gnupg curl wget \
|
18
|
+
tzdata rsync vim \
|
19
|
+
build-essential \
|
20
|
+
shared-mime-info; \
|
21
|
+
rm -rf /var/lib/apt/lists/*;
|
22
|
+
|
23
|
+
# Set timezone to UTC by default
|
24
|
+
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
25
|
+
|
26
|
+
# Set language
|
27
|
+
RUN locale-gen en_US.UTF-8
|
28
|
+
ENV LANG en_US.UTF-8
|
29
|
+
ENV LANGUAGE en_US:en
|
30
|
+
|
31
|
+
# Install jq
|
32
|
+
RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \
|
33
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \
|
34
|
+
&& chmod +x /usr/bin/jq \
|
35
|
+
&& jq --version
|
36
|
+
|
37
|
+
# Install Docker
|
38
|
+
RUN set -ex \
|
39
|
+
&& export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \
|
40
|
+
&& DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \
|
41
|
+
&& echo Docker URL: $DOCKER_URL \
|
42
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \
|
43
|
+
&& ls -lha /tmp/docker.tgz \
|
44
|
+
&& tar -xz -C /tmp -f /tmp/docker.tgz \
|
45
|
+
&& mv /tmp/docker/* /usr/bin \
|
46
|
+
&& rm -rf /tmp/docker /tmp/docker.tgz \
|
47
|
+
&& which docker \
|
48
|
+
&& (docker version || true)
|
49
|
+
|
50
|
+
# Install Docker Compose
|
51
|
+
RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \
|
52
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \
|
53
|
+
&& chmod +x /usr/bin/docker-compose \
|
54
|
+
&& docker-compose version
|
55
|
+
|
56
|
+
# Install Dockerize
|
57
|
+
RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \
|
58
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \
|
59
|
+
&& tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \
|
60
|
+
&& rm -rf /tmp/dockerize-linux-amd64.tar.gz \
|
61
|
+
&& dockerize --version
|
62
|
+
|
63
|
+
# Install Protobuf compiler
|
64
|
+
RUN export PROTOC_URL=$(curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep -e 'protoc-[.0-9]*-linux-x86_64\.zip' | sort -r | head -n 1) \
|
65
|
+
&& echo Protoc URL: $PROTOC_URL \
|
66
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \
|
67
|
+
&& ls -lha /tmp/protoc.zip \
|
68
|
+
&& unzip /tmp/protoc.zip -d /tmp/protoc \
|
69
|
+
&& mv /tmp/protoc/bin/* /usr/bin \
|
70
|
+
&& rm -rf /tmp/protoc /tmp/protoc.zip \
|
71
|
+
&& protoc --version
|
72
|
+
|
73
|
+
# Install RubyGems
|
74
|
+
RUN gem update --system
|
75
|
+
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
|
76
|
+
|
77
|
+
# Upgrade RubyGems and Bundler
|
78
|
+
RUN gem uninstall -i /opt/jruby/lib/ruby/gems/shared bundler -v 2.1.4 # Remove when https://github.com/thoughtbot/appraisal/issues/162 is fixed
|
79
|
+
RUN gem install bundler -v 2.1.2 # Remove when https://github.com/thoughtbot/appraisal/issues/162 is fixed
|
80
|
+
ENV BUNDLE_SILENCE_ROOT_WARNING 1
|
81
|
+
|
82
|
+
# Ensure JRuby is available when running "bash --login"
|
83
|
+
RUN echo "export PATH=/opt/jruby/bin:$BUNDLE_BIN:\$PATH" >> ~/.profile
|
84
|
+
|
85
|
+
RUN mkdir /app
|
86
|
+
WORKDIR /app
|
87
|
+
|
88
|
+
CMD ["bin", "bash", "--login"]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Current version: https://github.com/cpuguy83/docker-jruby/blob/db08637839406420a254a9c825d94994cded5021/9000/jre/Dockerfile
|
2
|
-
FROM jruby:9.2.
|
2
|
+
FROM jruby:9.2.0.0
|
3
3
|
|
4
4
|
# Make apt non-interactive
|
5
5
|
RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \
|
@@ -62,10 +62,6 @@ RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cac
|
|
62
62
|
# Install RubyGems
|
63
63
|
RUN gem update --system
|
64
64
|
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
|
65
|
-
|
66
|
-
# Upgrade RubyGems and Bundler
|
67
|
-
RUN gem uninstall -i /opt/jruby/lib/ruby/gems/shared bundler -v 2.1.4 # Remove when https://github.com/thoughtbot/appraisal/issues/162 is fixed
|
68
|
-
RUN gem install bundler -v 2.1.2 # Remove when https://github.com/thoughtbot/appraisal/issues/162 is fixed
|
69
65
|
ENV BUNDLE_SILENCE_ROOT_WARNING 1
|
70
66
|
|
71
67
|
# Ensure JRuby is available when running "bash --login"
|
@@ -0,0 +1,73 @@
|
|
1
|
+
FROM flavorjones/truffleruby:21.0.0-buster
|
2
|
+
|
3
|
+
# Make apt non-interactive
|
4
|
+
RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \
|
5
|
+
&& echo 'DPkg::Options "--force-confnew";' >> /etc/apt/apt.conf.d/90circleci
|
6
|
+
|
7
|
+
ENV DEBIAN_FRONTEND=noninteractive
|
8
|
+
|
9
|
+
# Install required packages
|
10
|
+
RUN set -ex; \
|
11
|
+
apt-get update; \
|
12
|
+
mkdir -p /usr/share/man/man1; \
|
13
|
+
apt-get install -y --no-install-recommends \
|
14
|
+
git mercurial xvfb \
|
15
|
+
locales sudo openssh-client ca-certificates tar gzip parallel \
|
16
|
+
net-tools netcat unzip zip bzip2 gnupg curl wget \
|
17
|
+
tzdata rsync vim; \
|
18
|
+
rm -rf /var/lib/apt/lists/*;
|
19
|
+
|
20
|
+
# Set timezone to UTC by default
|
21
|
+
RUN ln -sf /usr/share/zoneinfo/Etc/UTC /etc/localtime
|
22
|
+
|
23
|
+
# Set language
|
24
|
+
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
|
25
|
+
RUN locale-gen en_US.UTF-8
|
26
|
+
ENV LANG en_US.UTF-8
|
27
|
+
ENV LANGUAGE en_US:en
|
28
|
+
|
29
|
+
# Install jq
|
30
|
+
RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \
|
31
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \
|
32
|
+
&& chmod +x /usr/bin/jq \
|
33
|
+
&& jq --version
|
34
|
+
|
35
|
+
# Install Docker
|
36
|
+
RUN set -ex \
|
37
|
+
&& export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \
|
38
|
+
&& DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \
|
39
|
+
&& echo Docker URL: $DOCKER_URL \
|
40
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \
|
41
|
+
&& ls -lha /tmp/docker.tgz \
|
42
|
+
&& tar -xz -C /tmp -f /tmp/docker.tgz \
|
43
|
+
&& mv /tmp/docker/* /usr/bin \
|
44
|
+
&& rm -rf /tmp/docker /tmp/docker.tgz \
|
45
|
+
&& which docker \
|
46
|
+
&& (docker version || true)
|
47
|
+
|
48
|
+
# Install Docker Compose
|
49
|
+
RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \
|
50
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \
|
51
|
+
&& chmod +x /usr/bin/docker-compose \
|
52
|
+
&& docker-compose version
|
53
|
+
|
54
|
+
# Install Dockerize
|
55
|
+
RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \
|
56
|
+
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \
|
57
|
+
&& tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \
|
58
|
+
&& rm -rf /tmp/dockerize-linux-amd64.tar.gz \
|
59
|
+
&& dockerize --version
|
60
|
+
|
61
|
+
# Install RubyGems
|
62
|
+
RUN gem update --system
|
63
|
+
RUN mkdir -p "$GEM_HOME" && chmod -R 777 "$GEM_HOME"
|
64
|
+
|
65
|
+
# Upgrade RubyGems and Bundler
|
66
|
+
RUN gem update --system
|
67
|
+
RUN gem install bundler
|
68
|
+
ENV BUNDLE_SILENCE_ROOT_WARNING 1
|
69
|
+
|
70
|
+
RUN mkdir /app
|
71
|
+
WORKDIR /app
|
72
|
+
|
73
|
+
CMD ["/bin/sh"]
|
@@ -9,11 +9,11 @@ jobs:
|
|
9
9
|
steps:
|
10
10
|
- name: Get next minor version
|
11
11
|
id: semvers
|
12
|
-
uses: WyriHaximus/github-action-next-semvers@
|
12
|
+
uses: WyriHaximus/github-action-next-semvers@b135abb108d66990a85e18623d906404f4350ce4
|
13
13
|
with:
|
14
14
|
version: ${{ github.event.milestone.title }}
|
15
15
|
- name: Create next milestone
|
16
|
-
uses: WyriHaximus/github-action-create-milestone@
|
16
|
+
uses: WyriHaximus/github-action-create-milestone@ab85332e3150ec018daf497a0f761fe69d52bc7d
|
17
17
|
with:
|
18
18
|
title: ${{ steps.semvers.outputs.minor }}
|
19
19
|
env:
|
data/.gitlab-ci.yml
CHANGED
@@ -2,26 +2,26 @@ stages:
|
|
2
2
|
- deploy
|
3
3
|
|
4
4
|
variables:
|
5
|
-
|
5
|
+
DOWNSTREAM_BRANCH:
|
6
|
+
value: "master"
|
7
|
+
description: "Run a specific datadog-reliability-env branch downstream"
|
8
|
+
FORCE_TRIGGER:
|
9
|
+
value: "false"
|
10
|
+
description: "Set to true to override rules in the reliability-env pipeline (e.g. override 'only deploy master')"
|
6
11
|
|
7
12
|
.common: &common
|
8
13
|
tags: [ "runner:main", "size:large" ]
|
9
14
|
|
10
|
-
|
11
|
-
<<: *common
|
15
|
+
deploy_to_reliability_env:
|
12
16
|
stage: deploy
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
- echo $CI_COMMIT_REF_NAME >> $INDEX_FILE
|
25
|
-
- echo $CI_COMMIT_SHA >> $INDEX_FILE
|
26
|
-
- echo $GITLAB_USER_NAME >> $INDEX_FILE
|
27
|
-
- aws s3 cp $INDEX_FILE s3://datadog-reliability-env/ruby/$INDEX_FILE
|
17
|
+
when: on_success
|
18
|
+
trigger:
|
19
|
+
project: DataDog/datadog-reliability-env
|
20
|
+
branch: $DOWNSTREAM_BRANCH
|
21
|
+
variables:
|
22
|
+
UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME
|
23
|
+
UPSTREAM_PROJECT_ID: $CI_PROJECT_ID
|
24
|
+
UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME
|
25
|
+
UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA
|
26
|
+
FORCE_TRIGGER: $FORCE_TRIGGER
|
27
|
+
|
data/.rubocop.yml
CHANGED
@@ -1,5 +1,11 @@
|
|
1
|
+
inherit_from: .rubocop_todo.yml
|
2
|
+
|
3
|
+
require:
|
4
|
+
- rubocop-performance
|
5
|
+
- rubocop-rspec
|
6
|
+
|
1
7
|
AllCops:
|
2
|
-
TargetRubyVersion: 2.
|
8
|
+
TargetRubyVersion: 2.4 # Lowest version supported currently
|
3
9
|
Include:
|
4
10
|
- 'lib/**/*.rb'
|
5
11
|
- 'test/**/*.rb'
|
@@ -9,11 +15,15 @@ AllCops:
|
|
9
15
|
Exclude:
|
10
16
|
- 'Appraisals'
|
11
17
|
- '*.gemspec'
|
12
|
-
- 'lib/ddtrace
|
18
|
+
- 'lib/ddtrace/**/vendor/**/*.rb'
|
19
|
+
- 'integration/apps/*/bin/*'
|
20
|
+
- 'integration/apps/*/Gemfile'
|
21
|
+
- 'lib/ddtrace/profiling/pprof/pprof_pb.rb'
|
22
|
+
NewCops: disable # Don't allow new cops to be enabled implicitly.
|
13
23
|
|
14
24
|
# 80 characters is a nice goal, but not worth currently changing in existing
|
15
25
|
# code for the sake of changing it to conform to a length set in 1928 (IBM).
|
16
|
-
|
26
|
+
Layout/LineLength:
|
17
27
|
Max: 124
|
18
28
|
|
19
29
|
# These exceptions are good goals to attain, and probably will over time,
|
@@ -34,10 +44,7 @@ Performance/Casecmp:
|
|
34
44
|
# should enable again this rule but it will change the public API because
|
35
45
|
# we're using set_ methods. We should work on that because also Rails
|
36
46
|
# honors this rule.
|
37
|
-
|
38
|
-
Enabled: false
|
39
|
-
|
40
|
-
Style/MethodCallWithoutArgsParentheses:
|
47
|
+
Naming/AccessorMethodName:
|
41
48
|
Enabled: false
|
42
49
|
|
43
50
|
Style/RescueModifier:
|
@@ -67,6 +74,9 @@ Metrics/PerceivedComplexity:
|
|
67
74
|
Lint/UnusedMethodArgument:
|
68
75
|
Enabled: false
|
69
76
|
|
77
|
+
Style/RescueStandardError:
|
78
|
+
Enabled: false
|
79
|
+
|
70
80
|
# alias and alias_method are not equivalent
|
71
81
|
Style/Alias:
|
72
82
|
Enabled: false
|
@@ -83,3 +93,255 @@ Style/GuardClause:
|
|
83
93
|
# Case equality is not intrinsically problematic.
|
84
94
|
Style/CaseEquality:
|
85
95
|
Enabled: false
|
96
|
+
|
97
|
+
# New cops since Rubocop 1.0.
|
98
|
+
# We have to explicitly opt-in for new cops to apply
|
99
|
+
# before the next major release.
|
100
|
+
Gemspec/DateAssignment: # (new in 1.10)
|
101
|
+
Enabled: true
|
102
|
+
Layout/SpaceBeforeBrackets: # (new in 1.7)
|
103
|
+
Enabled: true
|
104
|
+
Lint/AmbiguousAssignment: # (new in 1.7)
|
105
|
+
Enabled: true
|
106
|
+
Lint/DeprecatedConstants: # (new in 1.8)
|
107
|
+
Enabled: true
|
108
|
+
Lint/DuplicateBranch: # (new in 1.3)
|
109
|
+
Enabled: true
|
110
|
+
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
|
111
|
+
Enabled: true
|
112
|
+
Lint/EmptyClass: # (new in 1.3)
|
113
|
+
Enabled: true
|
114
|
+
Lint/LambdaWithoutLiteralBlock: # (new in 1.8)
|
115
|
+
Enabled: true
|
116
|
+
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
|
117
|
+
Enabled: true
|
118
|
+
Lint/NumberedParameterAssignment: # (new in 1.9)
|
119
|
+
Enabled: true
|
120
|
+
Lint/OrAssignmentToConstant: # (new in 1.9)
|
121
|
+
Enabled: true
|
122
|
+
Lint/RedundantDirGlobSort: # (new in 1.8)
|
123
|
+
Enabled: true
|
124
|
+
Lint/SymbolConversion: # (new in 1.9)
|
125
|
+
Enabled: true
|
126
|
+
Lint/ToEnumArguments: # (new in 1.1)
|
127
|
+
Enabled: true
|
128
|
+
Lint/TripleQuotes: # (new in 1.9)
|
129
|
+
Enabled: true
|
130
|
+
Lint/UnexpectedBlockArity: # (new in 1.5)
|
131
|
+
Enabled: true
|
132
|
+
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
|
133
|
+
Enabled: true
|
134
|
+
Style/ArgumentsForwarding: # (new in 1.1)
|
135
|
+
Enabled: true
|
136
|
+
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
|
137
|
+
Enabled: true
|
138
|
+
Style/EndlessMethod: # (new in 1.8)
|
139
|
+
Enabled: true
|
140
|
+
Style/HashExcept: # (new in 1.7)
|
141
|
+
Enabled: true
|
142
|
+
Style/IfWithBooleanLiteralBranches: # (new in 1.9)
|
143
|
+
Enabled: true
|
144
|
+
Style/NilLambda: # (new in 1.3)
|
145
|
+
Enabled: true
|
146
|
+
Style/RedundantArgument: # (new in 1.4)
|
147
|
+
Enabled: true
|
148
|
+
Style/SwapValues: # (new in 1.1)
|
149
|
+
Enabled: true
|
150
|
+
Performance/AncestorsInclude: # (new in 1.7)
|
151
|
+
Enabled: true
|
152
|
+
Performance/BigDecimalWithNumericArgument: # (new in 1.7)
|
153
|
+
Enabled: true
|
154
|
+
Performance/BlockGivenWithExplicitBlock: # (new in 1.9)
|
155
|
+
Enabled: true
|
156
|
+
Performance/CollectionLiteralInLoop: # (new in 1.8)
|
157
|
+
Enabled: true
|
158
|
+
Performance/ConstantRegexp: # (new in 1.9)
|
159
|
+
Enabled: true
|
160
|
+
Performance/MethodObjectAsBlock: # (new in 1.9)
|
161
|
+
Enabled: true
|
162
|
+
Performance/RedundantSortBlock: # (new in 1.7)
|
163
|
+
Enabled: true
|
164
|
+
Performance/RedundantStringChars: # (new in 1.7)
|
165
|
+
Enabled: true
|
166
|
+
Performance/ReverseFirst: # (new in 1.7)
|
167
|
+
Enabled: true
|
168
|
+
Performance/SortReverse: # (new in 1.7)
|
169
|
+
Enabled: true
|
170
|
+
Performance/Squeeze: # (new in 1.7)
|
171
|
+
Enabled: true
|
172
|
+
Performance/StringInclude: # (new in 1.7)
|
173
|
+
Enabled: true
|
174
|
+
Performance/Sum: # (new in 1.8)
|
175
|
+
Enabled: true
|
176
|
+
|
177
|
+
# Requires Ruby 2.1
|
178
|
+
Style/HashConversion:
|
179
|
+
Enabled: false
|
180
|
+
|
181
|
+
# Requires Ruby 2.1
|
182
|
+
Lint/SendWithMixinArgument:
|
183
|
+
Enabled: false
|
184
|
+
|
185
|
+
# Requires Ruby 2.2
|
186
|
+
Style/HashSyntax:
|
187
|
+
Enabled: false
|
188
|
+
|
189
|
+
# Requires Ruby 2.3
|
190
|
+
Style/SafeNavigation:
|
191
|
+
Enabled: false
|
192
|
+
|
193
|
+
# Requires Ruby 2.3
|
194
|
+
Performance/UnfreezeString:
|
195
|
+
Enabled: false
|
196
|
+
|
197
|
+
# Requires Ruby 2.4
|
198
|
+
Style/HashTransformValues:
|
199
|
+
Enabled: false
|
200
|
+
|
201
|
+
# Requires Ruby 2.4
|
202
|
+
Style/CollectionCompact:
|
203
|
+
Enabled: false
|
204
|
+
|
205
|
+
# Requires Ruby 2.4
|
206
|
+
Performance/RegexpMatch:
|
207
|
+
Enabled: false
|
208
|
+
|
209
|
+
# Enforces negative/positive branching order,
|
210
|
+
# which can hurt readability.
|
211
|
+
Style/NegatedIfElseCondition:
|
212
|
+
Enabled: false
|
213
|
+
|
214
|
+
# Converts `to change{foo.bar}` to `to change(foo, :bar)`.
|
215
|
+
# It doesn't seem to make it more readable, and doesn't work
|
216
|
+
# when `foo` has to be re-evaluated.
|
217
|
+
RSpec/ExpectChange:
|
218
|
+
Enabled: false
|
219
|
+
|
220
|
+
# Readability is not meaningfully affected by enforcing
|
221
|
+
# `not_to` vs `to_not`.
|
222
|
+
RSpec/NotToNot:
|
223
|
+
Enabled: false
|
224
|
+
|
225
|
+
# Enforces `subject` above all else, even `include_context`
|
226
|
+
# declarations.
|
227
|
+
RSpec/LeadingSubject:
|
228
|
+
Enabled: false
|
229
|
+
|
230
|
+
# Enforces usage of `expect(subject)` instead of `is_expected`.
|
231
|
+
RSpec/ImplicitSubject:
|
232
|
+
Enabled: false
|
233
|
+
|
234
|
+
# Enforces empty line after subject declaration.
|
235
|
+
RSpec/EmptyLineAfterSubject:
|
236
|
+
Enabled: false
|
237
|
+
|
238
|
+
# Enforces empty line after last let declaration.
|
239
|
+
RSpec/EmptyLineAfterFinalLet:
|
240
|
+
Enabled: false
|
241
|
+
|
242
|
+
# TODO: Disabling until we categorize which file are safe to do so.
|
243
|
+
Style/FrozenStringLiteralComment:
|
244
|
+
Enabled: false
|
245
|
+
|
246
|
+
# Replaces `x == 0` with `x.zero?` and similar.
|
247
|
+
# These methods are ~2x slower than the simple math comparison.
|
248
|
+
Style/NumericPredicate:
|
249
|
+
Enabled: false
|
250
|
+
|
251
|
+
# Allow for empty blocks (without a comment) in tests.
|
252
|
+
Lint/EmptyBlock:
|
253
|
+
Exclude:
|
254
|
+
- 'test/**/*.rb'
|
255
|
+
- 'spec/**/*.rb'
|
256
|
+
|
257
|
+
# Enforces that context description must start with 'when', 'with', or 'without'.
|
258
|
+
RSpec/ContextWording:
|
259
|
+
Enabled: false
|
260
|
+
|
261
|
+
# Checks for multiple top-level example groups.
|
262
|
+
# Multiple descriptions for the same class or module should either
|
263
|
+
# be nested or separated into different test files.
|
264
|
+
RSpec/MultipleDescribes:
|
265
|
+
Enabled: false
|
266
|
+
|
267
|
+
# Enforces that examples should only have a limited amount of assertions.
|
268
|
+
RSpec/MultipleExpectations:
|
269
|
+
Enabled: false
|
270
|
+
|
271
|
+
# Enforces minimum character length for parameters.
|
272
|
+
Naming/MethodParameterName:
|
273
|
+
Enabled: false
|
274
|
+
|
275
|
+
# Enforces no instance variable in specs.
|
276
|
+
RSpec/InstanceVariable:
|
277
|
+
Enabled: false
|
278
|
+
|
279
|
+
# Enforces a maximum nested example group level.
|
280
|
+
RSpec/NestedGroups:
|
281
|
+
Enabled: false
|
282
|
+
|
283
|
+
# Enforces `receive` vs `have_received` expectation pattern.
|
284
|
+
RSpec/MessageSpies:
|
285
|
+
Enabled: false
|
286
|
+
|
287
|
+
# Enforces example line count limit.
|
288
|
+
RSpec/ExampleLength:
|
289
|
+
Enabled: false
|
290
|
+
|
291
|
+
# Enforces maximum let and subject calls.
|
292
|
+
RSpec/MultipleMemoizedHelpers:
|
293
|
+
Enabled: false
|
294
|
+
|
295
|
+
# Enforces `allow` over `expect` when configuring a response.
|
296
|
+
RSpec/StubbedMock:
|
297
|
+
Enabled: false
|
298
|
+
|
299
|
+
# Enforces no use of `expect` in `before` hooks.
|
300
|
+
RSpec/ExpectInHook:
|
301
|
+
Enabled: false
|
302
|
+
|
303
|
+
# Enforces no stubbing using `allow_any_instance_of`.
|
304
|
+
RSpec/AnyInstance:
|
305
|
+
Enabled: false
|
306
|
+
|
307
|
+
# Enforces strict matching of example class with spec file name.
|
308
|
+
# This does not work for our current namespacing as our gem is called
|
309
|
+
# `ddtrace` while our namespace is `::Datadog`.
|
310
|
+
# It would have to either be `ddtrace` + `::DDTrace` or
|
311
|
+
# `datadog` + `::Datadog`.
|
312
|
+
RSpec/FilePath:
|
313
|
+
Enabled: false
|
314
|
+
|
315
|
+
# Enforces no stubbing of methods of the object under test.
|
316
|
+
RSpec/SubjectStub:
|
317
|
+
Enabled: false
|
318
|
+
|
319
|
+
# Enforces that the first argument to describe should
|
320
|
+
# be the class or module being tested.
|
321
|
+
RSpec/DescribeClass:
|
322
|
+
Enabled: false
|
323
|
+
|
324
|
+
# Enforces to no use let! to setup objects not referenced in tests.
|
325
|
+
# Fails to account for shared examples across files.
|
326
|
+
RSpec/LetSetup:
|
327
|
+
Enabled: false
|
328
|
+
|
329
|
+
# Identifies where `fetch(key) { value }` can be replaced by `fetch(key, value)`.
|
330
|
+
# Can't differentiate between `Hash#fetch` and `RailsCache#fetch`,
|
331
|
+
# passing in wrong parameters to these methods.
|
332
|
+
Style/RedundantFetchBlock:
|
333
|
+
Enabled: false
|
334
|
+
|
335
|
+
# Warns about usage of `before(:all)`
|
336
|
+
RSpec/BeforeAfterAll:
|
337
|
+
Enabled: false
|
338
|
+
|
339
|
+
# Enforces snake case file names.
|
340
|
+
Naming/FileName:
|
341
|
+
Exclude:
|
342
|
+
- 'integration/**/Gemfile'
|
343
|
+
- 'integration/**/Rakefile'
|
344
|
+
|
345
|
+
# Enforces boolean parameters with default to be keyword arguments.
|
346
|
+
Style/OptionalBooleanParameter:
|
347
|
+
Enabled: false
|