ls-trace 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +673 -0
- data/.circleci/images/primary/Dockerfile-2.0.0 +73 -0
- data/.circleci/images/primary/Dockerfile-2.1.10 +73 -0
- data/.circleci/images/primary/Dockerfile-2.2.10 +73 -0
- data/.circleci/images/primary/Dockerfile-2.3.8 +75 -0
- data/.circleci/images/primary/Dockerfile-2.4.6 +73 -0
- data/.circleci/images/primary/Dockerfile-2.5.6 +73 -0
- data/.circleci/images/primary/Dockerfile-2.6.4 +73 -0
- data/.dockerignore +1 -0
- data/.env +24 -0
- data/.github/CODEOWNERS +1 -0
- data/.gitignore +59 -0
- data/.rspec +1 -0
- data/.rubocop.yml +77 -0
- data/.yardopts +5 -0
- data/Appraisals +820 -0
- data/CHANGELOG.md +1051 -0
- data/CONTRIBUTING.md +85 -0
- data/Gemfile +7 -0
- data/LICENSE +24 -0
- data/README.md +108 -0
- data/Rakefile +635 -0
- data/benchmarks/postgres_database.yml +9 -0
- data/benchmarks/sidekiq_test.rb +154 -0
- data/ddtrace.gemspec +63 -0
- data/docker-compose.yml +276 -0
- data/docs/DevelopmentGuide.md +195 -0
- data/docs/GettingStarted.md +1981 -0
- data/lib/ddtrace.rb +63 -0
- data/lib/ddtrace/analytics.rb +29 -0
- data/lib/ddtrace/augmentation.rb +13 -0
- data/lib/ddtrace/augmentation/method_wrapper.rb +20 -0
- data/lib/ddtrace/augmentation/method_wrapping.rb +38 -0
- data/lib/ddtrace/augmentation/shim.rb +102 -0
- data/lib/ddtrace/buffer.rb +119 -0
- data/lib/ddtrace/configuration.rb +30 -0
- data/lib/ddtrace/configuration/base.rb +82 -0
- data/lib/ddtrace/configuration/dependency_resolver.rb +24 -0
- data/lib/ddtrace/configuration/option.rb +55 -0
- data/lib/ddtrace/configuration/option_definition.rb +127 -0
- data/lib/ddtrace/configuration/option_definition_set.rb +18 -0
- data/lib/ddtrace/configuration/option_set.rb +6 -0
- data/lib/ddtrace/configuration/options.rb +107 -0
- data/lib/ddtrace/configuration/pin_setup.rb +30 -0
- data/lib/ddtrace/configuration/settings.rb +105 -0
- data/lib/ddtrace/context.rb +284 -0
- data/lib/ddtrace/context_flush.rb +132 -0
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +144 -0
- data/lib/ddtrace/contrib/action_pack/action_controller/patcher.rb +37 -0
- data/lib/ddtrace/contrib/action_pack/configuration/settings.rb +27 -0
- data/lib/ddtrace/contrib/action_pack/ext.rb +16 -0
- data/lib/ddtrace/contrib/action_pack/integration.rb +36 -0
- data/lib/ddtrace/contrib/action_pack/patcher.rb +29 -0
- data/lib/ddtrace/contrib/action_pack/utils.rb +36 -0
- data/lib/ddtrace/contrib/action_view/configuration/settings.rb +26 -0
- data/lib/ddtrace/contrib/action_view/ext.rb +17 -0
- data/lib/ddtrace/contrib/action_view/instrumentation/partial_renderer.rb +78 -0
- data/lib/ddtrace/contrib/action_view/instrumentation/template_renderer.rb +167 -0
- data/lib/ddtrace/contrib/action_view/integration.rb +43 -0
- data/lib/ddtrace/contrib/action_view/patcher.rb +53 -0
- data/lib/ddtrace/contrib/action_view/utils.rb +32 -0
- data/lib/ddtrace/contrib/active_model_serializers/configuration/settings.rb +25 -0
- data/lib/ddtrace/contrib/active_model_serializers/event.rb +65 -0
- data/lib/ddtrace/contrib/active_model_serializers/events.rb +30 -0
- data/lib/ddtrace/contrib/active_model_serializers/events/render.rb +32 -0
- data/lib/ddtrace/contrib/active_model_serializers/events/serialize.rb +35 -0
- data/lib/ddtrace/contrib/active_model_serializers/ext.rb +17 -0
- data/lib/ddtrace/contrib/active_model_serializers/integration.rb +39 -0
- data/lib/ddtrace/contrib/active_model_serializers/patcher.rb +36 -0
- data/lib/ddtrace/contrib/active_record/configuration/resolver.rb +46 -0
- data/lib/ddtrace/contrib/active_record/configuration/settings.rb +30 -0
- data/lib/ddtrace/contrib/active_record/event.rb +30 -0
- data/lib/ddtrace/contrib/active_record/events.rb +30 -0
- data/lib/ddtrace/contrib/active_record/events/instantiation.rb +57 -0
- data/lib/ddtrace/contrib/active_record/events/sql.rb +64 -0
- data/lib/ddtrace/contrib/active_record/ext.rb +21 -0
- data/lib/ddtrace/contrib/active_record/integration.rb +44 -0
- data/lib/ddtrace/contrib/active_record/patcher.rb +29 -0
- data/lib/ddtrace/contrib/active_record/utils.rb +76 -0
- data/lib/ddtrace/contrib/active_support/cache/instrumentation.rb +157 -0
- data/lib/ddtrace/contrib/active_support/cache/patcher.rb +62 -0
- data/lib/ddtrace/contrib/active_support/cache/redis.rb +47 -0
- data/lib/ddtrace/contrib/active_support/configuration/settings.rb +25 -0
- data/lib/ddtrace/contrib/active_support/ext.rb +21 -0
- data/lib/ddtrace/contrib/active_support/integration.rb +38 -0
- data/lib/ddtrace/contrib/active_support/notifications/event.rb +62 -0
- data/lib/ddtrace/contrib/active_support/notifications/subscriber.rb +66 -0
- data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +159 -0
- data/lib/ddtrace/contrib/active_support/patcher.rb +29 -0
- data/lib/ddtrace/contrib/analytics.rb +20 -0
- data/lib/ddtrace/contrib/aws/configuration/settings.rb +25 -0
- data/lib/ddtrace/contrib/aws/ext.rb +20 -0
- data/lib/ddtrace/contrib/aws/instrumentation.rb +56 -0
- data/lib/ddtrace/contrib/aws/integration.rb +36 -0
- data/lib/ddtrace/contrib/aws/parsed_context.rb +56 -0
- data/lib/ddtrace/contrib/aws/patcher.rb +49 -0
- data/lib/ddtrace/contrib/aws/services.rb +115 -0
- data/lib/ddtrace/contrib/concurrent_ruby/configuration/settings.rb +15 -0
- data/lib/ddtrace/contrib/concurrent_ruby/context_composite_executor_service.rb +35 -0
- data/lib/ddtrace/contrib/concurrent_ruby/ext.rb +11 -0
- data/lib/ddtrace/contrib/concurrent_ruby/future_patch.rb +23 -0
- data/lib/ddtrace/contrib/concurrent_ruby/integration.rb +32 -0
- data/lib/ddtrace/contrib/concurrent_ruby/patcher.rb +35 -0
- data/lib/ddtrace/contrib/configurable.rb +59 -0
- data/lib/ddtrace/contrib/configuration/resolver.rb +12 -0
- data/lib/ddtrace/contrib/configuration/settings.rb +35 -0
- data/lib/ddtrace/contrib/dalli/configuration/settings.rb +25 -0
- data/lib/ddtrace/contrib/dalli/ext.rb +17 -0
- data/lib/ddtrace/contrib/dalli/instrumentation.rb +50 -0
- data/lib/ddtrace/contrib/dalli/integration.rb +36 -0
- data/lib/ddtrace/contrib/dalli/patcher.rb +73 -0
- data/lib/ddtrace/contrib/dalli/quantize.rb +22 -0
- data/lib/ddtrace/contrib/delayed_job/configuration/settings.rb +25 -0
- data/lib/ddtrace/contrib/delayed_job/ext.rb +18 -0
- data/lib/ddtrace/contrib/delayed_job/integration.rb +32 -0
- data/lib/ddtrace/contrib/delayed_job/patcher.rb +34 -0
- data/lib/ddtrace/contrib/delayed_job/plugin.rb +57 -0
- data/lib/ddtrace/contrib/elasticsearch/configuration/settings.rb +26 -0
- data/lib/ddtrace/contrib/elasticsearch/ext.rb +19 -0
- data/lib/ddtrace/contrib/elasticsearch/integration.rb +37 -0
- data/lib/ddtrace/contrib/elasticsearch/patcher.rb +124 -0
- data/lib/ddtrace/contrib/elasticsearch/quantize.rb +80 -0
- data/lib/ddtrace/contrib/ethon/configuration/settings.rb +26 -0
- data/lib/ddtrace/contrib/ethon/easy_patch.rb +139 -0
- data/lib/ddtrace/contrib/ethon/ext.rb +15 -0
- data/lib/ddtrace/contrib/ethon/integration.rb +31 -0
- data/lib/ddtrace/contrib/ethon/multi_patch.rb +80 -0
- data/lib/ddtrace/contrib/ethon/patcher.rb +27 -0
- data/lib/ddtrace/contrib/excon/configuration/settings.rb +28 -0
- data/lib/ddtrace/contrib/excon/ext.rb +14 -0
- data/lib/ddtrace/contrib/excon/integration.rb +32 -0
- data/lib/ddtrace/contrib/excon/middleware.rb +154 -0
- data/lib/ddtrace/contrib/excon/patcher.rb +34 -0
- data/lib/ddtrace/contrib/extensions.rb +59 -0
- data/lib/ddtrace/contrib/faraday/configuration/settings.rb +33 -0
- data/lib/ddtrace/contrib/faraday/ext.rb +14 -0
- data/lib/ddtrace/contrib/faraday/integration.rb +36 -0
- data/lib/ddtrace/contrib/faraday/middleware.rb +93 -0
- data/lib/ddtrace/contrib/faraday/patcher.rb +82 -0
- data/lib/ddtrace/contrib/faraday/rack_builder.rb +18 -0
- data/lib/ddtrace/contrib/grape/configuration/settings.rb +27 -0
- data/lib/ddtrace/contrib/grape/endpoint.rb +199 -0
- data/lib/ddtrace/contrib/grape/ext.rb +19 -0
- data/lib/ddtrace/contrib/grape/instrumentation.rb +33 -0
- data/lib/ddtrace/contrib/grape/integration.rb +36 -0
- data/lib/ddtrace/contrib/grape/patcher.rb +79 -0
- data/lib/ddtrace/contrib/graphql/configuration/settings.rb +27 -0
- data/lib/ddtrace/contrib/graphql/ext.rb +13 -0
- data/lib/ddtrace/contrib/graphql/integration.rb +38 -0
- data/lib/ddtrace/contrib/graphql/patcher.rb +63 -0
- data/lib/ddtrace/contrib/grpc/configuration/settings.rb +25 -0
- data/lib/ddtrace/contrib/grpc/datadog_interceptor.rb +74 -0
- data/lib/ddtrace/contrib/grpc/datadog_interceptor/client.rb +56 -0
- data/lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb +73 -0
- data/lib/ddtrace/contrib/grpc/ext.rb +15 -0
- data/lib/ddtrace/contrib/grpc/integration.rb +36 -0
- data/lib/ddtrace/contrib/grpc/intercept_with_datadog.rb +49 -0
- data/lib/ddtrace/contrib/grpc/patcher.rb +78 -0
- data/lib/ddtrace/contrib/http/circuit_breaker.rb +63 -0
- data/lib/ddtrace/contrib/http/configuration/settings.rb +26 -0
- data/lib/ddtrace/contrib/http/ext.rb +14 -0
- data/lib/ddtrace/contrib/http/instrumentation.rb +114 -0
- data/lib/ddtrace/contrib/http/integration.rb +32 -0
- data/lib/ddtrace/contrib/http/patcher.rb +32 -0
- data/lib/ddtrace/contrib/integration.rb +16 -0
- data/lib/ddtrace/contrib/mongodb/configuration/settings.rb +28 -0
- data/lib/ddtrace/contrib/mongodb/ext.rb +20 -0
- data/lib/ddtrace/contrib/mongodb/instrumentation.rb +68 -0
- data/lib/ddtrace/contrib/mongodb/integration.rb +36 -0
- data/lib/ddtrace/contrib/mongodb/parsers.rb +68 -0
- data/lib/ddtrace/contrib/mongodb/patcher.rb +37 -0
- data/lib/ddtrace/contrib/mongodb/subscribers.rb +108 -0
- data/lib/ddtrace/contrib/mysql2/configuration/settings.rb +25 -0
- data/lib/ddtrace/contrib/mysql2/ext.rb +15 -0
- data/lib/ddtrace/contrib/mysql2/instrumentation.rb +60 -0
- data/lib/ddtrace/contrib/mysql2/integration.rb +32 -0
- data/lib/ddtrace/contrib/mysql2/patcher.rb +33 -0
- data/lib/ddtrace/contrib/patchable.rb +42 -0
- data/lib/ddtrace/contrib/patcher.rb +28 -0
- data/lib/ddtrace/contrib/racecar/configuration/settings.rb +25 -0
- data/lib/ddtrace/contrib/racecar/event.rb +67 -0
- data/lib/ddtrace/contrib/racecar/events.rb +30 -0
- data/lib/ddtrace/contrib/racecar/events/batch.rb +27 -0
- data/lib/ddtrace/contrib/racecar/events/message.rb +27 -0
- data/lib/ddtrace/contrib/racecar/ext.rb +21 -0
- data/lib/ddtrace/contrib/racecar/integration.rb +36 -0
- data/lib/ddtrace/contrib/racecar/patcher.rb +32 -0
- data/lib/ddtrace/contrib/rack/configuration/settings.rb +41 -0
- data/lib/ddtrace/contrib/rack/ext.rb +18 -0
- data/lib/ddtrace/contrib/rack/integration.rb +32 -0
- data/lib/ddtrace/contrib/rack/middlewares.rb +283 -0
- data/lib/ddtrace/contrib/rack/patcher.rb +72 -0
- data/lib/ddtrace/contrib/rack/request_queue.rb +39 -0
- data/lib/ddtrace/contrib/rails/configuration/settings.rb +80 -0
- data/lib/ddtrace/contrib/rails/ext.rb +12 -0
- data/lib/ddtrace/contrib/rails/framework.rb +100 -0
- data/lib/ddtrace/contrib/rails/integration.rb +37 -0
- data/lib/ddtrace/contrib/rails/middlewares.rb +38 -0
- data/lib/ddtrace/contrib/rails/patcher.rb +78 -0
- data/lib/ddtrace/contrib/rails/railtie.rb +17 -0
- data/lib/ddtrace/contrib/rails/utils.rb +20 -0
- data/lib/ddtrace/contrib/rake/configuration/settings.rb +27 -0
- data/lib/ddtrace/contrib/rake/ext.rb +18 -0
- data/lib/ddtrace/contrib/rake/instrumentation.rb +84 -0
- data/lib/ddtrace/contrib/rake/integration.rb +32 -0
- data/lib/ddtrace/contrib/rake/patcher.rb +36 -0
- data/lib/ddtrace/contrib/redis/configuration/settings.rb +25 -0
- data/lib/ddtrace/contrib/redis/ext.rb +18 -0
- data/lib/ddtrace/contrib/redis/integration.rb +36 -0
- data/lib/ddtrace/contrib/redis/patcher.rb +94 -0
- data/lib/ddtrace/contrib/redis/quantize.rb +47 -0
- data/lib/ddtrace/contrib/redis/tags.rb +38 -0
- data/lib/ddtrace/contrib/registerable.rb +33 -0
- data/lib/ddtrace/contrib/registry.rb +42 -0
- data/lib/ddtrace/contrib/resque/configuration/settings.rb +26 -0
- data/lib/ddtrace/contrib/resque/ext.rb +14 -0
- data/lib/ddtrace/contrib/resque/integration.rb +37 -0
- data/lib/ddtrace/contrib/resque/patcher.rb +35 -0
- data/lib/ddtrace/contrib/resque/resque_job.rb +76 -0
- data/lib/ddtrace/contrib/rest_client/configuration/settings.rb +26 -0
- data/lib/ddtrace/contrib/rest_client/ext.rb +14 -0
- data/lib/ddtrace/contrib/rest_client/integration.rb +31 -0
- data/lib/ddtrace/contrib/rest_client/patcher.rb +25 -0
- data/lib/ddtrace/contrib/rest_client/request_patch.rb +89 -0
- data/lib/ddtrace/contrib/sequel/configuration/settings.rb +23 -0
- data/lib/ddtrace/contrib/sequel/database.rb +61 -0
- data/lib/ddtrace/contrib/sequel/dataset.rb +62 -0
- data/lib/ddtrace/contrib/sequel/ext.rb +15 -0
- data/lib/ddtrace/contrib/sequel/integration.rb +32 -0
- data/lib/ddtrace/contrib/sequel/patcher.rb +39 -0
- data/lib/ddtrace/contrib/sequel/utils.rb +46 -0
- data/lib/ddtrace/contrib/shoryuken/configuration/settings.rb +24 -0
- data/lib/ddtrace/contrib/shoryuken/ext.rb +18 -0
- data/lib/ddtrace/contrib/shoryuken/integration.rb +35 -0
- data/lib/ddtrace/contrib/shoryuken/patcher.rb +30 -0
- data/lib/ddtrace/contrib/shoryuken/tracer.rb +45 -0
- data/lib/ddtrace/contrib/sidekiq/client_tracer.rb +43 -0
- data/lib/ddtrace/contrib/sidekiq/configuration/settings.rb +26 -0
- data/lib/ddtrace/contrib/sidekiq/ext.rb +21 -0
- data/lib/ddtrace/contrib/sidekiq/integration.rb +36 -0
- data/lib/ddtrace/contrib/sidekiq/patcher.rb +40 -0
- data/lib/ddtrace/contrib/sidekiq/server_tracer.rb +58 -0
- data/lib/ddtrace/contrib/sidekiq/tracing.rb +28 -0
- data/lib/ddtrace/contrib/sinatra/configuration/settings.rb +34 -0
- data/lib/ddtrace/contrib/sinatra/env.rb +38 -0
- data/lib/ddtrace/contrib/sinatra/ext.rb +18 -0
- data/lib/ddtrace/contrib/sinatra/headers.rb +31 -0
- data/lib/ddtrace/contrib/sinatra/integration.rb +36 -0
- data/lib/ddtrace/contrib/sinatra/patcher.rb +33 -0
- data/lib/ddtrace/contrib/sinatra/tracer.rb +84 -0
- data/lib/ddtrace/contrib/sinatra/tracer_middleware.rb +72 -0
- data/lib/ddtrace/contrib/sucker_punch/configuration/settings.rb +25 -0
- data/lib/ddtrace/contrib/sucker_punch/exception_handler.rb +26 -0
- data/lib/ddtrace/contrib/sucker_punch/ext.rb +18 -0
- data/lib/ddtrace/contrib/sucker_punch/instrumentation.rb +70 -0
- data/lib/ddtrace/contrib/sucker_punch/integration.rb +36 -0
- data/lib/ddtrace/contrib/sucker_punch/patcher.rb +48 -0
- data/lib/ddtrace/correlation.rb +28 -0
- data/lib/ddtrace/diagnostics/health.rb +30 -0
- data/lib/ddtrace/distributed_tracing/headers/b3.rb +44 -0
- data/lib/ddtrace/distributed_tracing/headers/b3_single.rb +56 -0
- data/lib/ddtrace/distributed_tracing/headers/datadog.rb +42 -0
- data/lib/ddtrace/distributed_tracing/headers/headers.rb +70 -0
- data/lib/ddtrace/distributed_tracing/headers/helpers.rb +45 -0
- data/lib/ddtrace/encoding.rb +65 -0
- data/lib/ddtrace/environment.rb +23 -0
- data/lib/ddtrace/error.rb +27 -0
- data/lib/ddtrace/ext/analytics.rb +11 -0
- data/lib/ddtrace/ext/app_types.rb +11 -0
- data/lib/ddtrace/ext/diagnostics.rb +25 -0
- data/lib/ddtrace/ext/distributed.rb +33 -0
- data/lib/ddtrace/ext/errors.rb +10 -0
- data/lib/ddtrace/ext/forced_tracing.rb +25 -0
- data/lib/ddtrace/ext/http.rb +46 -0
- data/lib/ddtrace/ext/manual_tracing.rb +9 -0
- data/lib/ddtrace/ext/metrics.rb +15 -0
- data/lib/ddtrace/ext/net.rb +10 -0
- data/lib/ddtrace/ext/priority.rb +16 -0
- data/lib/ddtrace/ext/runtime.rb +26 -0
- data/lib/ddtrace/ext/sql.rb +8 -0
- data/lib/ddtrace/ext/transport.rb +17 -0
- data/lib/ddtrace/forced_tracing.rb +36 -0
- data/lib/ddtrace/logger.rb +39 -0
- data/lib/ddtrace/metrics.rb +215 -0
- data/lib/ddtrace/monkey.rb +58 -0
- data/lib/ddtrace/opentracer.rb +40 -0
- data/lib/ddtrace/opentracer/binary_propagator.rb +24 -0
- data/lib/ddtrace/opentracer/carrier.rb +6 -0
- data/lib/ddtrace/opentracer/distributed_headers.rb +52 -0
- data/lib/ddtrace/opentracer/global_tracer.rb +15 -0
- data/lib/ddtrace/opentracer/propagator.rb +22 -0
- data/lib/ddtrace/opentracer/rack_propagator.rb +60 -0
- data/lib/ddtrace/opentracer/scope.rb +15 -0
- data/lib/ddtrace/opentracer/scope_manager.rb +6 -0
- data/lib/ddtrace/opentracer/span.rb +98 -0
- data/lib/ddtrace/opentracer/span_context.rb +14 -0
- data/lib/ddtrace/opentracer/span_context_factory.rb +23 -0
- data/lib/ddtrace/opentracer/text_map_propagator.rb +75 -0
- data/lib/ddtrace/opentracer/thread_local_scope.rb +30 -0
- data/lib/ddtrace/opentracer/thread_local_scope_manager.rb +40 -0
- data/lib/ddtrace/opentracer/tracer.rb +208 -0
- data/lib/ddtrace/patcher.rb +47 -0
- data/lib/ddtrace/pin.rb +114 -0
- data/lib/ddtrace/pipeline.rb +46 -0
- data/lib/ddtrace/pipeline/span_filter.rb +38 -0
- data/lib/ddtrace/pipeline/span_processor.rb +20 -0
- data/lib/ddtrace/propagation/grpc_propagator.rb +61 -0
- data/lib/ddtrace/propagation/http_propagator.rb +75 -0
- data/lib/ddtrace/provider.rb +21 -0
- data/lib/ddtrace/quantization/hash.rb +103 -0
- data/lib/ddtrace/quantization/http.rb +86 -0
- data/lib/ddtrace/runtime/cgroup.rb +44 -0
- data/lib/ddtrace/runtime/class_count.rb +17 -0
- data/lib/ddtrace/runtime/container.rb +73 -0
- data/lib/ddtrace/runtime/gc.rb +16 -0
- data/lib/ddtrace/runtime/identity.rb +41 -0
- data/lib/ddtrace/runtime/metrics.rb +93 -0
- data/lib/ddtrace/runtime/object_space.rb +19 -0
- data/lib/ddtrace/runtime/socket.rb +14 -0
- data/lib/ddtrace/runtime/thread_count.rb +16 -0
- data/lib/ddtrace/sampler.rb +195 -0
- data/lib/ddtrace/span.rb +260 -0
- data/lib/ddtrace/sync_writer.rb +62 -0
- data/lib/ddtrace/tracer.rb +459 -0
- data/lib/ddtrace/transport/http.rb +91 -0
- data/lib/ddtrace/transport/http/adapters/net.rb +112 -0
- data/lib/ddtrace/transport/http/adapters/registry.rb +24 -0
- data/lib/ddtrace/transport/http/adapters/test.rb +77 -0
- data/lib/ddtrace/transport/http/adapters/unix_socket.rb +64 -0
- data/lib/ddtrace/transport/http/api.rb +46 -0
- data/lib/ddtrace/transport/http/api/endpoint.rb +27 -0
- data/lib/ddtrace/transport/http/api/fallbacks.rb +22 -0
- data/lib/ddtrace/transport/http/api/instance.rb +29 -0
- data/lib/ddtrace/transport/http/api/map.rb +14 -0
- data/lib/ddtrace/transport/http/api/spec.rb +15 -0
- data/lib/ddtrace/transport/http/builder.rb +165 -0
- data/lib/ddtrace/transport/http/client.rb +107 -0
- data/lib/ddtrace/transport/http/env.rb +48 -0
- data/lib/ddtrace/transport/http/response.rb +26 -0
- data/lib/ddtrace/transport/http/statistics.rb +30 -0
- data/lib/ddtrace/transport/http/traces.rb +140 -0
- data/lib/ddtrace/transport/parcel.rb +13 -0
- data/lib/ddtrace/transport/request.rb +13 -0
- data/lib/ddtrace/transport/response.rb +49 -0
- data/lib/ddtrace/transport/statistics.rb +72 -0
- data/lib/ddtrace/transport/traces.rb +33 -0
- data/lib/ddtrace/utils.rb +65 -0
- data/lib/ddtrace/utils/database.rb +25 -0
- data/lib/ddtrace/utils/time.rb +14 -0
- data/lib/ddtrace/vendor/active_record/connection_specification.rb +301 -0
- data/lib/ddtrace/version.rb +12 -0
- data/lib/ddtrace/workers.rb +125 -0
- data/lib/ddtrace/writer.rb +157 -0
- data/tasks/release_gem.rake +28 -0
- metadata +682 -0
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,85 @@
|
|
1
|
+
# Contributing
|
2
|
+
|
3
|
+
Community contributions to the Datadog tracing library for Ruby are welcome! See below for some basic guidelines.
|
4
|
+
|
5
|
+
## Want to request a new feature?
|
6
|
+
|
7
|
+
Many great ideas for new features come from the community, and we'd be happy to consider yours!
|
8
|
+
|
9
|
+
To share your request, you can [open a Github issue](https://github.com/DataDog/dd-trace-rb/issues/new) with the details about what you'd like to see. At a minimum, please provide:
|
10
|
+
|
11
|
+
- The goal of the new feature
|
12
|
+
- A description of how it might be used or behave
|
13
|
+
- Links to any important resources (e.g. Github repos, websites, screenshots, specifications, diagrams)
|
14
|
+
|
15
|
+
Additionally, if you can, include:
|
16
|
+
|
17
|
+
- A description of how it could be accomplished
|
18
|
+
- Code snippets that might demonstrate its use or implementation
|
19
|
+
- Screenshots or mockups that visually demonstrate the feature
|
20
|
+
- Links to similar features that would serve as a good comparison
|
21
|
+
- (Any other details that would be useful for implementing this feature!)
|
22
|
+
|
23
|
+
Feature requests will be reviewed, discussed, and then added to [our Community project](https://github.com/DataDog/dd-trace-rb/projects/2).
|
24
|
+
|
25
|
+
## Found a bug?
|
26
|
+
|
27
|
+
For any urgent matters (such as outages) or issues concerning the Datadog service or UI, contact our support team via https://docs.datadoghq.com/help/ for direct, faster assistance.
|
28
|
+
|
29
|
+
You may submit bug reports concerning the Datadog tracing library for Ruby by [opening a Github issue](https://github.com/DataDog/dd-trace-rb/issues/new). At a minimum, please provide:
|
30
|
+
|
31
|
+
- A description of the problem
|
32
|
+
- Steps to reproduce
|
33
|
+
- Expected behavior
|
34
|
+
- Actual behavior
|
35
|
+
- Errors (with stack traces) or warnings received
|
36
|
+
- Any details you can share about your configuration including:
|
37
|
+
- Ruby version & platform
|
38
|
+
- `ddtrace` version
|
39
|
+
- Versions of any other relevant gems (or a `Gemfile.lock` if available)
|
40
|
+
- Any configuration settings for the trace library (e.g. `initializers/datadog.rb`)
|
41
|
+
|
42
|
+
If at all possible, also provide:
|
43
|
+
|
44
|
+
- Logs (from the tracer/application/agent) or other diagnostics
|
45
|
+
- Screenshots, links, or other visual aids that are publicly accessible
|
46
|
+
- Code sample or test that reproduces the problem
|
47
|
+
- An explanation of what causes the bug and/or how it can be fixed
|
48
|
+
|
49
|
+
Reports that include rich detail are better, and ones with code that reproduce the bug are best. Bug requests are triaged, reviewed, and added to [our Community project](https://github.com/DataDog/dd-trace-rb/projects/2).
|
50
|
+
|
51
|
+
## Have a patch?
|
52
|
+
|
53
|
+
We welcome code contributions to the library, which you can [submit as a pull request](https://github.com/DataDog/dd-trace-rb/pull/new/master). To create a pull request:
|
54
|
+
|
55
|
+
1. **Fork the repository** from https://github.com/DataDog/dd-trace-rb
|
56
|
+
2. **Make any changes** for your patch.
|
57
|
+
3. **Write tests** that demonstrate how the feature works or how the bug is fixed.
|
58
|
+
4. **Update any documentation** such as `docs/GettingStarted.md`, especially for new features.
|
59
|
+
5. **Submit the pull request** from your fork back to https://github.com/DataDog/dd-trace-rb. Bugs should merge back to `master`, and new features should merge back to the latest `dev` branch (e.g. `0.24-dev`).
|
60
|
+
|
61
|
+
The pull request will be run through our CI pipeline, and a project member will review the changes with you. At a minimum, to be accepted and merged, pull requests must:
|
62
|
+
|
63
|
+
- Have a stated goal and detailed description of the changes made
|
64
|
+
- Include thorough test coverage and documentation, where applicable
|
65
|
+
- Pass all tests and code quality checks (linting/coverage/benchmarks) on CI
|
66
|
+
- Receive at least one approval from a project member with push permissions
|
67
|
+
|
68
|
+
We also recommend that you share in your description:
|
69
|
+
|
70
|
+
- Any motivations or intent for the contribution
|
71
|
+
- Links to any issues/pull requests it might be related to
|
72
|
+
- Links to any webpages or other external resources that might be related to the change
|
73
|
+
- Screenshots, code samples, or other visual aids that demonstrate the changes or how they are implemented
|
74
|
+
- Benchmarks if the feature is anticipated to have performance implications
|
75
|
+
- Any limitations, constraints or risks that are important to consider
|
76
|
+
|
77
|
+
Pull requests will be reviewed and added to [our Community project](https://github.com/DataDog/dd-trace-rb/projects/2).
|
78
|
+
|
79
|
+
For more information on common topics such as debugging locally, or how to write new integrations, check out [our development guide](https://github.com/DataDog/dd-trace-rb/docs/DevelopmentGuide.md). If at any point you have a question or need assistance with your pull request, feel free to mention a project member! We're always happy to help contributors with their pull requests.
|
80
|
+
|
81
|
+
## Final word
|
82
|
+
|
83
|
+
Many thanks to all of our contributors, and looking forward to seeing you on Github! :tada:
|
84
|
+
|
85
|
+
- Datadog Ruby APM Team
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
Copyright (c) 2016, Datadog <info@datadoghq.com>
|
2
|
+
All rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without
|
5
|
+
modification, are permitted provided that the following conditions are met:
|
6
|
+
* Redistributions of source code must retain the above copyright
|
7
|
+
notice, this list of conditions and the following disclaimer.
|
8
|
+
* Redistributions in binary form must reproduce the above copyright
|
9
|
+
notice, this list of conditions and the following disclaimer in the
|
10
|
+
documentation and/or other materials provided with the distribution.
|
11
|
+
* Neither the name of Datadog nor the
|
12
|
+
names of its contributors may be used to endorse or promote products
|
13
|
+
derived from this software without specific prior written permission.
|
14
|
+
|
15
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
16
|
+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
17
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
18
|
+
DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
|
19
|
+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
20
|
+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
21
|
+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
22
|
+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
23
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
24
|
+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/README.md
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
# LS Trace Client
|
2
|
+
|
3
|
+
[![CircleCI](https://circleci.com/gh/lightstep/dd-trace-rb/tree/master.svg?style=svg)](https://circleci.com/gh/lightstep/dd-trace-rb/tree/master)
|
4
|
+
|
5
|
+
Datadog has generously announced the [donation](https://www.datadoghq.com/blog/opentelemetry-instrumentation) of their tracer libraries to the [OpenTelemety](https://opentelemetry.io/), project. Auto-instrumentation is a core feature of these libraries, making it possible to create and collect telemetry data without needing to change your code. LightStep wants you to be able to use these libraries now! `ls-trace` is LightStep's fork of Datadog’s tracing client for Ruby. You can install and use it to take advantage of auto-instrumentation without waiting for OpenTelemetry. Each LightStep agent is [“pinned” to a Datadog release](#versioning) and is fully supported by LightStep’s Customer Success team.
|
6
|
+
|
7
|
+
## Getting Started
|
8
|
+
|
9
|
+
### Install the Gem
|
10
|
+
|
11
|
+
```
|
12
|
+
gem install ls-trace
|
13
|
+
```
|
14
|
+
|
15
|
+
### Configure the tracing client to send data to LightStep
|
16
|
+
|
17
|
+
To send data from your system to LightStep, you need to configure the tracing client to:
|
18
|
+
|
19
|
+
* Point to your satellites
|
20
|
+
* Send global tags required by LightStep to ingest and display your data
|
21
|
+
|
22
|
+
#### Send data to your satellites
|
23
|
+
|
24
|
+
##### On-Premise satellites
|
25
|
+
|
26
|
+
If your on-premise satellites accept data over plain HTTP, follow the instructions below. If they require HTTPS you will have to use the [LightStep reverse proxy][ls-reverse-proxy]. See the instructions for [public satellites](#public-satellites) for more details.
|
27
|
+
|
28
|
+
Set the following environment variables to the host and port of your satellite:
|
29
|
+
|
30
|
+
```
|
31
|
+
DD_AGENT_HOST=<Satellite host>
|
32
|
+
DD_TRACE_AGENT_PORT=<Satellite port>
|
33
|
+
```
|
34
|
+
|
35
|
+
##### Public satellites
|
36
|
+
|
37
|
+
LightStep's public satellites require data to be transmitted using HTTPS. Since Datadog's Ruby client transmits data over plain HTTP, you will have use the [LightStep reverse proxy][ls-reverse-proxy]. The reverse proxy will accept data over plain HTTP and forward it to the public satellites using HTTPS. By default the reverse proxy will forward requests to `ingest.lightstep.com`, but can be configured by passing additional options. See below for details.
|
38
|
+
|
39
|
+
To start the reverse proxy with defaults run:
|
40
|
+
|
41
|
+
```
|
42
|
+
docker run -p 8126:8126 lightstep/reverse-proxy:latest
|
43
|
+
```
|
44
|
+
|
45
|
+
You can see the complete list of options using the --help flag
|
46
|
+
|
47
|
+
```
|
48
|
+
docker run lightstep/reverse-proxy:latest --help
|
49
|
+
```
|
50
|
+
|
51
|
+
If you run the reverse proxy on `localhost` and port 8126 no additional configuration is needed. If you are running on a different host or port you'll need to set the following enviroment variables:
|
52
|
+
|
53
|
+
```
|
54
|
+
DD_AGENT_HOST=<proxy host>
|
55
|
+
DD_TRACE_AGENT_PORT=<proxy port>
|
56
|
+
```
|
57
|
+
|
58
|
+
#### Configure global tags
|
59
|
+
|
60
|
+
LightStep requires two global tags, `lightstep.service_name` and `lightstep.access_token` to be set on spans for ingest.
|
61
|
+
|
62
|
+
| Tag | Description |
|
63
|
+
|-----|--------|
|
64
|
+
| lightstep.service_name | The name of the service from which spans originate. Set this as a global tag so all spans emitted from the service have the same name. This tag allows LightStep to accurately report on your services, with features such as the [Service diagram][ls-service-diagram] and the [Service Directory][ls-service-directory].
|
65
|
+
| lightstep.access_token | The [access token][ls-access-tokens] for the project to report to. LightStep Satellites need this token to accept and store span data from the tracer. Reports from clients with invalid or deactivated access tokens will be rejected on ingress.
|
66
|
+
|
67
|
+
You can configure global tags when configuring the Datadog tracer. See the example below:
|
68
|
+
|
69
|
+
```
|
70
|
+
Datadog.configure do |c|
|
71
|
+
# setup integrations, etc...
|
72
|
+
c.tracer tags: {
|
73
|
+
'lightstep.service_name' => 'my-service-name',
|
74
|
+
'lightstep.access_token' => 'my-token'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
```
|
78
|
+
|
79
|
+
## Additional Resources
|
80
|
+
|
81
|
+
For an overview of using the LightStep Datadog Ruby Tracing Client see the [ruby auto-instrumentation overview][auto-instrumentation overview].
|
82
|
+
|
83
|
+
For installation, configuration, and details about using the API, check out our [API documentation][api docs]
|
84
|
+
|
85
|
+
## Versioning
|
86
|
+
|
87
|
+
ls-trace follows its own versioning scheme. The table below shows the corresponding dd-trace-rb versions.
|
88
|
+
|
89
|
+
| ls-trace version | dd-trace-rb version |
|
90
|
+
|------------------|---------------------|
|
91
|
+
| v0.1.1 | v0.29.0 |
|
92
|
+
|
93
|
+
## Support
|
94
|
+
|
95
|
+
Contact `support@lightstep.com` for additional questions and resources, or to be added to our community slack channel.
|
96
|
+
|
97
|
+
## Licensing
|
98
|
+
|
99
|
+
This is a fork of [dd-trace-rb][dd-trace-rb repo] and retains the original Datadog license and copyright. See the [license][license file] for more details.
|
100
|
+
|
101
|
+
[ls-reverse-proxy]: https://github.com/lightstep/reverse-proxy
|
102
|
+
[ls-service-diagram]: https://docs.lightstep.com/docs/view-service-hierarchy-and-performance
|
103
|
+
[ls-service-directory]: https://docs.lightstep.com/docs/view-individual-service-performance
|
104
|
+
[ls-access-tokens]: https://docs.lightstep.com/docs/create-and-use-access-tokens
|
105
|
+
[auto-instrumentation overview]: https://docs.lightstep.com/docs/ruby-auto-instrumentation#section-configure-libraries
|
106
|
+
[api docs]: https://github.com/lightstep/dd-trace-rb/blob/master/docs/GettingStarted.md
|
107
|
+
[dd-trace-rb repo]: https://github.com/DataDog/dd-trace-rb
|
108
|
+
[license file]: https://github.com/lightstep/dd-trace-rb/blob/master/LICENSE
|
data/Rakefile
ADDED
@@ -0,0 +1,635 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'ddtrace/version'
|
3
|
+
require 'rubocop/rake_task' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.1.0')
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
require 'rake/testtask'
|
6
|
+
require 'appraisal'
|
7
|
+
require 'yard'
|
8
|
+
|
9
|
+
Dir.glob('tasks/*.rake').each { |r| import r }
|
10
|
+
|
11
|
+
desc 'Run RSpec'
|
12
|
+
# rubocop:disable Metrics/BlockLength
|
13
|
+
namespace :spec do
|
14
|
+
task all: [:main,
|
15
|
+
:rails, :railsredis, :railssidekiq, :railsactivejob,
|
16
|
+
:elasticsearch, :http, :redis, :sidekiq, :sinatra]
|
17
|
+
|
18
|
+
RSpec::Core::RakeTask.new(:main) do |t, args|
|
19
|
+
t.pattern = 'spec/**/*_spec.rb'
|
20
|
+
t.exclude_pattern = 'spec/**/{contrib,benchmark,redis,opentracer}/**/*_spec.rb'
|
21
|
+
t.rspec_opts = args.to_a.join(' ')
|
22
|
+
end
|
23
|
+
|
24
|
+
RSpec::Core::RakeTask.new(:opentracer) do |t, args|
|
25
|
+
t.pattern = 'spec/ddtrace/opentracer/**/*_spec.rb'
|
26
|
+
t.rspec_opts = args.to_a.join(' ')
|
27
|
+
end
|
28
|
+
|
29
|
+
RSpec::Core::RakeTask.new(:rails) do |t, args|
|
30
|
+
t.pattern = 'spec/ddtrace/contrib/rails/**/*_spec.rb'
|
31
|
+
t.exclude_pattern = 'spec/ddtrace/contrib/rails/**/*{sidekiq,active_job,disable_env}*_spec.rb'
|
32
|
+
t.rspec_opts = args.to_a.join(' ')
|
33
|
+
end
|
34
|
+
|
35
|
+
RSpec::Core::RakeTask.new(:railsredis) do |t, args|
|
36
|
+
t.pattern = 'spec/ddtrace/contrib/rails/**/*redis*_spec.rb'
|
37
|
+
t.rspec_opts = args.to_a.join(' ')
|
38
|
+
end
|
39
|
+
|
40
|
+
RSpec::Core::RakeTask.new(:railssidekiq) do |t, args|
|
41
|
+
t.pattern = 'spec/ddtrace/contrib/rails/**/*sidekiq*_spec.rb'
|
42
|
+
t.rspec_opts = args.to_a.join(' ')
|
43
|
+
end
|
44
|
+
|
45
|
+
RSpec::Core::RakeTask.new(:railsactivejob) do |t, args|
|
46
|
+
t.pattern = 'spec/ddtrace/contrib/rails/**/*active_job*_spec.rb'
|
47
|
+
t.rspec_opts = args.to_a.join(' ')
|
48
|
+
end
|
49
|
+
|
50
|
+
RSpec::Core::RakeTask.new(:railsdisableenv) do |t, args|
|
51
|
+
t.pattern = 'spec/ddtrace/contrib/rails/**/*disable_env*_spec.rb'
|
52
|
+
t.rspec_opts = args.to_a.join(' ')
|
53
|
+
end
|
54
|
+
|
55
|
+
RSpec::Core::RakeTask.new(:contrib) do |t, args|
|
56
|
+
# rubocop:disable Metrics/LineLength
|
57
|
+
t.pattern = 'spec/**/contrib/{analytics,configurable,extensions,integration,patchable,patcher,registerable,registry,configuration/*}_spec.rb'
|
58
|
+
t.rspec_opts = args.to_a.join(' ')
|
59
|
+
end
|
60
|
+
|
61
|
+
[
|
62
|
+
:action_pack,
|
63
|
+
:action_view,
|
64
|
+
:active_model_serializers,
|
65
|
+
:active_record,
|
66
|
+
:active_support,
|
67
|
+
:aws,
|
68
|
+
:concurrent_ruby,
|
69
|
+
:dalli,
|
70
|
+
:delayed_job,
|
71
|
+
:elasticsearch,
|
72
|
+
:ethon,
|
73
|
+
:excon,
|
74
|
+
:faraday,
|
75
|
+
:grape,
|
76
|
+
:graphql,
|
77
|
+
:grpc,
|
78
|
+
:http,
|
79
|
+
:mongodb,
|
80
|
+
:mysql2,
|
81
|
+
:racecar,
|
82
|
+
:rack,
|
83
|
+
:rake,
|
84
|
+
:redis,
|
85
|
+
:resque,
|
86
|
+
:rest_client,
|
87
|
+
:sequel,
|
88
|
+
:sidekiq,
|
89
|
+
:sinatra,
|
90
|
+
:sucker_punch,
|
91
|
+
:shoryuken
|
92
|
+
].each do |contrib|
|
93
|
+
RSpec::Core::RakeTask.new(contrib) do |t, args|
|
94
|
+
t.pattern = "spec/ddtrace/contrib/#{contrib}/**/*_spec.rb"
|
95
|
+
t.rspec_opts = args.to_a.join(' ')
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
namespace :test do
|
101
|
+
task all: [:main,
|
102
|
+
:rails, :railsredis, :railssidekiq, :railsactivejob,
|
103
|
+
:sidekiq, :monkey]
|
104
|
+
|
105
|
+
Rake::TestTask.new(:main) do |t|
|
106
|
+
t.libs << %w[test lib]
|
107
|
+
t.test_files = FileList['test/**/*_test.rb'].reject do |path|
|
108
|
+
path.include?('contrib') ||
|
109
|
+
path.include?('benchmark') ||
|
110
|
+
path.include?('redis') ||
|
111
|
+
path.include?('monkey_test.rb')
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
Rake::TestTask.new(:rails) do |t|
|
116
|
+
t.libs << %w[test lib]
|
117
|
+
t.test_files = FileList['test/contrib/rails/**/*_test.rb'].reject do |path|
|
118
|
+
path.include?('redis') ||
|
119
|
+
path.include?('sidekiq') ||
|
120
|
+
path.include?('active_job') ||
|
121
|
+
path.include?('disable_env')
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
Rake::TestTask.new(:railsredis) do |t|
|
126
|
+
t.libs << %w[test lib]
|
127
|
+
t.test_files = FileList['test/contrib/rails/**/*redis*_test.rb']
|
128
|
+
end
|
129
|
+
|
130
|
+
Rake::TestTask.new(:railssidekiq) do |t|
|
131
|
+
t.libs << %w[test lib]
|
132
|
+
t.test_files = FileList['test/contrib/rails/**/*sidekiq*_test.rb']
|
133
|
+
end
|
134
|
+
|
135
|
+
Rake::TestTask.new(:railsactivejob) do |t|
|
136
|
+
t.libs << %w[test lib]
|
137
|
+
t.test_files = FileList['test/contrib/rails/**/*active_job*_test.rb']
|
138
|
+
end
|
139
|
+
|
140
|
+
Rake::TestTask.new(:railsdisableenv) do |t|
|
141
|
+
t.libs << %w[test lib]
|
142
|
+
t.test_files = FileList['test/contrib/rails/**/*disable_env*_test.rb']
|
143
|
+
end
|
144
|
+
|
145
|
+
[
|
146
|
+
:grape,
|
147
|
+
:sidekiq,
|
148
|
+
:sucker_punch
|
149
|
+
].each do |contrib|
|
150
|
+
Rake::TestTask.new(contrib) do |t|
|
151
|
+
t.libs << %w[test lib]
|
152
|
+
t.test_files = FileList["test/contrib/#{contrib}/*_test.rb"]
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
Rake::TestTask.new(:monkey) do |t|
|
157
|
+
t.libs << %w[test lib]
|
158
|
+
t.test_files = FileList['test/monkey_test.rb']
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
Rake::TestTask.new(:benchmark) do |t|
|
163
|
+
t.libs << %w[test lib]
|
164
|
+
t.test_files = FileList['test/benchmark_test.rb']
|
165
|
+
end
|
166
|
+
|
167
|
+
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.1.0')
|
168
|
+
RuboCop::RakeTask.new(:rubocop) do |t|
|
169
|
+
t.options << ['-D', '--force-exclusion']
|
170
|
+
t.patterns = ['lib/**/*.rb', 'test/**/*.rb', 'spec/**/*.rb', 'Gemfile', 'Rakefile']
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
YARD::Rake::YardocTask.new(:docs) do |t|
|
175
|
+
t.options += ['--title', "ddtrace #{Datadog::VERSION::STRING} documentation"]
|
176
|
+
t.options += ['--markup', 'markdown']
|
177
|
+
t.options += ['--markup-provider', 'redcarpet']
|
178
|
+
end
|
179
|
+
|
180
|
+
# Deploy tasks
|
181
|
+
S3_BUCKET = 'gems.datadoghq.com'.freeze
|
182
|
+
S3_DIR = ENV['S3_DIR']
|
183
|
+
|
184
|
+
desc 'release the docs website'
|
185
|
+
task :'release:docs' => :docs do
|
186
|
+
raise 'Missing environment variable S3_DIR' if !S3_DIR || S3_DIR.empty?
|
187
|
+
sh "aws s3 cp --recursive doc/ s3://#{S3_BUCKET}/#{S3_DIR}/docs/"
|
188
|
+
end
|
189
|
+
|
190
|
+
desc 'CI task; it runs all tests for current version of Ruby'
|
191
|
+
task :ci do
|
192
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new(Datadog::VERSION::MINIMUM_RUBY_VERSION)
|
193
|
+
raise NotImplementedError, "Ruby versions < #{Datadog::VERSION::MINIMUM_RUBY_VERSION} are not supported!"
|
194
|
+
elsif Gem::Version.new('2.0.0') <= Gem::Version.new(RUBY_VERSION) \
|
195
|
+
&& Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.1.0')
|
196
|
+
# Main library
|
197
|
+
sh 'bundle exec rake test:main'
|
198
|
+
sh 'bundle exec rake spec:main'
|
199
|
+
sh 'bundle exec rake spec:contrib'
|
200
|
+
|
201
|
+
if RUBY_PLATFORM != 'java'
|
202
|
+
# Contrib minitests
|
203
|
+
sh 'bundle exec appraisal contrib-old rake test:monkey'
|
204
|
+
sh 'bundle exec appraisal contrib-old rake test:sidekiq'
|
205
|
+
sh 'bundle exec appraisal contrib-old rake test:sucker_punch'
|
206
|
+
# Contrib specs
|
207
|
+
sh 'bundle exec appraisal contrib-old rake spec:active_model_serializers'
|
208
|
+
sh 'bundle exec appraisal contrib-old rake spec:active_record'
|
209
|
+
sh 'bundle exec appraisal contrib-old rake spec:active_support'
|
210
|
+
sh 'bundle exec appraisal contrib-old rake spec:aws'
|
211
|
+
sh 'bundle exec appraisal contrib-old rake spec:concurrent_ruby'
|
212
|
+
sh 'bundle exec appraisal contrib-old rake spec:dalli'
|
213
|
+
sh 'bundle exec appraisal contrib-old rake spec:delayed_job'
|
214
|
+
sh 'bundle exec appraisal contrib-old rake spec:elasticsearch'
|
215
|
+
sh 'bundle exec appraisal contrib-old rake spec:excon'
|
216
|
+
sh 'bundle exec appraisal contrib-old rake spec:faraday'
|
217
|
+
sh 'bundle exec appraisal contrib-old rake spec:http'
|
218
|
+
sh 'bundle exec appraisal contrib-old rake spec:mongodb'
|
219
|
+
sh 'bundle exec appraisal contrib-old rake spec:mysql2'
|
220
|
+
sh 'bundle exec appraisal contrib-old rake spec:rack'
|
221
|
+
sh 'bundle exec appraisal contrib-old rake spec:rake'
|
222
|
+
sh 'bundle exec appraisal contrib-old rake spec:redis'
|
223
|
+
sh 'bundle exec appraisal contrib-old rake spec:resque'
|
224
|
+
sh 'bundle exec appraisal contrib-old rake spec:rest_client'
|
225
|
+
sh 'bundle exec appraisal contrib-old rake spec:sequel'
|
226
|
+
sh 'bundle exec appraisal contrib-old rake spec:sinatra'
|
227
|
+
sh 'bundle exec appraisal contrib-old rake spec:ethon'
|
228
|
+
# Rails minitests
|
229
|
+
sh 'bundle exec appraisal rails30-postgres rake test:rails'
|
230
|
+
sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
|
231
|
+
sh 'bundle exec appraisal rails32-mysql2 rake test:rails'
|
232
|
+
sh 'bundle exec appraisal rails32-postgres rake test:rails'
|
233
|
+
sh 'bundle exec appraisal rails32-postgres-redis rake test:railsredis'
|
234
|
+
sh 'bundle exec appraisal rails32-postgres rake test:railsdisableenv'
|
235
|
+
sh 'bundle exec appraisal rails30-postgres-sidekiq rake test:railssidekiq'
|
236
|
+
sh 'bundle exec appraisal rails32-postgres-sidekiq rake test:railssidekiq'
|
237
|
+
# Rails specs
|
238
|
+
sh 'bundle exec appraisal rails30-postgres rake spec:rails'
|
239
|
+
sh 'bundle exec appraisal rails32-mysql2 rake spec:rails'
|
240
|
+
sh 'bundle exec appraisal rails32-postgres rake spec:rails'
|
241
|
+
# Rails suite specs
|
242
|
+
sh 'bundle exec appraisal rails32-postgres rake spec:action_pack'
|
243
|
+
sh 'bundle exec appraisal rails32-postgres rake spec:action_view'
|
244
|
+
sh 'bundle exec appraisal rails32-mysql2 rake spec:active_record'
|
245
|
+
sh 'bundle exec appraisal rails32-postgres rake spec:active_support'
|
246
|
+
end
|
247
|
+
elsif Gem::Version.new('2.1.0') <= Gem::Version.new(RUBY_VERSION) \
|
248
|
+
&& Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2.0')
|
249
|
+
# Main library
|
250
|
+
sh 'bundle exec rake test:main'
|
251
|
+
sh 'bundle exec rake spec:main'
|
252
|
+
sh 'bundle exec rake spec:contrib'
|
253
|
+
sh 'bundle exec rake spec:opentracer'
|
254
|
+
|
255
|
+
if RUBY_PLATFORM != 'java'
|
256
|
+
# Contrib minitests
|
257
|
+
sh 'bundle exec appraisal contrib-old rake test:monkey'
|
258
|
+
sh 'bundle exec appraisal contrib-old rake test:sidekiq'
|
259
|
+
sh 'bundle exec appraisal contrib-old rake test:sucker_punch'
|
260
|
+
# Contrib specs
|
261
|
+
sh 'bundle exec appraisal contrib-old rake spec:active_model_serializers'
|
262
|
+
sh 'bundle exec appraisal contrib-old rake spec:active_record'
|
263
|
+
sh 'bundle exec appraisal contrib-old rake spec:active_support'
|
264
|
+
sh 'bundle exec appraisal contrib-old rake spec:aws'
|
265
|
+
sh 'bundle exec appraisal contrib-old rake spec:concurrent_ruby'
|
266
|
+
sh 'bundle exec appraisal contrib-old rake spec:dalli'
|
267
|
+
sh 'bundle exec appraisal contrib-old rake spec:delayed_job'
|
268
|
+
sh 'bundle exec appraisal contrib-old rake spec:elasticsearch'
|
269
|
+
sh 'bundle exec appraisal contrib-old rake spec:excon'
|
270
|
+
sh 'bundle exec appraisal contrib-old rake spec:faraday'
|
271
|
+
sh 'bundle exec appraisal contrib-old rake spec:http'
|
272
|
+
sh 'bundle exec appraisal contrib-old rake spec:mongodb'
|
273
|
+
sh 'bundle exec appraisal contrib-old rake spec:mysql2'
|
274
|
+
sh 'bundle exec appraisal contrib-old rake spec:rack'
|
275
|
+
sh 'bundle exec appraisal contrib-old rake spec:rake'
|
276
|
+
sh 'bundle exec appraisal contrib-old rake spec:redis'
|
277
|
+
sh 'bundle exec appraisal contrib-old rake spec:resque'
|
278
|
+
sh 'bundle exec appraisal contrib-old rake spec:rest_client'
|
279
|
+
sh 'bundle exec appraisal contrib-old rake spec:sequel'
|
280
|
+
sh 'bundle exec appraisal contrib-old rake spec:sinatra'
|
281
|
+
sh 'bundle exec appraisal contrib-old rake spec:ethon'
|
282
|
+
# Rails minitests
|
283
|
+
sh 'bundle exec appraisal rails30-postgres rake test:rails'
|
284
|
+
sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
|
285
|
+
sh 'bundle exec appraisal rails32-mysql2 rake test:rails'
|
286
|
+
sh 'bundle exec appraisal rails32-postgres rake test:rails'
|
287
|
+
sh 'bundle exec appraisal rails32-postgres-redis rake test:railsredis'
|
288
|
+
sh 'bundle exec appraisal rails32-postgres rake test:railsdisableenv'
|
289
|
+
sh 'bundle exec appraisal rails4-mysql2 rake test:rails'
|
290
|
+
sh 'bundle exec appraisal rails4-postgres rake test:rails'
|
291
|
+
sh 'bundle exec appraisal rails4-postgres-redis rake test:railsredis'
|
292
|
+
sh 'bundle exec appraisal rails4-postgres rake test:railsdisableenv'
|
293
|
+
sh 'bundle exec appraisal rails30-postgres-sidekiq rake test:railssidekiq'
|
294
|
+
sh 'bundle exec appraisal rails32-postgres-sidekiq rake test:railssidekiq'
|
295
|
+
# Rails specs
|
296
|
+
sh 'bundle exec appraisal rails30-postgres rake spec:rails'
|
297
|
+
sh 'bundle exec appraisal rails32-mysql2 rake spec:rails'
|
298
|
+
sh 'bundle exec appraisal rails32-postgres rake spec:rails'
|
299
|
+
sh 'bundle exec appraisal rails4-mysql2 rake spec:rails'
|
300
|
+
sh 'bundle exec appraisal rails4-postgres rake spec:rails'
|
301
|
+
# Rails suite specs
|
302
|
+
sh 'bundle exec appraisal rails32-postgres rake spec:action_pack'
|
303
|
+
sh 'bundle exec appraisal rails32-postgres rake spec:action_view'
|
304
|
+
sh 'bundle exec appraisal rails32-mysql2 rake spec:active_record'
|
305
|
+
sh 'bundle exec appraisal rails32-postgres rake spec:active_support'
|
306
|
+
end
|
307
|
+
elsif Gem::Version.new('2.2.0') <= Gem::Version.new(RUBY_VERSION)\
|
308
|
+
&& Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.3.0')
|
309
|
+
# Main library
|
310
|
+
sh 'bundle exec rake test:main'
|
311
|
+
sh 'bundle exec rake spec:main'
|
312
|
+
sh 'bundle exec rake spec:contrib'
|
313
|
+
sh 'bundle exec rake spec:opentracer'
|
314
|
+
|
315
|
+
if RUBY_PLATFORM != 'java'
|
316
|
+
# Contrib minitests
|
317
|
+
sh 'bundle exec appraisal contrib rake test:grape'
|
318
|
+
sh 'bundle exec appraisal contrib rake test:sidekiq'
|
319
|
+
sh 'bundle exec appraisal contrib rake test:sucker_punch'
|
320
|
+
# Contrib specs
|
321
|
+
sh 'bundle exec appraisal contrib rake spec:action_pack'
|
322
|
+
sh 'bundle exec appraisal contrib rake spec:action_view'
|
323
|
+
sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
|
324
|
+
sh 'bundle exec appraisal contrib rake spec:active_record'
|
325
|
+
sh 'bundle exec appraisal contrib rake spec:active_support'
|
326
|
+
sh 'bundle exec appraisal contrib rake spec:aws'
|
327
|
+
sh 'bundle exec appraisal contrib rake spec:concurrent_ruby'
|
328
|
+
sh 'bundle exec appraisal contrib rake spec:dalli'
|
329
|
+
sh 'bundle exec appraisal contrib rake spec:delayed_job'
|
330
|
+
sh 'bundle exec appraisal contrib rake spec:elasticsearch'
|
331
|
+
sh 'bundle exec appraisal contrib rake spec:excon'
|
332
|
+
sh 'bundle exec appraisal contrib rake spec:faraday'
|
333
|
+
sh 'bundle exec appraisal contrib rake spec:graphql'
|
334
|
+
sh 'bundle exec appraisal contrib rake spec:grpc'
|
335
|
+
sh 'bundle exec appraisal contrib rake spec:http'
|
336
|
+
sh 'bundle exec appraisal contrib rake spec:mongodb'
|
337
|
+
sh 'bundle exec appraisal contrib rake spec:mysql2'
|
338
|
+
sh 'bundle exec appraisal contrib rake spec:racecar'
|
339
|
+
sh 'bundle exec appraisal contrib rake spec:rack'
|
340
|
+
sh 'bundle exec appraisal contrib rake spec:rake'
|
341
|
+
sh 'bundle exec appraisal contrib rake spec:redis'
|
342
|
+
sh 'bundle exec appraisal contrib rake spec:resque'
|
343
|
+
sh 'bundle exec appraisal contrib rake spec:rest_client'
|
344
|
+
sh 'bundle exec appraisal contrib rake spec:sequel'
|
345
|
+
sh 'bundle exec appraisal contrib rake spec:shoryuken'
|
346
|
+
sh 'bundle exec appraisal contrib rake spec:sinatra'
|
347
|
+
sh 'bundle exec appraisal contrib rake spec:ethon'
|
348
|
+
# Rails minitests
|
349
|
+
sh 'bundle exec appraisal rails30-postgres rake test:rails'
|
350
|
+
sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
|
351
|
+
sh 'bundle exec appraisal rails32-mysql2 rake test:rails'
|
352
|
+
sh 'bundle exec appraisal rails32-postgres rake test:rails'
|
353
|
+
sh 'bundle exec appraisal rails32-postgres-redis rake test:railsredis'
|
354
|
+
sh 'bundle exec appraisal rails32-postgres rake test:railsdisableenv'
|
355
|
+
sh 'bundle exec appraisal rails4-mysql2 rake test:rails'
|
356
|
+
sh 'bundle exec appraisal rails4-postgres rake test:rails'
|
357
|
+
sh 'bundle exec appraisal rails4-postgres-redis rake test:railsredis'
|
358
|
+
sh 'bundle exec appraisal rails4-postgres rake test:railsdisableenv'
|
359
|
+
sh 'bundle exec appraisal rails4-postgres-sidekiq rake test:railssidekiq'
|
360
|
+
sh 'bundle exec appraisal rails4-postgres-sidekiq rake test:railsactivejob'
|
361
|
+
sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
|
362
|
+
sh 'bundle exec appraisal rails5-postgres rake test:rails'
|
363
|
+
sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
|
364
|
+
sh 'bundle exec appraisal rails5-postgres-redis-activesupport rake test:railsredis'
|
365
|
+
sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
|
366
|
+
sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
|
367
|
+
sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
|
368
|
+
# Rails specs
|
369
|
+
sh 'bundle exec appraisal rails30-postgres rake spec:rails'
|
370
|
+
sh 'bundle exec appraisal rails32-mysql2 rake spec:rails'
|
371
|
+
sh 'bundle exec appraisal rails32-postgres rake spec:rails'
|
372
|
+
sh 'bundle exec appraisal rails4-mysql2 rake spec:rails'
|
373
|
+
sh 'bundle exec appraisal rails4-postgres rake spec:rails'
|
374
|
+
sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
|
375
|
+
sh 'bundle exec appraisal rails5-postgres rake spec:rails'
|
376
|
+
end
|
377
|
+
elsif Gem::Version.new('2.3.0') <= Gem::Version.new(RUBY_VERSION) \
|
378
|
+
&& Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.4.0')
|
379
|
+
# Main library
|
380
|
+
sh 'bundle exec rake test:main'
|
381
|
+
sh 'bundle exec rake spec:main'
|
382
|
+
sh 'bundle exec rake spec:contrib'
|
383
|
+
sh 'bundle exec rake spec:opentracer'
|
384
|
+
|
385
|
+
if RUBY_PLATFORM != 'java'
|
386
|
+
# Contrib minitests
|
387
|
+
sh 'bundle exec appraisal contrib rake test:grape'
|
388
|
+
sh 'bundle exec appraisal contrib rake test:sidekiq'
|
389
|
+
sh 'bundle exec appraisal contrib rake test:sucker_punch'
|
390
|
+
# Contrib specs
|
391
|
+
sh 'bundle exec appraisal contrib rake spec:action_pack'
|
392
|
+
sh 'bundle exec appraisal contrib rake spec:action_view'
|
393
|
+
sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
|
394
|
+
sh 'bundle exec appraisal contrib rake spec:active_record'
|
395
|
+
sh 'bundle exec appraisal contrib rake spec:active_support'
|
396
|
+
sh 'bundle exec appraisal contrib rake spec:aws'
|
397
|
+
sh 'bundle exec appraisal contrib rake spec:concurrent_ruby'
|
398
|
+
sh 'bundle exec appraisal contrib rake spec:dalli'
|
399
|
+
sh 'bundle exec appraisal contrib rake spec:delayed_job'
|
400
|
+
sh 'bundle exec appraisal contrib rake spec:elasticsearch'
|
401
|
+
sh 'bundle exec appraisal contrib rake spec:excon'
|
402
|
+
sh 'bundle exec appraisal contrib rake spec:faraday'
|
403
|
+
sh 'bundle exec appraisal contrib rake spec:graphql'
|
404
|
+
sh 'bundle exec appraisal contrib rake spec:grpc'
|
405
|
+
sh 'bundle exec appraisal contrib rake spec:http'
|
406
|
+
sh 'bundle exec appraisal contrib rake spec:mongodb'
|
407
|
+
sh 'bundle exec appraisal contrib rake spec:mysql2'
|
408
|
+
sh 'bundle exec appraisal contrib rake spec:racecar'
|
409
|
+
sh 'bundle exec appraisal contrib rake spec:rack'
|
410
|
+
sh 'bundle exec appraisal contrib rake spec:rake'
|
411
|
+
sh 'bundle exec appraisal contrib rake spec:redis'
|
412
|
+
sh 'bundle exec appraisal contrib rake spec:resque'
|
413
|
+
sh 'bundle exec appraisal contrib rake spec:rest_client'
|
414
|
+
sh 'bundle exec appraisal contrib rake spec:sequel'
|
415
|
+
sh 'bundle exec appraisal contrib rake spec:shoryuken'
|
416
|
+
sh 'bundle exec appraisal contrib rake spec:sinatra'
|
417
|
+
sh 'bundle exec appraisal contrib rake spec:ethon'
|
418
|
+
# Rails minitests
|
419
|
+
sh 'bundle exec appraisal rails30-postgres rake test:rails'
|
420
|
+
sh 'bundle exec appraisal rails30-postgres rake test:railsdisableenv'
|
421
|
+
sh 'bundle exec appraisal rails32-mysql2 rake test:rails'
|
422
|
+
sh 'bundle exec appraisal rails32-postgres rake test:rails'
|
423
|
+
sh 'bundle exec appraisal rails32-postgres-redis rake test:railsredis'
|
424
|
+
sh 'bundle exec appraisal rails32-postgres rake test:railsdisableenv'
|
425
|
+
sh 'bundle exec appraisal rails4-mysql2 rake test:rails'
|
426
|
+
sh 'bundle exec appraisal rails4-postgres rake test:rails'
|
427
|
+
sh 'bundle exec appraisal rails4-postgres-redis rake test:railsredis'
|
428
|
+
sh 'bundle exec appraisal rails4-postgres rake test:railsdisableenv'
|
429
|
+
sh 'bundle exec appraisal rails4-postgres-sidekiq rake test:railssidekiq'
|
430
|
+
sh 'bundle exec appraisal rails4-postgres-sidekiq rake test:railsactivejob'
|
431
|
+
sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
|
432
|
+
sh 'bundle exec appraisal rails5-postgres rake test:rails'
|
433
|
+
sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
|
434
|
+
sh 'bundle exec appraisal rails5-postgres-redis-activesupport rake test:railsredis'
|
435
|
+
sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
|
436
|
+
sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
|
437
|
+
sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
|
438
|
+
# Rails specs
|
439
|
+
sh 'bundle exec appraisal rails30-postgres rake spec:rails'
|
440
|
+
sh 'bundle exec appraisal rails32-mysql2 rake spec:rails'
|
441
|
+
sh 'bundle exec appraisal rails32-postgres rake spec:rails'
|
442
|
+
sh 'bundle exec appraisal rails4-mysql2 rake spec:rails'
|
443
|
+
sh 'bundle exec appraisal rails4-postgres rake spec:rails'
|
444
|
+
sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
|
445
|
+
sh 'bundle exec appraisal rails5-postgres rake spec:rails'
|
446
|
+
end
|
447
|
+
elsif Gem::Version.new('2.4.0') <= Gem::Version.new(RUBY_VERSION) \
|
448
|
+
&& Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.5.0')
|
449
|
+
# Main library
|
450
|
+
sh 'bundle exec rake test:main'
|
451
|
+
sh 'bundle exec rake spec:main'
|
452
|
+
sh 'bundle exec rake spec:contrib'
|
453
|
+
sh 'bundle exec rake spec:opentracer'
|
454
|
+
|
455
|
+
if RUBY_PLATFORM != 'java'
|
456
|
+
# Benchmarks
|
457
|
+
sh 'bundle exec rake benchmark'
|
458
|
+
# Contrib minitests
|
459
|
+
sh 'bundle exec appraisal contrib rake test:grape'
|
460
|
+
sh 'bundle exec appraisal contrib rake test:sidekiq'
|
461
|
+
sh 'bundle exec appraisal contrib rake test:sucker_punch'
|
462
|
+
# Contrib specs
|
463
|
+
sh 'bundle exec appraisal contrib rake spec:action_pack'
|
464
|
+
sh 'bundle exec appraisal contrib rake spec:action_view'
|
465
|
+
sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
|
466
|
+
sh 'bundle exec appraisal contrib rake spec:active_record'
|
467
|
+
sh 'bundle exec appraisal contrib rake spec:active_support'
|
468
|
+
sh 'bundle exec appraisal contrib rake spec:aws'
|
469
|
+
sh 'bundle exec appraisal contrib rake spec:concurrent_ruby'
|
470
|
+
sh 'bundle exec appraisal contrib rake spec:dalli'
|
471
|
+
sh 'bundle exec appraisal contrib rake spec:delayed_job'
|
472
|
+
sh 'bundle exec appraisal contrib rake spec:elasticsearch'
|
473
|
+
sh 'bundle exec appraisal contrib rake spec:excon'
|
474
|
+
sh 'bundle exec appraisal contrib rake spec:faraday'
|
475
|
+
sh 'bundle exec appraisal contrib rake spec:graphql'
|
476
|
+
sh 'bundle exec appraisal contrib rake spec:grpc'
|
477
|
+
sh 'bundle exec appraisal contrib rake spec:http'
|
478
|
+
sh 'bundle exec appraisal contrib rake spec:mongodb'
|
479
|
+
sh 'bundle exec appraisal contrib rake spec:mysql2'
|
480
|
+
sh 'bundle exec appraisal contrib rake spec:racecar'
|
481
|
+
sh 'bundle exec appraisal contrib rake spec:rack'
|
482
|
+
sh 'bundle exec appraisal contrib rake spec:rake'
|
483
|
+
sh 'bundle exec appraisal contrib rake spec:redis'
|
484
|
+
sh 'bundle exec appraisal contrib rake spec:resque'
|
485
|
+
sh 'bundle exec appraisal contrib rake spec:rest_client'
|
486
|
+
sh 'bundle exec appraisal contrib rake spec:sequel'
|
487
|
+
sh 'bundle exec appraisal contrib rake spec:shoryuken'
|
488
|
+
sh 'bundle exec appraisal contrib rake spec:sinatra'
|
489
|
+
sh 'bundle exec appraisal contrib rake spec:ethon'
|
490
|
+
# Rails minitests
|
491
|
+
# We only test Rails 5+ because older versions require Bundler < 2.0
|
492
|
+
sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
|
493
|
+
sh 'bundle exec appraisal rails5-postgres rake test:rails'
|
494
|
+
sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
|
495
|
+
sh 'bundle exec appraisal rails5-postgres-redis-activesupport rake test:railsredis'
|
496
|
+
sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
|
497
|
+
sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
|
498
|
+
sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
|
499
|
+
# Rails specs
|
500
|
+
sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
|
501
|
+
sh 'bundle exec appraisal rails5-postgres rake spec:rails'
|
502
|
+
end
|
503
|
+
elsif Gem::Version.new('2.5.0') <= Gem::Version.new(RUBY_VERSION) \
|
504
|
+
&& Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.6.0')
|
505
|
+
# Main library
|
506
|
+
sh 'bundle exec rake test:main'
|
507
|
+
sh 'bundle exec rake spec:main'
|
508
|
+
sh 'bundle exec rake spec:contrib'
|
509
|
+
sh 'bundle exec rake spec:opentracer'
|
510
|
+
|
511
|
+
if RUBY_PLATFORM != 'java'
|
512
|
+
# Benchmarks
|
513
|
+
sh 'bundle exec rake benchmark'
|
514
|
+
# Contrib minitests
|
515
|
+
sh 'bundle exec appraisal contrib rake test:grape'
|
516
|
+
sh 'bundle exec appraisal contrib rake test:sidekiq'
|
517
|
+
sh 'bundle exec appraisal contrib rake test:sucker_punch'
|
518
|
+
# Contrib specs
|
519
|
+
sh 'bundle exec appraisal contrib rake spec:action_pack'
|
520
|
+
sh 'bundle exec appraisal contrib rake spec:action_view'
|
521
|
+
sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
|
522
|
+
sh 'bundle exec appraisal contrib rake spec:active_record'
|
523
|
+
sh 'bundle exec appraisal contrib rake spec:active_support'
|
524
|
+
sh 'bundle exec appraisal contrib rake spec:aws'
|
525
|
+
sh 'bundle exec appraisal contrib rake spec:concurrent_ruby'
|
526
|
+
sh 'bundle exec appraisal contrib rake spec:dalli'
|
527
|
+
sh 'bundle exec appraisal contrib rake spec:delayed_job'
|
528
|
+
sh 'bundle exec appraisal contrib rake spec:elasticsearch'
|
529
|
+
sh 'bundle exec appraisal contrib rake spec:excon'
|
530
|
+
sh 'bundle exec appraisal contrib rake spec:faraday'
|
531
|
+
sh 'bundle exec appraisal contrib rake spec:graphql'
|
532
|
+
sh 'bundle exec appraisal contrib rake spec:grpc'
|
533
|
+
sh 'bundle exec appraisal contrib rake spec:http'
|
534
|
+
sh 'bundle exec appraisal contrib rake spec:mongodb'
|
535
|
+
sh 'bundle exec appraisal contrib rake spec:mysql2'
|
536
|
+
sh 'bundle exec appraisal contrib rake spec:racecar'
|
537
|
+
sh 'bundle exec appraisal contrib rake spec:rack'
|
538
|
+
sh 'bundle exec appraisal contrib rake spec:rake'
|
539
|
+
sh 'bundle exec appraisal contrib rake spec:redis'
|
540
|
+
sh 'bundle exec appraisal contrib rake spec:resque'
|
541
|
+
sh 'bundle exec appraisal contrib rake spec:rest_client'
|
542
|
+
sh 'bundle exec appraisal contrib rake spec:sequel'
|
543
|
+
sh 'bundle exec appraisal contrib rake spec:shoryuken'
|
544
|
+
sh 'bundle exec appraisal contrib rake spec:sinatra'
|
545
|
+
sh 'bundle exec appraisal contrib rake spec:ethon'
|
546
|
+
# Rails minitests
|
547
|
+
# We only test Rails 5+ because older versions require Bundler < 2.0
|
548
|
+
sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
|
549
|
+
sh 'bundle exec appraisal rails5-postgres rake test:rails'
|
550
|
+
sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
|
551
|
+
sh 'bundle exec appraisal rails5-postgres-redis-activesupport rake test:railsredis'
|
552
|
+
sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
|
553
|
+
sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
|
554
|
+
sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
|
555
|
+
sh 'bundle exec appraisal rails6-mysql2 rake test:rails'
|
556
|
+
sh 'bundle exec appraisal rails6-postgres rake test:rails'
|
557
|
+
sh 'bundle exec appraisal rails6-postgres-redis rake test:railsredis'
|
558
|
+
sh 'bundle exec appraisal rails6-postgres-redis-activesupport rake test:railsredis'
|
559
|
+
sh 'bundle exec appraisal rails6-postgres-sidekiq rake test:railssidekiq'
|
560
|
+
sh 'bundle exec appraisal rails6-postgres-sidekiq rake test:railsactivejob'
|
561
|
+
sh 'bundle exec appraisal rails6-postgres rake test:railsdisableenv'
|
562
|
+
# Rails specs
|
563
|
+
sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
|
564
|
+
sh 'bundle exec appraisal rails5-postgres rake spec:rails'
|
565
|
+
sh 'bundle exec appraisal rails6-mysql2 rake spec:rails'
|
566
|
+
sh 'bundle exec appraisal rails6-postgres rake spec:rails'
|
567
|
+
end
|
568
|
+
elsif Gem::Version.new('2.6.0') <= Gem::Version.new(RUBY_VERSION)
|
569
|
+
# Main library
|
570
|
+
sh 'bundle exec rake test:main'
|
571
|
+
sh 'bundle exec rake spec:main'
|
572
|
+
sh 'bundle exec rake spec:contrib'
|
573
|
+
sh 'bundle exec rake spec:opentracer'
|
574
|
+
|
575
|
+
if RUBY_PLATFORM != 'java'
|
576
|
+
# Benchmarks
|
577
|
+
sh 'bundle exec rake benchmark'
|
578
|
+
# Contrib minitests
|
579
|
+
sh 'bundle exec appraisal contrib rake test:grape'
|
580
|
+
sh 'bundle exec appraisal contrib rake test:sidekiq'
|
581
|
+
sh 'bundle exec appraisal contrib rake test:sucker_punch'
|
582
|
+
# Contrib specs
|
583
|
+
sh 'bundle exec appraisal contrib rake spec:action_pack'
|
584
|
+
sh 'bundle exec appraisal contrib rake spec:action_view'
|
585
|
+
sh 'bundle exec appraisal contrib rake spec:active_model_serializers'
|
586
|
+
sh 'bundle exec appraisal contrib rake spec:active_record'
|
587
|
+
sh 'bundle exec appraisal contrib rake spec:active_support'
|
588
|
+
sh 'bundle exec appraisal contrib rake spec:aws'
|
589
|
+
sh 'bundle exec appraisal contrib rake spec:concurrent_ruby'
|
590
|
+
sh 'bundle exec appraisal contrib rake spec:dalli'
|
591
|
+
sh 'bundle exec appraisal contrib rake spec:delayed_job'
|
592
|
+
sh 'bundle exec appraisal contrib rake spec:elasticsearch'
|
593
|
+
sh 'bundle exec appraisal contrib rake spec:excon'
|
594
|
+
sh 'bundle exec appraisal contrib rake spec:faraday'
|
595
|
+
sh 'bundle exec appraisal contrib rake spec:graphql'
|
596
|
+
sh 'bundle exec appraisal contrib rake spec:grpc'
|
597
|
+
sh 'bundle exec appraisal contrib rake spec:http'
|
598
|
+
sh 'bundle exec appraisal contrib rake spec:mongodb'
|
599
|
+
sh 'bundle exec appraisal contrib rake spec:mysql2'
|
600
|
+
sh 'bundle exec appraisal contrib rake spec:racecar'
|
601
|
+
sh 'bundle exec appraisal contrib rake spec:rack'
|
602
|
+
sh 'bundle exec appraisal contrib rake spec:rake'
|
603
|
+
sh 'bundle exec appraisal contrib rake spec:redis'
|
604
|
+
sh 'bundle exec appraisal contrib rake spec:resque'
|
605
|
+
sh 'bundle exec appraisal contrib rake spec:rest_client'
|
606
|
+
sh 'bundle exec appraisal contrib rake spec:sequel'
|
607
|
+
sh 'bundle exec appraisal contrib rake spec:shoryuken'
|
608
|
+
sh 'bundle exec appraisal contrib rake spec:sinatra'
|
609
|
+
sh 'bundle exec appraisal contrib rake spec:ethon'
|
610
|
+
# Rails minitests
|
611
|
+
# We only test Rails 5+ because older versions require Bundler < 2.0
|
612
|
+
sh 'bundle exec appraisal rails5-mysql2 rake test:rails'
|
613
|
+
sh 'bundle exec appraisal rails5-postgres rake test:rails'
|
614
|
+
sh 'bundle exec appraisal rails5-postgres-redis rake test:railsredis'
|
615
|
+
sh 'bundle exec appraisal rails5-postgres-redis-activesupport rake test:railsredis'
|
616
|
+
sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railssidekiq'
|
617
|
+
sh 'bundle exec appraisal rails5-postgres-sidekiq rake test:railsactivejob'
|
618
|
+
sh 'bundle exec appraisal rails5-postgres rake test:railsdisableenv'
|
619
|
+
sh 'bundle exec appraisal rails6-mysql2 rake test:rails'
|
620
|
+
sh 'bundle exec appraisal rails6-postgres rake test:rails'
|
621
|
+
sh 'bundle exec appraisal rails6-postgres-redis rake test:railsredis'
|
622
|
+
sh 'bundle exec appraisal rails6-postgres-redis-activesupport rake test:railsredis'
|
623
|
+
sh 'bundle exec appraisal rails6-postgres-sidekiq rake test:railssidekiq'
|
624
|
+
sh 'bundle exec appraisal rails6-postgres-sidekiq rake test:railsactivejob'
|
625
|
+
sh 'bundle exec appraisal rails6-postgres rake test:railsdisableenv'
|
626
|
+
# Rails specs
|
627
|
+
sh 'bundle exec appraisal rails5-mysql2 rake spec:rails'
|
628
|
+
sh 'bundle exec appraisal rails5-postgres rake spec:rails'
|
629
|
+
sh 'bundle exec appraisal rails6-mysql2 rake spec:rails'
|
630
|
+
sh 'bundle exec appraisal rails6-postgres rake spec:rails'
|
631
|
+
end
|
632
|
+
end
|
633
|
+
end
|
634
|
+
|
635
|
+
task default: :test
|