ddtrace 1.14.0 → 1.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +178 -2
- data/ext/ddtrace_profiling_native_extension/NativeExtensionDesign.md +3 -5
- data/ext/ddtrace_profiling_native_extension/clock_id.h +0 -3
- data/ext/ddtrace_profiling_native_extension/clock_id_from_pthread.c +0 -22
- data/ext/ddtrace_profiling_native_extension/clock_id_noop.c +0 -1
- data/ext/ddtrace_profiling_native_extension/collectors_cpu_and_wall_time_worker.c +41 -6
- data/ext/ddtrace_profiling_native_extension/collectors_idle_sampling_helper.c +3 -0
- data/ext/ddtrace_profiling_native_extension/collectors_stack.c +76 -24
- data/ext/ddtrace_profiling_native_extension/collectors_stack.h +1 -1
- data/ext/ddtrace_profiling_native_extension/collectors_thread_context.c +207 -32
- data/ext/ddtrace_profiling_native_extension/collectors_thread_context.h +1 -1
- data/ext/ddtrace_profiling_native_extension/extconf.rb +8 -2
- data/ext/ddtrace_profiling_native_extension/http_transport.c +26 -10
- data/ext/ddtrace_profiling_native_extension/libdatadog_helpers.c +42 -0
- data/ext/ddtrace_profiling_native_extension/libdatadog_helpers.h +6 -0
- data/ext/ddtrace_profiling_native_extension/native_extension_helpers.rb +1 -16
- data/ext/ddtrace_profiling_native_extension/pid_controller.c +57 -0
- data/ext/ddtrace_profiling_native_extension/pid_controller.h +45 -0
- data/ext/ddtrace_profiling_native_extension/private_vm_api_access.c +17 -12
- data/ext/ddtrace_profiling_native_extension/profiling.c +0 -2
- data/ext/ddtrace_profiling_native_extension/stack_recorder.c +74 -37
- data/ext/ddtrace_profiling_native_extension/stack_recorder.h +13 -3
- data/lib/datadog/appsec/assets/waf_rules/processors.json +92 -0
- data/lib/datadog/appsec/assets/waf_rules/recommended.json +698 -75
- data/lib/datadog/appsec/assets/waf_rules/scanners.json +114 -0
- data/lib/datadog/appsec/assets/waf_rules/strict.json +98 -8
- data/lib/datadog/appsec/assets.rb +8 -0
- data/lib/datadog/appsec/component.rb +9 -2
- data/lib/datadog/appsec/configuration/settings.rb +61 -2
- data/lib/datadog/appsec/contrib/rack/gateway/watcher.rb +8 -6
- data/lib/datadog/appsec/contrib/rack/reactive/request.rb +2 -7
- data/lib/datadog/appsec/contrib/rack/reactive/request_body.rb +2 -5
- data/lib/datadog/appsec/contrib/rack/reactive/response.rb +2 -5
- data/lib/datadog/appsec/contrib/rack/request_body_middleware.rb +3 -2
- data/lib/datadog/appsec/contrib/rack/request_middleware.rb +23 -9
- data/lib/datadog/appsec/contrib/rails/gateway/watcher.rb +3 -2
- data/lib/datadog/appsec/contrib/rails/patcher.rb +9 -3
- data/lib/datadog/appsec/contrib/rails/reactive/action.rb +2 -5
- data/lib/datadog/appsec/contrib/sinatra/gateway/watcher.rb +6 -4
- data/lib/datadog/appsec/contrib/sinatra/patcher.rb +13 -7
- data/lib/datadog/appsec/contrib/sinatra/reactive/routed.rb +2 -5
- data/lib/datadog/appsec/event.rb +106 -50
- data/lib/datadog/appsec/monitor/gateway/watcher.rb +3 -3
- data/lib/datadog/appsec/monitor/reactive/set_user.rb +2 -5
- data/lib/datadog/appsec/processor/actions.rb +49 -0
- data/lib/datadog/appsec/processor/rule_merger.rb +22 -2
- data/lib/datadog/appsec/processor.rb +34 -6
- data/lib/datadog/appsec/remote.rb +4 -1
- data/lib/datadog/appsec/response.rb +82 -4
- data/lib/datadog/appsec/sample_rate.rb +21 -0
- data/lib/datadog/appsec.rb +2 -2
- data/lib/datadog/core/configuration/agent_settings_resolver.rb +29 -24
- data/lib/datadog/core/configuration/base.rb +1 -11
- data/lib/datadog/core/configuration/components.rb +7 -2
- data/lib/datadog/core/configuration/ext.rb +21 -0
- data/lib/datadog/core/configuration/option.rb +2 -4
- data/lib/datadog/core/configuration/option_definition.rb +17 -41
- data/lib/datadog/core/configuration/options.rb +5 -5
- data/lib/datadog/core/configuration/settings.rb +47 -45
- data/lib/datadog/core/environment/execution.rb +47 -9
- data/lib/datadog/core/environment/variable_helpers.rb +0 -69
- data/lib/datadog/core/error.rb +1 -0
- data/lib/datadog/core/git/ext.rb +2 -0
- data/lib/datadog/core/remote/client/capabilities.rb +1 -1
- data/lib/datadog/core/remote/component.rb +2 -2
- data/lib/datadog/core/remote/negotiation.rb +2 -2
- data/lib/datadog/core/remote/transport/config.rb +60 -0
- data/lib/datadog/core/remote/transport/http/api/instance.rb +39 -0
- data/lib/datadog/core/remote/transport/http/api/spec.rb +21 -0
- data/lib/datadog/core/remote/transport/http/api.rb +58 -0
- data/lib/datadog/core/remote/transport/http/builder.rb +219 -0
- data/lib/datadog/core/remote/transport/http/client.rb +48 -0
- data/lib/datadog/core/remote/transport/http/config.rb +280 -0
- data/lib/datadog/core/remote/transport/http/negotiation.rb +146 -0
- data/lib/datadog/core/remote/transport/http.rb +179 -0
- data/lib/datadog/core/{transport → remote/transport}/negotiation.rb +25 -23
- data/lib/datadog/core/telemetry/collector.rb +3 -2
- data/lib/datadog/core/telemetry/http/transport.rb +2 -1
- data/lib/datadog/core/transport/ext.rb +47 -0
- data/lib/datadog/core/transport/http/adapters/net.rb +168 -0
- data/lib/datadog/core/transport/http/adapters/registry.rb +29 -0
- data/lib/datadog/core/transport/http/adapters/test.rb +89 -0
- data/lib/datadog/core/transport/http/adapters/unix_socket.rb +83 -0
- data/lib/datadog/core/transport/http/api/endpoint.rb +31 -0
- data/lib/datadog/core/transport/http/api/fallbacks.rb +26 -0
- data/lib/datadog/core/transport/http/api/map.rb +18 -0
- data/lib/datadog/core/transport/http/env.rb +62 -0
- data/lib/datadog/core/transport/http/response.rb +60 -0
- data/lib/datadog/core/transport/parcel.rb +22 -0
- data/lib/datadog/core/transport/request.rb +17 -0
- data/lib/datadog/core/transport/response.rb +64 -0
- data/lib/datadog/core/workers/polling.rb +2 -2
- data/lib/datadog/opentelemetry/api/context.rb +10 -3
- data/lib/datadog/opentelemetry/sdk/propagator.rb +2 -1
- data/lib/datadog/opentelemetry/sdk/span_processor.rb +14 -2
- data/lib/datadog/opentelemetry/sdk/trace/span.rb +68 -0
- data/lib/datadog/opentelemetry/trace.rb +58 -0
- data/lib/datadog/opentelemetry.rb +1 -0
- data/lib/datadog/opentracer.rb +9 -0
- data/lib/datadog/profiling/collectors/cpu_and_wall_time_worker.rb +12 -18
- data/lib/datadog/profiling/collectors/idle_sampling_helper.rb +1 -1
- data/lib/datadog/profiling/collectors/thread_context.rb +9 -1
- data/lib/datadog/profiling/component.rb +24 -99
- data/lib/datadog/profiling/ext.rb +0 -12
- data/lib/datadog/profiling/flush.rb +0 -3
- data/lib/datadog/profiling/http_transport.rb +6 -3
- data/lib/datadog/profiling/native_extension.rb +0 -21
- data/lib/datadog/profiling/profiler.rb +11 -12
- data/lib/datadog/profiling.rb +8 -81
- data/lib/datadog/tracing/component.rb +10 -4
- data/lib/datadog/tracing/configuration/agent_settings_resolver.rb +13 -0
- data/lib/datadog/tracing/configuration/ext.rb +4 -2
- data/lib/datadog/tracing/configuration/settings.rb +14 -7
- data/lib/datadog/tracing/contrib/action_pack/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/active_job/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/active_record/events/sql.rb +4 -0
- data/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb +104 -197
- data/lib/datadog/tracing/contrib/active_support/cache/patcher.rb +3 -0
- data/lib/datadog/tracing/contrib/aws/instrumentation.rb +7 -0
- data/lib/datadog/tracing/contrib/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/dalli/configuration/settings.rb +6 -0
- data/lib/datadog/tracing/contrib/dalli/ext.rb +7 -0
- data/lib/datadog/tracing/contrib/dalli/instrumentation.rb +9 -2
- data/lib/datadog/tracing/contrib/delayed_job/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/elasticsearch/patcher.rb +5 -0
- data/lib/datadog/tracing/contrib/ethon/easy_patch.rb +5 -0
- data/lib/datadog/tracing/contrib/ethon/multi_patch.rb +8 -0
- data/lib/datadog/tracing/contrib/excon/middleware.rb +5 -0
- data/lib/datadog/tracing/contrib/ext.rb +3 -0
- data/lib/datadog/tracing/contrib/faraday/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/faraday/middleware.rb +5 -0
- data/lib/datadog/tracing/contrib/grpc/configuration/settings.rb +21 -1
- data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/client.rb +11 -1
- data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/server.rb +18 -0
- data/lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb +0 -4
- data/lib/datadog/tracing/contrib/http/circuit_breaker.rb +3 -3
- data/lib/datadog/tracing/contrib/http/instrumentation.rb +5 -0
- data/lib/datadog/tracing/contrib/httpclient/instrumentation.rb +5 -0
- data/lib/datadog/tracing/contrib/httprb/instrumentation.rb +5 -0
- data/lib/datadog/tracing/contrib/mongodb/subscribers.rb +7 -0
- data/lib/datadog/tracing/contrib/mysql2/instrumentation.rb +13 -3
- data/lib/datadog/tracing/contrib/opensearch/integration.rb +2 -2
- data/lib/datadog/tracing/contrib/opensearch/patcher.rb +7 -0
- data/lib/datadog/tracing/contrib/pg/instrumentation.rb +5 -0
- data/lib/datadog/tracing/contrib/presto/instrumentation.rb +5 -0
- data/lib/datadog/tracing/contrib/propagation/sql_comment.rb +1 -1
- data/lib/datadog/tracing/contrib/que/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/racecar/event.rb +5 -0
- data/lib/datadog/tracing/contrib/rack/header_tagging.rb +14 -4
- data/lib/datadog/tracing/contrib/rails/configuration/settings.rb +4 -4
- data/lib/datadog/tracing/contrib/rake/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/redis/tags.rb +5 -0
- data/lib/datadog/tracing/contrib/resque/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/rest_client/request_patch.rb +5 -0
- data/lib/datadog/tracing/contrib/sequel/utils.rb +5 -0
- data/lib/datadog/tracing/contrib/shoryuken/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/sidekiq/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/sneakers/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/utils/quantization/http.rb +2 -2
- data/lib/datadog/tracing/distributed/propagation.rb +13 -33
- data/lib/datadog/tracing/metadata/tagging.rb +3 -3
- data/lib/datadog/tracing/sync_writer.rb +3 -3
- data/lib/datadog/tracing/tracer.rb +2 -0
- data/lib/datadog/{core → tracing}/transport/http/api/instance.rb +1 -1
- data/lib/datadog/{core → tracing}/transport/http/api/spec.rb +1 -1
- data/lib/datadog/tracing/transport/http/api.rb +43 -0
- data/lib/datadog/{core → tracing}/transport/http/builder.rb +13 -68
- data/lib/datadog/tracing/transport/http/client.rb +57 -0
- data/lib/datadog/tracing/transport/http/statistics.rb +47 -0
- data/lib/datadog/tracing/transport/http/traces.rb +152 -0
- data/lib/datadog/tracing/transport/http.rb +124 -0
- data/lib/datadog/tracing/transport/io/client.rb +89 -0
- data/lib/datadog/tracing/transport/io/response.rb +27 -0
- data/lib/datadog/tracing/transport/io/traces.rb +101 -0
- data/lib/datadog/tracing/transport/io.rb +30 -0
- data/lib/datadog/tracing/transport/serializable_trace.rb +126 -0
- data/lib/datadog/tracing/transport/statistics.rb +77 -0
- data/lib/datadog/tracing/transport/trace_formatter.rb +209 -0
- data/lib/datadog/tracing/transport/traces.rb +224 -0
- data/lib/datadog/tracing/workers/trace_writer.rb +5 -3
- data/lib/datadog/tracing/workers.rb +3 -2
- data/lib/datadog/tracing/writer.rb +5 -2
- data/lib/ddtrace/transport/ext.rb +17 -15
- data/lib/ddtrace/version.rb +1 -1
- data/lib/ddtrace.rb +1 -1
- metadata +72 -96
- data/lib/datadog/ci/configuration/components.rb +0 -32
- data/lib/datadog/ci/configuration/settings.rb +0 -51
- data/lib/datadog/ci/contrib/cucumber/configuration/settings.rb +0 -35
- data/lib/datadog/ci/contrib/cucumber/ext.rb +0 -22
- data/lib/datadog/ci/contrib/cucumber/formatter.rb +0 -94
- data/lib/datadog/ci/contrib/cucumber/instrumentation.rb +0 -28
- data/lib/datadog/ci/contrib/cucumber/integration.rb +0 -47
- data/lib/datadog/ci/contrib/cucumber/patcher.rb +0 -27
- data/lib/datadog/ci/contrib/minitest/configuration/settings.rb +0 -35
- data/lib/datadog/ci/contrib/minitest/ext.rb +0 -21
- data/lib/datadog/ci/contrib/minitest/integration.rb +0 -49
- data/lib/datadog/ci/contrib/minitest/patcher.rb +0 -27
- data/lib/datadog/ci/contrib/minitest/test_helper.rb +0 -68
- data/lib/datadog/ci/contrib/rspec/configuration/settings.rb +0 -35
- data/lib/datadog/ci/contrib/rspec/example.rb +0 -68
- data/lib/datadog/ci/contrib/rspec/ext.rb +0 -21
- data/lib/datadog/ci/contrib/rspec/integration.rb +0 -48
- data/lib/datadog/ci/contrib/rspec/patcher.rb +0 -27
- data/lib/datadog/ci/ext/app_types.rb +0 -9
- data/lib/datadog/ci/ext/environment.rb +0 -575
- data/lib/datadog/ci/ext/settings.rb +0 -10
- data/lib/datadog/ci/ext/test.rb +0 -35
- data/lib/datadog/ci/extensions.rb +0 -19
- data/lib/datadog/ci/flush.rb +0 -38
- data/lib/datadog/ci/test.rb +0 -81
- data/lib/datadog/ci.rb +0 -21
- data/lib/datadog/core/configuration/dependency_resolver.rb +0 -28
- data/lib/datadog/core/configuration/option_definition_set.rb +0 -22
- data/lib/datadog/core/configuration/option_set.rb +0 -10
- data/lib/datadog/core/transport/config.rb +0 -58
- data/lib/datadog/core/transport/http/api.rb +0 -57
- data/lib/datadog/core/transport/http/client.rb +0 -45
- data/lib/datadog/core/transport/http/config.rb +0 -278
- data/lib/datadog/core/transport/http/negotiation.rb +0 -144
- data/lib/datadog/core/transport/http.rb +0 -169
- data/lib/datadog/core/utils/object_set.rb +0 -43
- data/lib/datadog/core/utils/string_table.rb +0 -47
- data/lib/datadog/profiling/backtrace_location.rb +0 -34
- data/lib/datadog/profiling/buffer.rb +0 -43
- data/lib/datadog/profiling/collectors/old_stack.rb +0 -301
- data/lib/datadog/profiling/encoding/profile.rb +0 -41
- data/lib/datadog/profiling/event.rb +0 -15
- data/lib/datadog/profiling/events/stack.rb +0 -82
- data/lib/datadog/profiling/old_recorder.rb +0 -107
- data/lib/datadog/profiling/pprof/builder.rb +0 -125
- data/lib/datadog/profiling/pprof/converter.rb +0 -102
- data/lib/datadog/profiling/pprof/message_set.rb +0 -16
- data/lib/datadog/profiling/pprof/payload.rb +0 -20
- data/lib/datadog/profiling/pprof/pprof.proto +0 -212
- data/lib/datadog/profiling/pprof/pprof_pb.rb +0 -81
- data/lib/datadog/profiling/pprof/stack_sample.rb +0 -139
- data/lib/datadog/profiling/pprof/string_table.rb +0 -12
- data/lib/datadog/profiling/pprof/template.rb +0 -118
- data/lib/datadog/profiling/trace_identifiers/ddtrace.rb +0 -43
- data/lib/datadog/profiling/trace_identifiers/helper.rb +0 -45
- data/lib/ddtrace/transport/http/adapters/net.rb +0 -168
- data/lib/ddtrace/transport/http/adapters/registry.rb +0 -27
- data/lib/ddtrace/transport/http/adapters/test.rb +0 -85
- data/lib/ddtrace/transport/http/adapters/unix_socket.rb +0 -77
- data/lib/ddtrace/transport/http/api/endpoint.rb +0 -29
- data/lib/ddtrace/transport/http/api/fallbacks.rb +0 -24
- data/lib/ddtrace/transport/http/api/instance.rb +0 -35
- data/lib/ddtrace/transport/http/api/map.rb +0 -16
- data/lib/ddtrace/transport/http/api/spec.rb +0 -17
- data/lib/ddtrace/transport/http/api.rb +0 -39
- data/lib/ddtrace/transport/http/builder.rb +0 -176
- data/lib/ddtrace/transport/http/client.rb +0 -52
- data/lib/ddtrace/transport/http/env.rb +0 -58
- data/lib/ddtrace/transport/http/response.rb +0 -58
- data/lib/ddtrace/transport/http/statistics.rb +0 -43
- data/lib/ddtrace/transport/http/traces.rb +0 -144
- data/lib/ddtrace/transport/http.rb +0 -117
- data/lib/ddtrace/transport/io/client.rb +0 -85
- data/lib/ddtrace/transport/io/response.rb +0 -25
- data/lib/ddtrace/transport/io/traces.rb +0 -99
- data/lib/ddtrace/transport/io.rb +0 -28
- data/lib/ddtrace/transport/parcel.rb +0 -20
- data/lib/ddtrace/transport/request.rb +0 -15
- data/lib/ddtrace/transport/response.rb +0 -60
- data/lib/ddtrace/transport/serializable_trace.rb +0 -122
- data/lib/ddtrace/transport/statistics.rb +0 -75
- data/lib/ddtrace/transport/trace_formatter.rb +0 -207
- data/lib/ddtrace/transport/traces.rb +0 -216
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddtrace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|
@@ -30,42 +30,56 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.2.
|
33
|
+
version: 3.2.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.2.
|
40
|
+
version: 3.2.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: libddwaf
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.14.0.0.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.14.0.0.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: libdatadog
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 5.0.0.1.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 5.0.0.1.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: datadog-ci
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.2.0
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.2.0
|
69
83
|
description: |
|
70
84
|
ddtrace is Datadog's tracing client for Ruby. It is used to trace requests
|
71
85
|
as they flow across web servers, databases and microservices so that developers
|
@@ -105,8 +119,11 @@ files:
|
|
105
119
|
- ext/ddtrace_profiling_native_extension/extconf.rb
|
106
120
|
- ext/ddtrace_profiling_native_extension/helpers.h
|
107
121
|
- ext/ddtrace_profiling_native_extension/http_transport.c
|
122
|
+
- ext/ddtrace_profiling_native_extension/libdatadog_helpers.c
|
108
123
|
- ext/ddtrace_profiling_native_extension/libdatadog_helpers.h
|
109
124
|
- ext/ddtrace_profiling_native_extension/native_extension_helpers.rb
|
125
|
+
- ext/ddtrace_profiling_native_extension/pid_controller.c
|
126
|
+
- ext/ddtrace_profiling_native_extension/pid_controller.h
|
110
127
|
- ext/ddtrace_profiling_native_extension/private_vm_api_access.c
|
111
128
|
- ext/ddtrace_profiling_native_extension/private_vm_api_access.h
|
112
129
|
- ext/ddtrace_profiling_native_extension/profiling.c
|
@@ -124,7 +141,9 @@ files:
|
|
124
141
|
- lib/datadog/appsec/assets/blocked.json
|
125
142
|
- lib/datadog/appsec/assets/blocked.text
|
126
143
|
- lib/datadog/appsec/assets/waf_rules/README.md
|
144
|
+
- lib/datadog/appsec/assets/waf_rules/processors.json
|
127
145
|
- lib/datadog/appsec/assets/waf_rules/recommended.json
|
146
|
+
- lib/datadog/appsec/assets/waf_rules/scanners.json
|
128
147
|
- lib/datadog/appsec/assets/waf_rules/strict.json
|
129
148
|
- lib/datadog/appsec/autoload.rb
|
130
149
|
- lib/datadog/appsec/component.rb
|
@@ -180,6 +199,7 @@ files:
|
|
180
199
|
- lib/datadog/appsec/monitor/gateway/watcher.rb
|
181
200
|
- lib/datadog/appsec/monitor/reactive/set_user.rb
|
182
201
|
- lib/datadog/appsec/processor.rb
|
202
|
+
- lib/datadog/appsec/processor/actions.rb
|
183
203
|
- lib/datadog/appsec/processor/rule_loader.rb
|
184
204
|
- lib/datadog/appsec/processor/rule_merger.rb
|
185
205
|
- lib/datadog/appsec/rate_limiter.rb
|
@@ -189,37 +209,12 @@ files:
|
|
189
209
|
- lib/datadog/appsec/reactive/subscriber.rb
|
190
210
|
- lib/datadog/appsec/remote.rb
|
191
211
|
- lib/datadog/appsec/response.rb
|
212
|
+
- lib/datadog/appsec/sample_rate.rb
|
192
213
|
- lib/datadog/appsec/scope.rb
|
193
214
|
- lib/datadog/appsec/utils.rb
|
194
215
|
- lib/datadog/appsec/utils/http.rb
|
195
216
|
- lib/datadog/appsec/utils/http/media_range.rb
|
196
217
|
- lib/datadog/appsec/utils/http/media_type.rb
|
197
|
-
- lib/datadog/ci.rb
|
198
|
-
- lib/datadog/ci/configuration/components.rb
|
199
|
-
- lib/datadog/ci/configuration/settings.rb
|
200
|
-
- lib/datadog/ci/contrib/cucumber/configuration/settings.rb
|
201
|
-
- lib/datadog/ci/contrib/cucumber/ext.rb
|
202
|
-
- lib/datadog/ci/contrib/cucumber/formatter.rb
|
203
|
-
- lib/datadog/ci/contrib/cucumber/instrumentation.rb
|
204
|
-
- lib/datadog/ci/contrib/cucumber/integration.rb
|
205
|
-
- lib/datadog/ci/contrib/cucumber/patcher.rb
|
206
|
-
- lib/datadog/ci/contrib/minitest/configuration/settings.rb
|
207
|
-
- lib/datadog/ci/contrib/minitest/ext.rb
|
208
|
-
- lib/datadog/ci/contrib/minitest/integration.rb
|
209
|
-
- lib/datadog/ci/contrib/minitest/patcher.rb
|
210
|
-
- lib/datadog/ci/contrib/minitest/test_helper.rb
|
211
|
-
- lib/datadog/ci/contrib/rspec/configuration/settings.rb
|
212
|
-
- lib/datadog/ci/contrib/rspec/example.rb
|
213
|
-
- lib/datadog/ci/contrib/rspec/ext.rb
|
214
|
-
- lib/datadog/ci/contrib/rspec/integration.rb
|
215
|
-
- lib/datadog/ci/contrib/rspec/patcher.rb
|
216
|
-
- lib/datadog/ci/ext/app_types.rb
|
217
|
-
- lib/datadog/ci/ext/environment.rb
|
218
|
-
- lib/datadog/ci/ext/settings.rb
|
219
|
-
- lib/datadog/ci/ext/test.rb
|
220
|
-
- lib/datadog/ci/extensions.rb
|
221
|
-
- lib/datadog/ci/flush.rb
|
222
|
-
- lib/datadog/ci/test.rb
|
223
218
|
- lib/datadog/core.rb
|
224
219
|
- lib/datadog/core/backport.rb
|
225
220
|
- lib/datadog/core/buffer/cruby.rb
|
@@ -230,12 +225,9 @@ files:
|
|
230
225
|
- lib/datadog/core/configuration/agent_settings_resolver.rb
|
231
226
|
- lib/datadog/core/configuration/base.rb
|
232
227
|
- lib/datadog/core/configuration/components.rb
|
233
|
-
- lib/datadog/core/configuration/dependency_resolver.rb
|
234
228
|
- lib/datadog/core/configuration/ext.rb
|
235
229
|
- lib/datadog/core/configuration/option.rb
|
236
230
|
- lib/datadog/core/configuration/option_definition.rb
|
237
|
-
- lib/datadog/core/configuration/option_definition_set.rb
|
238
|
-
- lib/datadog/core/configuration/option_set.rb
|
239
231
|
- lib/datadog/core/configuration/options.rb
|
240
232
|
- lib/datadog/core/configuration/settings.rb
|
241
233
|
- lib/datadog/core/diagnostics/environment_logger.rb
|
@@ -280,6 +272,16 @@ files:
|
|
280
272
|
- lib/datadog/core/remote/dispatcher.rb
|
281
273
|
- lib/datadog/core/remote/ext.rb
|
282
274
|
- lib/datadog/core/remote/negotiation.rb
|
275
|
+
- lib/datadog/core/remote/transport/config.rb
|
276
|
+
- lib/datadog/core/remote/transport/http.rb
|
277
|
+
- lib/datadog/core/remote/transport/http/api.rb
|
278
|
+
- lib/datadog/core/remote/transport/http/api/instance.rb
|
279
|
+
- lib/datadog/core/remote/transport/http/api/spec.rb
|
280
|
+
- lib/datadog/core/remote/transport/http/builder.rb
|
281
|
+
- lib/datadog/core/remote/transport/http/client.rb
|
282
|
+
- lib/datadog/core/remote/transport/http/config.rb
|
283
|
+
- lib/datadog/core/remote/transport/http/negotiation.rb
|
284
|
+
- lib/datadog/core/remote/transport/negotiation.rb
|
283
285
|
- lib/datadog/core/remote/worker.rb
|
284
286
|
- lib/datadog/core/runtime/ext.rb
|
285
287
|
- lib/datadog/core/runtime/metrics.rb
|
@@ -304,27 +306,28 @@ files:
|
|
304
306
|
- lib/datadog/core/telemetry/v1/telemetry_request.rb
|
305
307
|
- lib/datadog/core/telemetry/v2/app_client_configuration_change.rb
|
306
308
|
- lib/datadog/core/telemetry/v2/request.rb
|
307
|
-
- lib/datadog/core/transport/
|
308
|
-
- lib/datadog/core/transport/http.rb
|
309
|
-
- lib/datadog/core/transport/http/
|
310
|
-
- lib/datadog/core/transport/http/
|
311
|
-
- lib/datadog/core/transport/http/
|
312
|
-
- lib/datadog/core/transport/http/
|
313
|
-
- lib/datadog/core/transport/http/
|
314
|
-
- lib/datadog/core/transport/http/
|
315
|
-
- lib/datadog/core/transport/http/
|
316
|
-
- lib/datadog/core/transport/
|
309
|
+
- lib/datadog/core/transport/ext.rb
|
310
|
+
- lib/datadog/core/transport/http/adapters/net.rb
|
311
|
+
- lib/datadog/core/transport/http/adapters/registry.rb
|
312
|
+
- lib/datadog/core/transport/http/adapters/test.rb
|
313
|
+
- lib/datadog/core/transport/http/adapters/unix_socket.rb
|
314
|
+
- lib/datadog/core/transport/http/api/endpoint.rb
|
315
|
+
- lib/datadog/core/transport/http/api/fallbacks.rb
|
316
|
+
- lib/datadog/core/transport/http/api/map.rb
|
317
|
+
- lib/datadog/core/transport/http/env.rb
|
318
|
+
- lib/datadog/core/transport/http/response.rb
|
319
|
+
- lib/datadog/core/transport/parcel.rb
|
320
|
+
- lib/datadog/core/transport/request.rb
|
321
|
+
- lib/datadog/core/transport/response.rb
|
317
322
|
- lib/datadog/core/utils.rb
|
318
323
|
- lib/datadog/core/utils/compression.rb
|
319
324
|
- lib/datadog/core/utils/duration.rb
|
320
325
|
- lib/datadog/core/utils/forking.rb
|
321
326
|
- lib/datadog/core/utils/hash.rb
|
322
327
|
- lib/datadog/core/utils/network.rb
|
323
|
-
- lib/datadog/core/utils/object_set.rb
|
324
328
|
- lib/datadog/core/utils/only_once.rb
|
325
329
|
- lib/datadog/core/utils/safe_dup.rb
|
326
330
|
- lib/datadog/core/utils/sequence.rb
|
327
|
-
- lib/datadog/core/utils/string_table.rb
|
328
331
|
- lib/datadog/core/utils/time.rb
|
329
332
|
- lib/datadog/core/vendor/ipaddr.rb
|
330
333
|
- lib/datadog/core/vendor/multipart-post/LICENSE
|
@@ -352,6 +355,8 @@ files:
|
|
352
355
|
- lib/datadog/opentelemetry/sdk/id_generator.rb
|
353
356
|
- lib/datadog/opentelemetry/sdk/propagator.rb
|
354
357
|
- lib/datadog/opentelemetry/sdk/span_processor.rb
|
358
|
+
- lib/datadog/opentelemetry/sdk/trace/span.rb
|
359
|
+
- lib/datadog/opentelemetry/trace.rb
|
355
360
|
- lib/datadog/opentracer.rb
|
356
361
|
- lib/datadog/opentracer/binary_propagator.rb
|
357
362
|
- lib/datadog/opentracer/carrier.rb
|
@@ -369,20 +374,14 @@ files:
|
|
369
374
|
- lib/datadog/opentracer/thread_local_scope_manager.rb
|
370
375
|
- lib/datadog/opentracer/tracer.rb
|
371
376
|
- lib/datadog/profiling.rb
|
372
|
-
- lib/datadog/profiling/backtrace_location.rb
|
373
|
-
- lib/datadog/profiling/buffer.rb
|
374
377
|
- lib/datadog/profiling/collectors/code_provenance.rb
|
375
378
|
- lib/datadog/profiling/collectors/cpu_and_wall_time_worker.rb
|
376
379
|
- lib/datadog/profiling/collectors/dynamic_sampling_rate.rb
|
377
380
|
- lib/datadog/profiling/collectors/idle_sampling_helper.rb
|
378
|
-
- lib/datadog/profiling/collectors/old_stack.rb
|
379
381
|
- lib/datadog/profiling/collectors/stack.rb
|
380
382
|
- lib/datadog/profiling/collectors/thread_context.rb
|
381
383
|
- lib/datadog/profiling/component.rb
|
382
384
|
- lib/datadog/profiling/diagnostics/environment_logger.rb
|
383
|
-
- lib/datadog/profiling/encoding/profile.rb
|
384
|
-
- lib/datadog/profiling/event.rb
|
385
|
-
- lib/datadog/profiling/events/stack.rb
|
386
385
|
- lib/datadog/profiling/exporter.rb
|
387
386
|
- lib/datadog/profiling/ext.rb
|
388
387
|
- lib/datadog/profiling/ext/forking.rb
|
@@ -390,16 +389,6 @@ files:
|
|
390
389
|
- lib/datadog/profiling/http_transport.rb
|
391
390
|
- lib/datadog/profiling/load_native_extension.rb
|
392
391
|
- lib/datadog/profiling/native_extension.rb
|
393
|
-
- lib/datadog/profiling/old_recorder.rb
|
394
|
-
- lib/datadog/profiling/pprof/builder.rb
|
395
|
-
- lib/datadog/profiling/pprof/converter.rb
|
396
|
-
- lib/datadog/profiling/pprof/message_set.rb
|
397
|
-
- lib/datadog/profiling/pprof/payload.rb
|
398
|
-
- lib/datadog/profiling/pprof/pprof.proto
|
399
|
-
- lib/datadog/profiling/pprof/pprof_pb.rb
|
400
|
-
- lib/datadog/profiling/pprof/stack_sample.rb
|
401
|
-
- lib/datadog/profiling/pprof/string_table.rb
|
402
|
-
- lib/datadog/profiling/pprof/template.rb
|
403
392
|
- lib/datadog/profiling/preload.rb
|
404
393
|
- lib/datadog/profiling/profiler.rb
|
405
394
|
- lib/datadog/profiling/scheduler.rb
|
@@ -408,13 +397,12 @@ files:
|
|
408
397
|
- lib/datadog/profiling/tasks/exec.rb
|
409
398
|
- lib/datadog/profiling/tasks/help.rb
|
410
399
|
- lib/datadog/profiling/tasks/setup.rb
|
411
|
-
- lib/datadog/profiling/trace_identifiers/ddtrace.rb
|
412
|
-
- lib/datadog/profiling/trace_identifiers/helper.rb
|
413
400
|
- lib/datadog/tracing.rb
|
414
401
|
- lib/datadog/tracing/analytics.rb
|
415
402
|
- lib/datadog/tracing/buffer.rb
|
416
403
|
- lib/datadog/tracing/client_ip.rb
|
417
404
|
- lib/datadog/tracing/component.rb
|
405
|
+
- lib/datadog/tracing/configuration/agent_settings_resolver.rb
|
418
406
|
- lib/datadog/tracing/configuration/dynamic.rb
|
419
407
|
- lib/datadog/tracing/configuration/dynamic/option.rb
|
420
408
|
- lib/datadog/tracing/configuration/ext.rb
|
@@ -851,6 +839,22 @@ files:
|
|
851
839
|
- lib/datadog/tracing/trace_operation.rb
|
852
840
|
- lib/datadog/tracing/trace_segment.rb
|
853
841
|
- lib/datadog/tracing/tracer.rb
|
842
|
+
- lib/datadog/tracing/transport/http.rb
|
843
|
+
- lib/datadog/tracing/transport/http/api.rb
|
844
|
+
- lib/datadog/tracing/transport/http/api/instance.rb
|
845
|
+
- lib/datadog/tracing/transport/http/api/spec.rb
|
846
|
+
- lib/datadog/tracing/transport/http/builder.rb
|
847
|
+
- lib/datadog/tracing/transport/http/client.rb
|
848
|
+
- lib/datadog/tracing/transport/http/statistics.rb
|
849
|
+
- lib/datadog/tracing/transport/http/traces.rb
|
850
|
+
- lib/datadog/tracing/transport/io.rb
|
851
|
+
- lib/datadog/tracing/transport/io/client.rb
|
852
|
+
- lib/datadog/tracing/transport/io/response.rb
|
853
|
+
- lib/datadog/tracing/transport/io/traces.rb
|
854
|
+
- lib/datadog/tracing/transport/serializable_trace.rb
|
855
|
+
- lib/datadog/tracing/transport/statistics.rb
|
856
|
+
- lib/datadog/tracing/transport/trace_formatter.rb
|
857
|
+
- lib/datadog/tracing/transport/traces.rb
|
854
858
|
- lib/datadog/tracing/utils.rb
|
855
859
|
- lib/datadog/tracing/workers.rb
|
856
860
|
- lib/datadog/tracing/workers/trace_writer.rb
|
@@ -860,34 +864,6 @@ files:
|
|
860
864
|
- lib/ddtrace/auto_instrument_base.rb
|
861
865
|
- lib/ddtrace/profiling/preload.rb
|
862
866
|
- lib/ddtrace/transport/ext.rb
|
863
|
-
- lib/ddtrace/transport/http.rb
|
864
|
-
- lib/ddtrace/transport/http/adapters/net.rb
|
865
|
-
- lib/ddtrace/transport/http/adapters/registry.rb
|
866
|
-
- lib/ddtrace/transport/http/adapters/test.rb
|
867
|
-
- lib/ddtrace/transport/http/adapters/unix_socket.rb
|
868
|
-
- lib/ddtrace/transport/http/api.rb
|
869
|
-
- lib/ddtrace/transport/http/api/endpoint.rb
|
870
|
-
- lib/ddtrace/transport/http/api/fallbacks.rb
|
871
|
-
- lib/ddtrace/transport/http/api/instance.rb
|
872
|
-
- lib/ddtrace/transport/http/api/map.rb
|
873
|
-
- lib/ddtrace/transport/http/api/spec.rb
|
874
|
-
- lib/ddtrace/transport/http/builder.rb
|
875
|
-
- lib/ddtrace/transport/http/client.rb
|
876
|
-
- lib/ddtrace/transport/http/env.rb
|
877
|
-
- lib/ddtrace/transport/http/response.rb
|
878
|
-
- lib/ddtrace/transport/http/statistics.rb
|
879
|
-
- lib/ddtrace/transport/http/traces.rb
|
880
|
-
- lib/ddtrace/transport/io.rb
|
881
|
-
- lib/ddtrace/transport/io/client.rb
|
882
|
-
- lib/ddtrace/transport/io/response.rb
|
883
|
-
- lib/ddtrace/transport/io/traces.rb
|
884
|
-
- lib/ddtrace/transport/parcel.rb
|
885
|
-
- lib/ddtrace/transport/request.rb
|
886
|
-
- lib/ddtrace/transport/response.rb
|
887
|
-
- lib/ddtrace/transport/serializable_trace.rb
|
888
|
-
- lib/ddtrace/transport/statistics.rb
|
889
|
-
- lib/ddtrace/transport/trace_formatter.rb
|
890
|
-
- lib/ddtrace/transport/traces.rb
|
891
867
|
- lib/ddtrace/version.rb
|
892
868
|
homepage: https://github.com/DataDog/dd-trace-rb
|
893
869
|
licenses:
|
@@ -913,7 +889,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
913
889
|
- !ruby/object:Gem::Version
|
914
890
|
version: 2.0.0
|
915
891
|
requirements: []
|
916
|
-
rubygems_version: 3.4.
|
892
|
+
rubygems_version: 3.4.19
|
917
893
|
signing_key:
|
918
894
|
specification_version: 4
|
919
895
|
summary: Datadog tracing code for your Ruby applications
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative '../flush'
|
4
|
-
|
5
|
-
module Datadog
|
6
|
-
module CI
|
7
|
-
module Configuration
|
8
|
-
# Adds CI behavior to Datadog trace components
|
9
|
-
module Components
|
10
|
-
def initialize(settings)
|
11
|
-
# Activate CI mode if enabled
|
12
|
-
activate_ci!(settings) if settings.ci.enabled
|
13
|
-
|
14
|
-
# Initialize normally
|
15
|
-
super
|
16
|
-
end
|
17
|
-
|
18
|
-
def activate_ci!(settings)
|
19
|
-
# Activate underlying tracing test mode
|
20
|
-
settings.tracing.test_mode.enabled = true
|
21
|
-
|
22
|
-
# Choose user defined TraceFlush or default to CI TraceFlush
|
23
|
-
settings.tracing.test_mode.trace_flush = settings.ci.trace_flush \
|
24
|
-
|| CI::Flush::Finished.new
|
25
|
-
|
26
|
-
# Pass through any other options
|
27
|
-
settings.tracing.test_mode.writer_options = settings.ci.writer_options
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
@@ -1,51 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative '../ext/settings'
|
4
|
-
|
5
|
-
module Datadog
|
6
|
-
module CI
|
7
|
-
module Configuration
|
8
|
-
# Adds CI behavior to Datadog trace settings
|
9
|
-
module Settings
|
10
|
-
def self.extended(base)
|
11
|
-
base = base.singleton_class unless base.is_a?(Class)
|
12
|
-
add_settings!(base)
|
13
|
-
end
|
14
|
-
|
15
|
-
def self.add_settings!(base)
|
16
|
-
base.class_eval do
|
17
|
-
settings :ci do
|
18
|
-
option :enabled do |o|
|
19
|
-
o.type :bool
|
20
|
-
o.env CI::Ext::Settings::ENV_MODE_ENABLED
|
21
|
-
o.default false
|
22
|
-
end
|
23
|
-
|
24
|
-
# DEV: Alias to Datadog::Tracing::Contrib::Extensions::Configuration::Settings#instrument.
|
25
|
-
# DEV: Should be removed when CI implement its own `c.ci.instrument`.
|
26
|
-
define_method(:instrument) do |integration_name, options = {}, &block|
|
27
|
-
Datadog.configuration.tracing.instrument(integration_name, options, &block)
|
28
|
-
end
|
29
|
-
|
30
|
-
# DEV: Alias to Datadog::Tracing::Contrib::Extensions::Configuration::Settings#instrument.
|
31
|
-
# DEV: Should be removed when CI implement its own `c.ci[]`.
|
32
|
-
define_method(:[]) do |integration_name, key = :default|
|
33
|
-
Datadog.configuration.tracing[integration_name, key]
|
34
|
-
end
|
35
|
-
|
36
|
-
# TODO: Deprecate in the next major version, as `instrument` better describes this method's purpose
|
37
|
-
alias_method :use, :instrument
|
38
|
-
|
39
|
-
option :trace_flush
|
40
|
-
|
41
|
-
option :writer_options do |o|
|
42
|
-
o.type :hash
|
43
|
-
o.default({})
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative '../../../../tracing/contrib/configuration/settings'
|
4
|
-
require_relative '../ext'
|
5
|
-
|
6
|
-
module Datadog
|
7
|
-
module CI
|
8
|
-
module Contrib
|
9
|
-
module Cucumber
|
10
|
-
module Configuration
|
11
|
-
# Custom settings for the Cucumber integration
|
12
|
-
# TODO: mark as `@public_api` when GA
|
13
|
-
class Settings < Datadog::Tracing::Contrib::Configuration::Settings
|
14
|
-
option :enabled do |o|
|
15
|
-
o.type :bool
|
16
|
-
o.env Ext::ENV_ENABLED
|
17
|
-
o.default true
|
18
|
-
end
|
19
|
-
|
20
|
-
option :service_name do |o|
|
21
|
-
o.type :string
|
22
|
-
o.default { Datadog.configuration.service_without_fallback || Ext::SERVICE_NAME }
|
23
|
-
end
|
24
|
-
|
25
|
-
option :operation_name do |o|
|
26
|
-
o.type :string
|
27
|
-
o.env Ext::ENV_OPERATION_NAME
|
28
|
-
o.default Ext::OPERATION_NAME
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Datadog
|
4
|
-
module CI
|
5
|
-
module Contrib
|
6
|
-
module Cucumber
|
7
|
-
# Cucumber integration constants
|
8
|
-
# TODO: mark as `@public_api` when GA, to protect from resource and tag name changes.
|
9
|
-
module Ext
|
10
|
-
APP = 'cucumber'
|
11
|
-
ENV_ENABLED = 'DD_TRACE_CUCUMBER_ENABLED'
|
12
|
-
ENV_OPERATION_NAME = 'DD_TRACE_CUCUMBER_OPERATION_NAME'
|
13
|
-
FRAMEWORK = 'cucumber'
|
14
|
-
OPERATION_NAME = 'cucumber.test'
|
15
|
-
SERVICE_NAME = 'cucumber'
|
16
|
-
STEP_SPAN_TYPE = 'step'
|
17
|
-
TEST_TYPE = 'test'
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,94 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative '../../test'
|
4
|
-
require_relative '../../ext/app_types'
|
5
|
-
require_relative '../../ext/environment'
|
6
|
-
require_relative '../../ext/test'
|
7
|
-
require_relative 'ext'
|
8
|
-
|
9
|
-
module Datadog
|
10
|
-
module CI
|
11
|
-
module Contrib
|
12
|
-
module Cucumber
|
13
|
-
# Defines collection of instrumented Cucumber events
|
14
|
-
class Formatter
|
15
|
-
attr_reader :config, :current_feature_span, :current_step_span
|
16
|
-
private :config
|
17
|
-
private :current_feature_span, :current_step_span
|
18
|
-
|
19
|
-
def initialize(config)
|
20
|
-
@config = config
|
21
|
-
|
22
|
-
bind_events(config)
|
23
|
-
end
|
24
|
-
|
25
|
-
def bind_events(config)
|
26
|
-
config.on_event :test_case_started, &method(:on_test_case_started)
|
27
|
-
config.on_event :test_case_finished, &method(:on_test_case_finished)
|
28
|
-
config.on_event :test_step_started, &method(:on_test_step_started)
|
29
|
-
config.on_event :test_step_finished, &method(:on_test_step_finished)
|
30
|
-
end
|
31
|
-
|
32
|
-
def on_test_case_started(event)
|
33
|
-
@current_feature_span = CI::Test.trace(
|
34
|
-
configuration[:operation_name],
|
35
|
-
{
|
36
|
-
span_options: {
|
37
|
-
resource: event.test_case.name,
|
38
|
-
service: configuration[:service_name]
|
39
|
-
},
|
40
|
-
framework: Ext::FRAMEWORK,
|
41
|
-
framework_version: CI::Contrib::Cucumber::Integration.version.to_s,
|
42
|
-
test_name: event.test_case.name,
|
43
|
-
test_suite: event.test_case.location.file,
|
44
|
-
test_type: Ext::TEST_TYPE
|
45
|
-
}
|
46
|
-
)
|
47
|
-
end
|
48
|
-
|
49
|
-
def on_test_case_finished(event)
|
50
|
-
return if @current_feature_span.nil?
|
51
|
-
|
52
|
-
if event.result.skipped?
|
53
|
-
CI::Test.skipped!(@current_feature_span)
|
54
|
-
elsif event.result.ok?
|
55
|
-
CI::Test.passed!(@current_feature_span)
|
56
|
-
elsif event.result.failed?
|
57
|
-
CI::Test.failed!(@current_feature_span)
|
58
|
-
end
|
59
|
-
|
60
|
-
@current_feature_span.finish
|
61
|
-
end
|
62
|
-
|
63
|
-
def on_test_step_started(event)
|
64
|
-
trace_options = {
|
65
|
-
resource: event.test_step.to_s,
|
66
|
-
span_type: Ext::STEP_SPAN_TYPE
|
67
|
-
}
|
68
|
-
@current_step_span = Tracing.trace(Ext::STEP_SPAN_TYPE, **trace_options)
|
69
|
-
end
|
70
|
-
|
71
|
-
def on_test_step_finished(event)
|
72
|
-
return if @current_step_span.nil?
|
73
|
-
|
74
|
-
if event.result.skipped?
|
75
|
-
CI::Test.skipped!(@current_step_span, event.result.exception)
|
76
|
-
elsif event.result.ok?
|
77
|
-
CI::Test.passed!(@current_step_span)
|
78
|
-
elsif event.result.failed?
|
79
|
-
CI::Test.failed!(@current_step_span, event.result.exception)
|
80
|
-
end
|
81
|
-
|
82
|
-
@current_step_span.finish
|
83
|
-
end
|
84
|
-
|
85
|
-
private
|
86
|
-
|
87
|
-
def configuration
|
88
|
-
Datadog.configuration.ci[:cucumber]
|
89
|
-
end
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
end
|
94
|
-
end
|
@@ -1,28 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'formatter'
|
4
|
-
|
5
|
-
module Datadog
|
6
|
-
module CI
|
7
|
-
module Contrib
|
8
|
-
module Cucumber
|
9
|
-
# Instrumentation for Cucumber
|
10
|
-
module Instrumentation
|
11
|
-
def self.included(base)
|
12
|
-
base.prepend(InstanceMethods)
|
13
|
-
end
|
14
|
-
|
15
|
-
# Instance methods for configuration
|
16
|
-
module InstanceMethods
|
17
|
-
attr_reader :datadog_formatter
|
18
|
-
|
19
|
-
def formatters
|
20
|
-
@datadog_formatter ||= CI::Contrib::Cucumber::Formatter.new(@configuration)
|
21
|
-
[@datadog_formatter] + super
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
@@ -1,47 +0,0 @@
|
|
1
|
-
require_relative '../../../tracing/contrib/integration'
|
2
|
-
|
3
|
-
require_relative 'configuration/settings'
|
4
|
-
require_relative 'patcher'
|
5
|
-
|
6
|
-
module Datadog
|
7
|
-
module CI
|
8
|
-
module Contrib
|
9
|
-
module Cucumber
|
10
|
-
# Description of Cucumber integration
|
11
|
-
class Integration
|
12
|
-
include Datadog::Tracing::Contrib::Integration
|
13
|
-
|
14
|
-
MINIMUM_VERSION = Gem::Version.new('3.0.0')
|
15
|
-
|
16
|
-
register_as :cucumber, auto_patch: true
|
17
|
-
|
18
|
-
def self.version
|
19
|
-
Gem.loaded_specs['cucumber'] \
|
20
|
-
&& Gem.loaded_specs['cucumber'].version
|
21
|
-
end
|
22
|
-
|
23
|
-
def self.loaded?
|
24
|
-
!defined?(::Cucumber).nil? && !defined?(::Cucumber::Runtime).nil?
|
25
|
-
end
|
26
|
-
|
27
|
-
def self.compatible?
|
28
|
-
super && version >= MINIMUM_VERSION
|
29
|
-
end
|
30
|
-
|
31
|
-
# test environments should not auto instrument test libraries
|
32
|
-
def auto_instrument?
|
33
|
-
false
|
34
|
-
end
|
35
|
-
|
36
|
-
def new_configuration
|
37
|
-
Configuration::Settings.new
|
38
|
-
end
|
39
|
-
|
40
|
-
def patcher
|
41
|
-
Patcher
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|