datadog 2.47.0 → 2.48.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +30 -1
- data/LICENSE-3rdparty.csv +1 -0
- data/ext/datadog_profiling_native_extension/collectors_stack.c +141 -101
- data/ext/datadog_profiling_native_extension/collectors_stack.h +9 -1
- data/ext/datadog_profiling_native_extension/collectors_thread_context.c +6 -1
- data/ext/datadog_profiling_native_extension/extconf.rb +7 -13
- data/ext/datadog_profiling_native_extension/native_extension_helpers.rb +3 -3
- data/ext/datadog_profiling_native_extension/private_vm_api_access.c +66 -13
- data/ext/datadog_profiling_native_extension/private_vm_api_access.h +5 -1
- data/ext/datadog_profiling_native_extension/profiling.c +1 -1
- data/ext/libdatadog_api/extconf.rb +9 -7
- data/ext/libdatadog_api/trace_exporter.c +34 -7
- data/ext/libdatadog_extconf_helpers.rb +1 -1
- data/lib/datadog/ai_guard/component.rb +1 -1
- data/lib/datadog/ai_guard/contrib/rack/request_middleware.rb +1 -9
- data/lib/datadog/ai_guard/contrib/rails/patcher.rb +1 -1
- data/lib/datadog/ai_guard/contrib/ruby_llm/message_adapter.rb +1 -1
- data/lib/datadog/ai_guard/contrib/ruby_llm/redaction_change_set.rb +3 -3
- data/lib/datadog/ai_guard/evaluation/client.rb +3 -3
- data/lib/datadog/ai_guard/evaluation.rb +2 -2
- data/lib/datadog/ai_guard/http_client.rb +3 -2
- data/lib/datadog/ai_guard/redaction.rb +1 -1
- data/lib/datadog/appsec/api_security/endpoint_collection/rails_collector.rb +1 -1
- data/lib/datadog/appsec/assets/waf_rules/README.md +3 -3
- data/lib/datadog/appsec/assets/waf_rules/recommended.json +5366 -1517
- data/lib/datadog/appsec/assets/waf_rules/strict.json +2 -2
- data/lib/datadog/appsec/autoload.rb +1 -1
- data/lib/datadog/appsec/component.rb +1 -1
- data/lib/datadog/appsec/compressed_json.rb +1 -1
- data/lib/datadog/appsec/configuration.rb +3 -3
- data/lib/datadog/appsec/context.rb +1 -1
- data/lib/datadog/appsec/contrib/active_record/instrumentation.rb +11 -1
- data/lib/datadog/appsec/contrib/active_record/patcher.rb +12 -4
- data/lib/datadog/appsec/contrib/aws_lambda/gateway/watcher.rb +2 -2
- data/lib/datadog/appsec/contrib/aws_lambda/waf_addresses.rb +1 -1
- data/lib/datadog/appsec/contrib/devise/configuration.rb +1 -1
- data/lib/datadog/appsec/contrib/devise/patches/signin_tracking_patch.rb +1 -1
- data/lib/datadog/appsec/contrib/devise/patches/signup_tracking_patch.rb +1 -1
- data/lib/datadog/appsec/contrib/devise/tracking_middleware.rb +1 -1
- data/lib/datadog/appsec/contrib/excon/ssrf_detection_middleware.rb +1 -1
- data/lib/datadog/appsec/contrib/faraday/ssrf_detection_middleware.rb +1 -1
- data/lib/datadog/appsec/contrib/graphql/gateway/multiplex.rb +7 -7
- data/lib/datadog/appsec/contrib/graphql/gateway/watcher.rb +1 -1
- data/lib/datadog/appsec/contrib/rack/gateway/watcher.rb +3 -3
- data/lib/datadog/appsec/contrib/rack/request_middleware.rb +5 -5
- data/lib/datadog/appsec/contrib/rails/gateway/watcher.rb +2 -2
- data/lib/datadog/appsec/contrib/rails/patcher.rb +2 -2
- data/lib/datadog/appsec/contrib/rest_client/request_ssrf_detection_patch.rb +1 -1
- data/lib/datadog/appsec/contrib/sinatra/gateway/watcher.rb +3 -3
- data/lib/datadog/appsec/contrib/sinatra/patcher.rb +1 -1
- data/lib/datadog/appsec/metrics/collector.rb +5 -5
- data/lib/datadog/appsec/metrics/telemetry_exporter.rb +3 -3
- data/lib/datadog/appsec/monitor/gateway/watcher.rb +2 -2
- data/lib/datadog/appsec/processor/rule_loader.rb +1 -1
- data/lib/datadog/appsec/response.rb +1 -1
- data/lib/datadog/appsec/security_engine/engine.rb +6 -6
- data/lib/datadog/appsec/security_engine/runner.rb +2 -2
- data/lib/datadog/appsec/trace_keeper.rb +1 -1
- data/lib/datadog/appsec.rb +1 -1
- data/lib/datadog/core/configuration/agent_settings_resolver.rb +14 -13
- data/lib/datadog/core/configuration/agentless_settings_resolver.rb +2 -2
- data/lib/datadog/core/configuration/components.rb +1 -1
- data/lib/datadog/core/configuration/settings.rb +5 -2
- data/lib/datadog/core/configuration/supported_configurations.rb +1 -0
- data/lib/datadog/core/configuration.rb +2 -2
- data/lib/datadog/core/crashtracking/component.rb +1 -1
- data/lib/datadog/core/diagnostics/environment_logger.rb +1 -1
- data/lib/datadog/core/environment/cgroup.rb +2 -2
- data/lib/datadog/core/environment/container.rb +3 -3
- data/lib/datadog/core/metrics/client.rb +6 -6
- data/lib/datadog/core/process_discovery.rb +1 -1
- data/lib/datadog/core/remote/tie/tracing.rb +4 -3
- data/lib/datadog/core/remote/transport/http.rb +2 -2
- data/lib/datadog/core/runtime/metrics.rb +14 -14
- data/lib/datadog/core/semaphore.rb +3 -1
- data/lib/datadog/core/telemetry/event/app_started.rb +9 -9
- data/lib/datadog/core/telemetry/logger.rb +1 -1
- data/lib/datadog/core/telemetry/logging.rb +1 -1
- data/lib/datadog/core/telemetry/request.rb +9 -3
- data/lib/datadog/core/telemetry/transport/http.rb +2 -2
- data/lib/datadog/core/telemetry/worker.rb +1 -1
- data/lib/datadog/core/transport/http/adapters/net.rb +1 -1
- data/lib/datadog/core/transport/http/adapters/unix_socket.rb +1 -1
- data/lib/datadog/core/transport/http/builder.rb +1 -1
- data/lib/datadog/core/transport/http.rb +3 -3
- data/lib/datadog/core/utils/at_fork_monkey_patch.rb +2 -2
- data/lib/datadog/core/workers/async.rb +1 -1
- data/lib/datadog/core/workers/runtime_metrics.rb +1 -1
- data/lib/datadog/data_streams/pathway_context.rb +1 -1
- data/lib/datadog/data_streams/processor.rb +48 -27
- data/lib/datadog/data_streams/transport/http.rb +1 -1
- data/lib/datadog/data_streams.rb +16 -0
- data/lib/datadog/di/capture_expression_evaluator.rb +48 -11
- data/lib/datadog/di/component.rb +3 -2
- data/lib/datadog/di/configuration.rb +19 -0
- data/lib/datadog/di/contrib/active_record.rb +1 -1
- data/lib/datadog/di/el/compiler.rb +4 -4
- data/lib/datadog/di/el/evaluator.rb +247 -43
- data/lib/datadog/di/el/expression.rb +36 -6
- data/lib/datadog/di/error.rb +16 -0
- data/lib/datadog/di/guardrails_telemetry/reason.rb +3 -2
- data/lib/datadog/di/instrumenter.rb +39 -10
- data/lib/datadog/di/probe_notification_builder.rb +58 -10
- data/lib/datadog/di/probe_notifier_worker.rb +1 -1
- data/lib/datadog/di/serializer.rb +20 -2
- data/lib/datadog/di.rb +27 -0
- data/lib/datadog/error_tracking/component.rb +1 -1
- data/lib/datadog/error_tracking/configuration.rb +1 -1
- data/lib/datadog/kit/appsec/events/v2.rb +6 -6
- data/lib/datadog/kit/appsec/events.rb +1 -1
- data/lib/datadog/kit/enable_core_dumps.rb +1 -1
- data/lib/datadog/kit/identity.rb +1 -1
- data/lib/datadog/open_feature/activation.rb +26 -1
- data/lib/datadog/open_feature/agentless/configuration_source.rb +94 -15
- data/lib/datadog/open_feature/component.rb +22 -2
- data/lib/datadog/open_feature/configuration/agentless_endpoint.rb +6 -0
- data/lib/datadog/open_feature/configuration.rb +4 -4
- data/lib/datadog/open_feature/evaluation_engine.rb +62 -4
- data/lib/datadog/open_feature/exposures/buffer.rb +4 -0
- data/lib/datadog/open_feature/exposures/reporter.rb +17 -4
- data/lib/datadog/open_feature/exposures/worker.rb +37 -6
- data/lib/datadog/open_feature/flag_evaluation/aggregator.rb +5 -5
- data/lib/datadog/open_feature/flag_evaluation/writer.rb +1 -1
- data/lib/datadog/open_feature/hooks/debug_logging_hook.rb +56 -0
- data/lib/datadog/open_feature/hooks/span_enrichment_hook.rb +2 -2
- data/lib/datadog/open_feature/metrics/flag_eval_metrics.rb +1 -1
- data/lib/datadog/open_feature/native_evaluator.rb +1 -1
- data/lib/datadog/open_feature/noop_evaluator.rb +1 -1
- data/lib/datadog/open_feature/provider.rb +50 -12
- data/lib/datadog/open_feature/remote.rb +8 -1
- data/lib/datadog/open_feature/resolution_details.rb +2 -2
- data/lib/datadog/open_feature/transport.rb +6 -6
- data/lib/datadog/opentelemetry/api/context.rb +3 -3
- data/lib/datadog/opentelemetry/logs.rb +5 -5
- data/lib/datadog/opentelemetry/metrics.rb +3 -3
- data/lib/datadog/opentelemetry/sdk/propagator.rb +3 -3
- data/lib/datadog/opentelemetry/sdk/span_processor.rb +2 -2
- data/lib/datadog/opentelemetry/sdk/trace/span.rb +1 -1
- data/lib/datadog/profiling/collectors/code_provenance.rb +3 -3
- data/lib/datadog/profiling/collectors/cpu_and_wall_time_worker.rb +4 -4
- data/lib/datadog/profiling/collectors/idle_sampling_helper.rb +1 -1
- data/lib/datadog/profiling/collectors/thread_context.rb +1 -1
- data/lib/datadog/profiling/component.rb +19 -19
- data/lib/datadog/profiling/exporter.rb +1 -1
- data/lib/datadog/profiling/http_transport.rb +3 -3
- data/lib/datadog/profiling/profiler.rb +2 -2
- data/lib/datadog/profiling/scheduler.rb +2 -2
- data/lib/datadog/profiling/tag_builder.rb +1 -1
- data/lib/datadog/symbol_database/extractor.rb +8 -8
- data/lib/datadog/symbol_database/uploader.rb +1 -1
- data/lib/datadog/tracing/buffer.rb +3 -3
- data/lib/datadog/tracing/client_ip.rb +1 -1
- data/lib/datadog/tracing/component.rb +8 -8
- data/lib/datadog/tracing/configuration/dynamic/option.rb +2 -2
- data/lib/datadog/tracing/configuration/settings.rb +3 -3
- data/lib/datadog/tracing/context.rb +1 -1
- data/lib/datadog/tracing/contrib/action_cable/instrumentation.rb +2 -2
- data/lib/datadog/tracing/contrib/active_job/data_streams.rb +27 -2
- data/lib/datadog/tracing/contrib/active_record/configuration/resolver.rb +2 -2
- data/lib/datadog/tracing/contrib/active_record/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/active_record/utils.rb +1 -1
- data/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb +1 -1
- data/lib/datadog/tracing/contrib/active_support/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/active_support/notifications/subscriber.rb +2 -2
- data/lib/datadog/tracing/contrib/active_support/notifications/subscription.rb +2 -2
- data/lib/datadog/tracing/contrib/aws/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/aws/instrumentation.rb +1 -1
- data/lib/datadog/tracing/contrib/dalli/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/dalli/instrumentation.rb +1 -1
- data/lib/datadog/tracing/contrib/delayed_job/plugin.rb +2 -2
- data/lib/datadog/tracing/contrib/elasticsearch/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/elasticsearch/patcher.rb +3 -3
- data/lib/datadog/tracing/contrib/ethon/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/ethon/easy_patch.rb +8 -8
- data/lib/datadog/tracing/contrib/ethon/multi_patch.rb +1 -1
- data/lib/datadog/tracing/contrib/excon/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/excon/middleware.rb +7 -7
- data/lib/datadog/tracing/contrib/faraday/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/faraday/middleware.rb +5 -5
- data/lib/datadog/tracing/contrib/grape/endpoint.rb +4 -4
- data/lib/datadog/tracing/contrib/graphql/patcher.rb +1 -1
- data/lib/datadog/tracing/contrib/graphql/unified_trace.rb +3 -3
- data/lib/datadog/tracing/contrib/grpc/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/client.rb +2 -2
- data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/server.rb +1 -1
- data/lib/datadog/tracing/contrib/grpc.rb +1 -1
- data/lib/datadog/tracing/contrib/hanami/action_tracer.rb +1 -1
- data/lib/datadog/tracing/contrib/hanami/plugin.rb +1 -1
- data/lib/datadog/tracing/contrib/hanami/renderer_policy_tracing.rb +1 -1
- data/lib/datadog/tracing/contrib/hanami/router_tracing.rb +1 -1
- data/lib/datadog/tracing/contrib/http/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/http/instrumentation.rb +6 -6
- data/lib/datadog/tracing/contrib/http.rb +1 -1
- data/lib/datadog/tracing/contrib/httpclient/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/httpclient/instrumentation.rb +7 -7
- data/lib/datadog/tracing/contrib/httprb/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/httprb/instrumentation.rb +5 -5
- data/lib/datadog/tracing/contrib/kafka/instrumentation/consumer.rb +2 -2
- data/lib/datadog/tracing/contrib/kafka/instrumentation/producer.rb +2 -2
- data/lib/datadog/tracing/contrib/karafka/monitor.rb +1 -1
- data/lib/datadog/tracing/contrib/karafka/patcher.rb +1 -1
- data/lib/datadog/tracing/contrib/karafka.rb +1 -1
- data/lib/datadog/tracing/contrib/lograge/patcher.rb +1 -1
- data/lib/datadog/tracing/contrib/mongodb/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/mongodb/parsers.rb +1 -1
- data/lib/datadog/tracing/contrib/mongodb/subscribers.rb +1 -1
- data/lib/datadog/tracing/contrib/mysql2/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/mysql2/instrumentation.rb +3 -3
- data/lib/datadog/tracing/contrib/opensearch/configuration/settings.rb +2 -2
- data/lib/datadog/tracing/contrib/opensearch/patcher.rb +3 -3
- data/lib/datadog/tracing/contrib/pg/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/pg/instrumentation.rb +4 -4
- data/lib/datadog/tracing/contrib/presto/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/presto/instrumentation.rb +4 -4
- data/lib/datadog/tracing/contrib/propagation/sql_comment.rb +1 -1
- data/lib/datadog/tracing/contrib/que/tracer.rb +1 -1
- data/lib/datadog/tracing/contrib/racecar/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/racecar/events/batch.rb +1 -1
- data/lib/datadog/tracing/contrib/racecar/events/message.rb +1 -1
- data/lib/datadog/tracing/contrib/rack/middlewares.rb +3 -3
- data/lib/datadog/tracing/contrib/rack/patcher.rb +1 -1
- data/lib/datadog/tracing/contrib/rails/framework.rb +7 -7
- data/lib/datadog/tracing/contrib/rails/log_injection.rb +1 -1
- data/lib/datadog/tracing/contrib/rails/runner.rb +4 -4
- data/lib/datadog/tracing/contrib/redis/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/redis/quantize.rb +1 -1
- data/lib/datadog/tracing/contrib/redis/tags.rb +1 -1
- data/lib/datadog/tracing/contrib/rest_client/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/rest_client/request_patch.rb +8 -8
- data/lib/datadog/tracing/contrib/sequel/database.rb +1 -1
- data/lib/datadog/tracing/contrib/sequel/dataset.rb +1 -1
- data/lib/datadog/tracing/contrib/shoryuken/tracer.rb +1 -1
- data/lib/datadog/tracing/contrib/sidekiq/client_tracer.rb +2 -2
- data/lib/datadog/tracing/contrib/sidekiq/server_tracer.rb +2 -2
- data/lib/datadog/tracing/contrib/sidekiq.rb +1 -1
- data/lib/datadog/tracing/contrib/sinatra/tracer_middleware.rb +1 -1
- data/lib/datadog/tracing/contrib/status_range_env_parser.rb +1 -1
- data/lib/datadog/tracing/contrib/sucker_punch/instrumentation.rb +1 -1
- data/lib/datadog/tracing/contrib/trilogy/configuration/settings.rb +1 -1
- data/lib/datadog/tracing/contrib/trilogy/instrumentation.rb +3 -3
- data/lib/datadog/tracing/contrib/waterdrop/middleware.rb +2 -2
- data/lib/datadog/tracing/contrib/waterdrop.rb +1 -1
- data/lib/datadog/tracing/diagnostics/environment_logger.rb +1 -1
- data/lib/datadog/tracing/distributed/b3_multi.rb +1 -1
- data/lib/datadog/tracing/distributed/b3_single.rb +1 -1
- data/lib/datadog/tracing/distributed/baggage.rb +3 -3
- data/lib/datadog/tracing/distributed/datadog.rb +3 -3
- data/lib/datadog/tracing/distributed/propagation.rb +7 -7
- data/lib/datadog/tracing/distributed/trace_context.rb +1 -1
- data/lib/datadog/tracing/distributed/trace_state/open_telemetry.rb +1 -1
- data/lib/datadog/tracing/otel_thread_context.rb +3 -3
- data/lib/datadog/tracing/pipeline.rb +1 -1
- data/lib/datadog/tracing/sampling/priority_sampler.rb +1 -1
- data/lib/datadog/tracing/sampling/rule.rb +1 -1
- data/lib/datadog/tracing/sampling/rule_sampler.rb +1 -1
- data/lib/datadog/tracing/sampling/span/rule_parser.rb +2 -2
- data/lib/datadog/tracing/span_operation.rb +1 -1
- data/lib/datadog/tracing/trace_digest.rb +1 -1
- data/lib/datadog/tracing/trace_operation.rb +6 -6
- data/lib/datadog/tracing/tracer.rb +6 -6
- data/lib/datadog/tracing/transport/http/telemetry.rb +1 -1
- data/lib/datadog/tracing/transport/http.rb +2 -2
- data/lib/datadog/tracing/transport/io.rb +1 -1
- data/lib/datadog/tracing/transport/native.rb +3 -3
- data/lib/datadog/tracing/transport/statistics.rb +2 -2
- data/lib/datadog/tracing/transport/telemetry.rb +3 -1
- data/lib/datadog/tracing/transport/trace_formatter.rb +12 -12
- data/lib/datadog/tracing/transport/traces.rb +1 -1
- data/lib/datadog/tracing/utils.rb +1 -1
- data/lib/datadog/tracing/workers.rb +1 -1
- data/lib/datadog/version.rb +1 -1
- metadata +4 -3
|
@@ -18,7 +18,7 @@ module Datadog
|
|
|
18
18
|
class Spec
|
|
19
19
|
def initialize
|
|
20
20
|
@endpoint = Core::Transport::HTTP::API::Endpoint.new(
|
|
21
|
-
:post, "/evp_proxy/v2/api/v2/exposures"
|
|
21
|
+
:post, "/evp_proxy/v2/api/v2/exposures",
|
|
22
22
|
)
|
|
23
23
|
end
|
|
24
24
|
|
|
@@ -43,7 +43,7 @@ module Datadog
|
|
|
43
43
|
class FlagevaluationsSpec
|
|
44
44
|
def initialize
|
|
45
45
|
@endpoint = Core::Transport::HTTP::API::Endpoint.new(
|
|
46
|
-
:post, "/evp_proxy/v2/api/v2/flagevaluation"
|
|
46
|
+
:post, "/evp_proxy/v2/api/v2/flagevaluation",
|
|
47
47
|
)
|
|
48
48
|
end
|
|
49
49
|
|
|
@@ -64,7 +64,7 @@ module Datadog
|
|
|
64
64
|
def self.build(agent_settings:, logger:)
|
|
65
65
|
Core::Transport::HTTP.build(
|
|
66
66
|
agent_settings: agent_settings,
|
|
67
|
-
logger: logger
|
|
67
|
+
logger: logger,
|
|
68
68
|
) { |t| t.api("exposures", HTTP::Spec.new) }.to_transport(self)
|
|
69
69
|
end
|
|
70
70
|
|
|
@@ -72,7 +72,7 @@ module Datadog
|
|
|
72
72
|
def self.build_flagevaluations(agent_settings:, logger:)
|
|
73
73
|
Core::Transport::HTTP.build(
|
|
74
74
|
agent_settings: agent_settings,
|
|
75
|
-
logger: logger
|
|
75
|
+
logger: logger,
|
|
76
76
|
) { |t| t.api("flagevaluations", HTTP::FlagevaluationsSpec.new) }.to_transport(self)
|
|
77
77
|
end
|
|
78
78
|
|
|
@@ -85,7 +85,7 @@ module Datadog
|
|
|
85
85
|
encoder = Core::Encoding::JSONEncoder
|
|
86
86
|
parcel = Core::Transport::Parcel.new(
|
|
87
87
|
encoder.encode(payload),
|
|
88
|
-
content_type: encoder.content_type
|
|
88
|
+
content_type: encoder.content_type,
|
|
89
89
|
)
|
|
90
90
|
request = Core::Transport::Request.new(parcel)
|
|
91
91
|
|
|
@@ -106,7 +106,7 @@ module Datadog
|
|
|
106
106
|
encoder = Core::Encoding::JSONEncoder
|
|
107
107
|
parcel = Core::Transport::Parcel.new(
|
|
108
108
|
encoder.encode(payload),
|
|
109
|
-
content_type: encoder.content_type
|
|
109
|
+
content_type: encoder.content_type,
|
|
110
110
|
)
|
|
111
111
|
request = Core::Transport::Request.new(parcel)
|
|
112
112
|
|
|
@@ -77,7 +77,7 @@ module Datadog
|
|
|
77
77
|
# It effectively becomes an internal trace propagation.
|
|
78
78
|
trace = Datadog::OpenTelemetry::Trace.start_trace_copy(
|
|
79
79
|
current_span.datadog_trace,
|
|
80
|
-
parent_span: current_span.datadog_span
|
|
80
|
+
parent_span: current_span.datadog_span,
|
|
81
81
|
)
|
|
82
82
|
end
|
|
83
83
|
|
|
@@ -143,8 +143,8 @@ module Datadog
|
|
|
143
143
|
unless calls_matched
|
|
144
144
|
::OpenTelemetry.handle_error(
|
|
145
145
|
exception: ::OpenTelemetry::Context::DetachError.new(
|
|
146
|
-
"calls to detach should match corresponding calls to attach."
|
|
147
|
-
)
|
|
146
|
+
"calls to detach should match corresponding calls to attach.",
|
|
147
|
+
),
|
|
148
148
|
)
|
|
149
149
|
end
|
|
150
150
|
|
|
@@ -13,7 +13,7 @@ module Datadog
|
|
|
13
13
|
true
|
|
14
14
|
rescue => exc
|
|
15
15
|
components.logger.warn(
|
|
16
|
-
"Failed to initialize OpenTelemetry logs: #{exc.class}: #{exc.message}\n#{(exc.backtrace || []).join("\n")}"
|
|
16
|
+
"Failed to initialize OpenTelemetry logs: #{exc.class}: #{exc.message}\n#{(exc.backtrace || []).join("\n")}",
|
|
17
17
|
)
|
|
18
18
|
false
|
|
19
19
|
end
|
|
@@ -42,7 +42,7 @@ module Datadog
|
|
|
42
42
|
def disable_log_injection
|
|
43
43
|
@logger.warn("OTel logs enabled: disabling Datadog log injection to prevent duplicate trace correlation fields")
|
|
44
44
|
Datadog.configure do |c|
|
|
45
|
-
c.tracing.log_injection = false
|
|
45
|
+
c.tracing.log_injection = false
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -67,7 +67,7 @@ module Datadog
|
|
|
67
67
|
endpoint = config_or_exporter_fallback(
|
|
68
68
|
signal: :logs,
|
|
69
69
|
option_name: :endpoint,
|
|
70
|
-
computed_default: default_logs_endpoint
|
|
70
|
+
computed_default: default_logs_endpoint,
|
|
71
71
|
)
|
|
72
72
|
timeout = config_or_exporter_fallback(signal: :logs, option_name: :timeout_millis)
|
|
73
73
|
headers = config_or_exporter_fallback(signal: :logs, option_name: :headers)
|
|
@@ -77,7 +77,7 @@ module Datadog
|
|
|
77
77
|
exporter = Datadog::OpenTelemetry::SDK::LogsExporter.new(
|
|
78
78
|
endpoint: endpoint,
|
|
79
79
|
timeout: timeout / 1000.0,
|
|
80
|
-
headers: headers
|
|
80
|
+
headers: headers,
|
|
81
81
|
)
|
|
82
82
|
|
|
83
83
|
processor = ::OpenTelemetry::SDK::Logs::Export::BatchLogRecordProcessor.new(
|
|
@@ -85,7 +85,7 @@ module Datadog
|
|
|
85
85
|
max_queue_size: logs_config.max_queue_size,
|
|
86
86
|
schedule_delay: logs_config.schedule_delay_millis,
|
|
87
87
|
exporter_timeout: logs_config.export_timeout_millis,
|
|
88
|
-
max_export_batch_size: logs_config.max_export_batch_size
|
|
88
|
+
max_export_batch_size: logs_config.max_export_batch_size,
|
|
89
89
|
)
|
|
90
90
|
provider.add_log_record_processor(processor)
|
|
91
91
|
true
|
|
@@ -63,7 +63,7 @@ module Datadog
|
|
|
63
63
|
endpoint = config_or_exporter_fallback(
|
|
64
64
|
signal: :metrics,
|
|
65
65
|
option_name: :endpoint,
|
|
66
|
-
computed_default: default_metrics_endpoint
|
|
66
|
+
computed_default: default_metrics_endpoint,
|
|
67
67
|
)
|
|
68
68
|
timeout = config_or_exporter_fallback(signal: :metrics, option_name: :timeout_millis)
|
|
69
69
|
headers = config_or_exporter_fallback(signal: :metrics, option_name: :headers)
|
|
@@ -73,13 +73,13 @@ module Datadog
|
|
|
73
73
|
exporter = Datadog::OpenTelemetry::SDK::MetricsExporter.new(
|
|
74
74
|
endpoint: endpoint,
|
|
75
75
|
timeout: timeout / 1000.0,
|
|
76
|
-
headers: headers
|
|
76
|
+
headers: headers,
|
|
77
77
|
)
|
|
78
78
|
|
|
79
79
|
reader = ::OpenTelemetry::SDK::Metrics::Export::PeriodicMetricReader.new(
|
|
80
80
|
exporter: exporter,
|
|
81
81
|
export_interval_millis: metrics_config.export_interval_millis,
|
|
82
|
-
export_timeout_millis: metrics_config.export_timeout_millis
|
|
82
|
+
export_timeout_millis: metrics_config.export_timeout_millis,
|
|
83
83
|
)
|
|
84
84
|
provider.add_metric_reader(reader)
|
|
85
85
|
rescue LoadError => e
|
|
@@ -19,7 +19,7 @@ module Datadog
|
|
|
19
19
|
Datadog.logger.error(
|
|
20
20
|
"Custom setter is not supported. Please inform the `datadog` team at " \
|
|
21
21
|
" https://github.com/DataDog/dd-trace-rb of your use case so we can best support you. Using the default " \
|
|
22
|
-
"OpenTelemetry::Context::Propagation.text_map_setter as a fallback setter."
|
|
22
|
+
"OpenTelemetry::Context::Propagation.text_map_setter as a fallback setter.",
|
|
23
23
|
)
|
|
24
24
|
end
|
|
25
25
|
|
|
@@ -36,7 +36,7 @@ module Datadog
|
|
|
36
36
|
Datadog.logger.error(
|
|
37
37
|
"Custom getter #{getter} is not supported. Please inform the `datadog` team at " \
|
|
38
38
|
" https://github.com/DataDog/dd-trace-rb of your use case so we can best support you. Using the default " \
|
|
39
|
-
"OpenTelemetry::Context::Propagation.text_map_getter as a fallback getter."
|
|
39
|
+
"OpenTelemetry::Context::Propagation.text_map_getter as a fallback getter.",
|
|
40
40
|
)
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -75,7 +75,7 @@ module Datadog
|
|
|
75
75
|
span_id: span_id,
|
|
76
76
|
trace_flags: trace_flags,
|
|
77
77
|
tracestate: tracestate,
|
|
78
|
-
remote: true
|
|
78
|
+
remote: true,
|
|
79
79
|
)
|
|
80
80
|
|
|
81
81
|
span = ::OpenTelemetry::Trace.non_recording_span(span_context)
|
|
@@ -38,7 +38,7 @@ module Datadog
|
|
|
38
38
|
Datadog::Tracing::SpanEvent.new(
|
|
39
39
|
event.name,
|
|
40
40
|
attributes: event.attributes,
|
|
41
|
-
time_unix_nano: event.timestamp
|
|
41
|
+
time_unix_nano: event.timestamp,
|
|
42
42
|
)
|
|
43
43
|
end
|
|
44
44
|
end
|
|
@@ -112,7 +112,7 @@ module Datadog
|
|
|
112
112
|
trace_state: tracestate && ::Datadog::Core::Utils.utf8_encode(tracestate, placeholder: nil),
|
|
113
113
|
span_remote: link.span_context.remote?,
|
|
114
114
|
),
|
|
115
|
-
attributes: link.attributes
|
|
115
|
+
attributes: link.attributes,
|
|
116
116
|
)
|
|
117
117
|
end
|
|
118
118
|
end
|
|
@@ -34,7 +34,7 @@ module Datadog
|
|
|
34
34
|
version: RUBY_VERSION,
|
|
35
35
|
path: standard_library_path,
|
|
36
36
|
extra_paths: [ruby_native_filename],
|
|
37
|
-
)
|
|
37
|
+
),
|
|
38
38
|
)
|
|
39
39
|
end
|
|
40
40
|
|
|
@@ -104,7 +104,7 @@ module Datadog
|
|
|
104
104
|
version: spec.version,
|
|
105
105
|
path: spec.gem_dir,
|
|
106
106
|
extra_paths: extra_paths,
|
|
107
|
-
)
|
|
107
|
+
),
|
|
108
108
|
)
|
|
109
109
|
recorded_library = true
|
|
110
110
|
end
|
|
@@ -146,7 +146,7 @@ module Datadog
|
|
|
146
146
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
147
147
|
Datadog.logger.debug(
|
|
148
148
|
"CodeProvenance#bundler_bin_path failed. " \
|
|
149
|
-
"Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}"
|
|
149
|
+
"Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}",
|
|
150
150
|
)
|
|
151
151
|
nil
|
|
152
152
|
end
|
|
@@ -55,10 +55,10 @@ module Datadog
|
|
|
55
55
|
)
|
|
56
56
|
unless dynamic_sampling_rate_enabled
|
|
57
57
|
Datadog.logger.warn(
|
|
58
|
-
"Profiling dynamic sampling rate disabled. This should only be used for testing, and will increase overhead!"
|
|
58
|
+
"Profiling dynamic sampling rate disabled. This should only be used for testing, and will increase overhead!",
|
|
59
59
|
)
|
|
60
60
|
Datadog::Core::Telemetry::Logger.error(
|
|
61
|
-
"Profiling dynamic sampling rate disabled. This should only be used for testing, and will increase overhead!"
|
|
61
|
+
"Profiling dynamic sampling rate disabled. This should only be used for testing, and will increase overhead!",
|
|
62
62
|
)
|
|
63
63
|
end
|
|
64
64
|
|
|
@@ -110,7 +110,7 @@ module Datadog
|
|
|
110
110
|
@failure_exception = e
|
|
111
111
|
Datadog.logger.warn(
|
|
112
112
|
"Profiling was not started as another profiler or gem is already using the SIGPROF signal. " \
|
|
113
|
-
"Please disable the other profiler to use Datadog profiling."
|
|
113
|
+
"Please disable the other profiler to use Datadog profiling.",
|
|
114
114
|
)
|
|
115
115
|
on_failure_proc&.call(log_failure: false)
|
|
116
116
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
@@ -118,7 +118,7 @@ module Datadog
|
|
|
118
118
|
operation_name = self.class._native_failure_exception_during_operation(self).inspect
|
|
119
119
|
Datadog.logger.warn(
|
|
120
120
|
"CpuAndWallTimeWorker thread error. " \
|
|
121
|
-
"Operation: #{operation_name} Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}"
|
|
121
|
+
"Operation: #{operation_name} Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}",
|
|
122
122
|
)
|
|
123
123
|
on_failure_proc&.call
|
|
124
124
|
Datadog::Core::Telemetry::Logger.report(e, description: "CpuAndWallTimeWorker thread error: #{operation_name}")
|
|
@@ -44,7 +44,7 @@ module Datadog
|
|
|
44
44
|
@failure_exception = e
|
|
45
45
|
Datadog.logger.warn(
|
|
46
46
|
"IdleSamplingHelper thread error. " \
|
|
47
|
-
"Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}"
|
|
47
|
+
"Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}",
|
|
48
48
|
)
|
|
49
49
|
Datadog::Core::Telemetry::Logger.report(e, description: "IdleSamplingHelper thread error")
|
|
50
50
|
end
|
|
@@ -145,14 +145,14 @@ module Datadog
|
|
|
145
145
|
RubyVersion.is?(">= 3.2", "< 3.2.3")
|
|
146
146
|
logger.warn(
|
|
147
147
|
"Current Ruby version (#{RUBY_VERSION}) has a VM bug where enabling GC profiling would cause " \
|
|
148
|
-
"crashes (https://bugs.ruby-lang.org/issues/18464). GC profiling has been disabled."
|
|
148
|
+
"crashes (https://bugs.ruby-lang.org/issues/18464). GC profiling has been disabled.",
|
|
149
149
|
)
|
|
150
150
|
return false
|
|
151
151
|
elsif RubyVersion.is?(">= 3", "< 4")
|
|
152
152
|
logger.debug(
|
|
153
153
|
"Using Ractors may result in GC profiling unexpectedly " \
|
|
154
154
|
"stopping (https://bugs.ruby-lang.org/issues/19112). Note that this stop has no impact in your " \
|
|
155
|
-
"application stability or performance. This issue is fixed on Ruby 4."
|
|
155
|
+
"application stability or performance. This issue is fixed on Ruby 4.",
|
|
156
156
|
)
|
|
157
157
|
end
|
|
158
158
|
|
|
@@ -180,7 +180,7 @@ module Datadog
|
|
|
180
180
|
logger.warn(
|
|
181
181
|
"Allocation profiling is not supported in Ruby versions 3.2.0, 3.2.1 and 3.2.2 and will be forcibly " \
|
|
182
182
|
"disabled. This is due to a VM bug that can lead to crashes (https://bugs.ruby-lang.org/issues/19482). " \
|
|
183
|
-
"Other Ruby versions do not suffer from this issue."
|
|
183
|
+
"Other Ruby versions do not suffer from this issue.",
|
|
184
184
|
)
|
|
185
185
|
return false
|
|
186
186
|
end
|
|
@@ -195,7 +195,7 @@ module Datadog
|
|
|
195
195
|
logger.warn(
|
|
196
196
|
"Current Ruby version (#{RUBY_VERSION}) has a VM bug where enabling allocation profiling while using " \
|
|
197
197
|
"Ractors may cause unexpected issues, including crashes (https://bugs.ruby-lang.org/issues/18464). " \
|
|
198
|
-
"This does not happen if Ractors are not used."
|
|
198
|
+
"This does not happen if Ractors are not used.",
|
|
199
199
|
)
|
|
200
200
|
# ANNOYANCE - Only with Ractors
|
|
201
201
|
# On all known versions of Ruby 3.x, due to https://bugs.ruby-lang.org/issues/19112, when a ractor gets
|
|
@@ -204,7 +204,7 @@ module Datadog
|
|
|
204
204
|
logger.debug(
|
|
205
205
|
"Using Ractors may result in allocation profiling " \
|
|
206
206
|
"stopping (https://bugs.ruby-lang.org/issues/19112). Note that this stop has no impact in your " \
|
|
207
|
-
"application stability or performance. This issue is fixed on Ruby 4."
|
|
207
|
+
"application stability or performance. This issue is fixed on Ruby 4.",
|
|
208
208
|
)
|
|
209
209
|
end
|
|
210
210
|
|
|
@@ -221,7 +221,7 @@ module Datadog
|
|
|
221
221
|
if RubyVersion.is?("< 3.1")
|
|
222
222
|
logger.warn(
|
|
223
223
|
"Current Ruby version (#{RUBY_VERSION}) cannot support heap profiling due to VM limitations. " \
|
|
224
|
-
"Please upgrade to Ruby >= 3.1 in order to use this feature. Heap profiling has been disabled."
|
|
224
|
+
"Please upgrade to Ruby >= 3.1 in order to use this feature. Heap profiling has been disabled.",
|
|
225
225
|
)
|
|
226
226
|
return false
|
|
227
227
|
end
|
|
@@ -232,7 +232,7 @@ module Datadog
|
|
|
232
232
|
logger.warn(
|
|
233
233
|
"Current Ruby version (#{RUBY_VERSION}) cannot support heap profiling due to a VM bug. " \
|
|
234
234
|
"Please upgrade to Ruby >= 3.1.4 or >= 3.2.3 in order to use this feature. " \
|
|
235
|
-
"Heap profiling has been disabled."
|
|
235
|
+
"Heap profiling has been disabled.",
|
|
236
236
|
)
|
|
237
237
|
return false
|
|
238
238
|
end
|
|
@@ -240,7 +240,7 @@ module Datadog
|
|
|
240
240
|
unless allocation_profiling_enabled
|
|
241
241
|
logger.warn(
|
|
242
242
|
"Heap profiling was requested but allocation profiling is not enabled. " \
|
|
243
|
-
"Heap profiling has been disabled."
|
|
243
|
+
"Heap profiling has been disabled.",
|
|
244
244
|
)
|
|
245
245
|
return false
|
|
246
246
|
end
|
|
@@ -262,7 +262,7 @@ module Datadog
|
|
|
262
262
|
unless [true, false, :auto].include?(setting_value)
|
|
263
263
|
logger.warn(
|
|
264
264
|
"Ignoring invalid value for profiling no_signals_workaround_enabled setting: #{setting_value.inspect}. " \
|
|
265
|
-
"Valid options are `true`, `false` or (default) `:auto`."
|
|
265
|
+
"Valid options are `true`, `false` or (default) `:auto`.",
|
|
266
266
|
)
|
|
267
267
|
|
|
268
268
|
setting_value = :auto
|
|
@@ -275,7 +275,7 @@ module Datadog
|
|
|
275
275
|
"This is not recommended " \
|
|
276
276
|
"in production environments, as due to limitations in Ruby APIs, we suspect it may lead to rare crashes " \
|
|
277
277
|
"Please report any issues you run into to Datadog support or " \
|
|
278
|
-
"via <https://github.com/datadog/dd-trace-rb/issues/new>!"
|
|
278
|
+
"via <https://github.com/datadog/dd-trace-rb/issues/new>!",
|
|
279
279
|
)
|
|
280
280
|
else
|
|
281
281
|
logger.warn('Profiling "no signals" workaround disabled via configuration')
|
|
@@ -286,7 +286,7 @@ module Datadog
|
|
|
286
286
|
|
|
287
287
|
if setting_value == true
|
|
288
288
|
logger.warn(
|
|
289
|
-
'Profiling "no signals" workaround enabled via configuration. Profiling data will have lower quality.'
|
|
289
|
+
'Profiling "no signals" workaround enabled via configuration. Profiling data will have lower quality.',
|
|
290
290
|
)
|
|
291
291
|
|
|
292
292
|
return true
|
|
@@ -301,7 +301,7 @@ module Datadog
|
|
|
301
301
|
logger.warn(
|
|
302
302
|
'Enabling the profiling "no signals" workaround because an incompatible version of the mysql2 gem is ' \
|
|
303
303
|
"installed. Profiling data will have lower quality. " \
|
|
304
|
-
"To fix this, upgrade the libmysqlclient in your OS image to version 8.0.0 or above."
|
|
304
|
+
"To fix this, upgrade the libmysqlclient in your OS image to version 8.0.0 or above.",
|
|
305
305
|
)
|
|
306
306
|
return true
|
|
307
307
|
end
|
|
@@ -311,7 +311,7 @@ module Datadog
|
|
|
311
311
|
'Enabling the profiling "no signals" workaround because the rugged gem is installed. ' \
|
|
312
312
|
"This is needed because some operations on this gem are currently incompatible with the normal working mode " \
|
|
313
313
|
"of the profiler, as detailed in <https://github.com/datadog/dd-trace-rb/issues/2721>. " \
|
|
314
|
-
"Profiling data will have lower quality."
|
|
314
|
+
"Profiling data will have lower quality.",
|
|
315
315
|
)
|
|
316
316
|
return true
|
|
317
317
|
end
|
|
@@ -320,7 +320,7 @@ module Datadog
|
|
|
320
320
|
logger.warn(
|
|
321
321
|
'Enabling the profiling "no signals" workaround because an incompatible version of the passenger gem is ' \
|
|
322
322
|
"installed. Profiling data will have lower quality." \
|
|
323
|
-
"To fix this, upgrade the passenger gem to version 6.0.19 or above."
|
|
323
|
+
"To fix this, upgrade the passenger gem to version 6.0.19 or above.",
|
|
324
324
|
)
|
|
325
325
|
return true
|
|
326
326
|
end
|
|
@@ -341,7 +341,7 @@ module Datadog
|
|
|
341
341
|
return true if settings.profiling.advanced.skip_mysql2_check
|
|
342
342
|
|
|
343
343
|
logger.debug(
|
|
344
|
-
"Requiring `mysql2` to check if the `libmysqlclient` version it uses is compatible with profiling"
|
|
344
|
+
"Requiring `mysql2` to check if the `libmysqlclient` version it uses is compatible with profiling",
|
|
345
345
|
)
|
|
346
346
|
|
|
347
347
|
begin
|
|
@@ -371,14 +371,14 @@ module Datadog
|
|
|
371
371
|
|
|
372
372
|
logger.debug(
|
|
373
373
|
"The `mysql2` gem is using #{compatible ? "a compatible" : "an incompatible"} version of " \
|
|
374
|
-
"the `libmysqlclient` library (#{libmysqlclient_version})"
|
|
374
|
+
"the `libmysqlclient` library (#{libmysqlclient_version})",
|
|
375
375
|
)
|
|
376
376
|
|
|
377
377
|
!compatible
|
|
378
378
|
rescue StandardError, LoadError => e
|
|
379
379
|
logger.warn(
|
|
380
380
|
"Failed to probe `mysql2` gem information. " \
|
|
381
|
-
"Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}"
|
|
381
|
+
"Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}",
|
|
382
382
|
)
|
|
383
383
|
|
|
384
384
|
true
|
|
@@ -404,7 +404,7 @@ module Datadog
|
|
|
404
404
|
else
|
|
405
405
|
logger.warn(
|
|
406
406
|
"Ignoring invalid value for profiling overhead_target_percentage setting: " \
|
|
407
|
-
"#{overhead_target_percentage.inspect}. Falling back to default value."
|
|
407
|
+
"#{overhead_target_percentage.inspect}. Falling back to default value.",
|
|
408
408
|
)
|
|
409
409
|
|
|
410
410
|
2.0
|
|
@@ -416,7 +416,7 @@ module Datadog
|
|
|
416
416
|
logger.warn(
|
|
417
417
|
"Profiling cpu_sampling_interval_ms is set to #{cpu_sampling_interval_ms}ms, but values above 10ms are " \
|
|
418
418
|
"not supported. Using 10ms instead. To reduce profiler overhead, consider adjusting the " \
|
|
419
|
-
"overhead_target_percentage setting."
|
|
419
|
+
"overhead_target_percentage setting.",
|
|
420
420
|
)
|
|
421
421
|
10
|
|
422
422
|
elsif cpu_sampling_interval_ms < 10
|
|
@@ -40,7 +40,7 @@ module Datadog
|
|
|
40
40
|
def export(flush)
|
|
41
41
|
status, result = self.class._native_do_export(
|
|
42
42
|
exporter_configuration,
|
|
43
|
-
flush
|
|
43
|
+
flush,
|
|
44
44
|
)
|
|
45
45
|
|
|
46
46
|
if status == :ok
|
|
@@ -50,10 +50,10 @@ module Datadog
|
|
|
50
50
|
else
|
|
51
51
|
Datadog.logger.warn(
|
|
52
52
|
"Failed to report profiling data (#{config_without_api_key}): " \
|
|
53
|
-
"server returned unexpected HTTP #{result} status code"
|
|
53
|
+
"server returned unexpected HTTP #{result} status code",
|
|
54
54
|
)
|
|
55
55
|
Datadog::Core::Telemetry::Logger.error(
|
|
56
|
-
"Failed to report profiling data: unexpected HTTP #{result} status code"
|
|
56
|
+
"Failed to report profiling data: unexpected HTTP #{result} status code",
|
|
57
57
|
)
|
|
58
58
|
false
|
|
59
59
|
end
|
|
@@ -32,7 +32,7 @@ module Datadog
|
|
|
32
32
|
on_failure_proc: ->(log_failure: true) do
|
|
33
33
|
# @type var log_failure: bool
|
|
34
34
|
component_failed(:worker, log_failure: log_failure)
|
|
35
|
-
end
|
|
35
|
+
end,
|
|
36
36
|
)
|
|
37
37
|
scheduler.start(on_failure_proc: proc { component_failed(:scheduler) })
|
|
38
38
|
end
|
|
@@ -67,7 +67,7 @@ module Datadog
|
|
|
67
67
|
if log_failure
|
|
68
68
|
Datadog.logger.warn(
|
|
69
69
|
"Detected issue with profiler (#{failed_component} component), stopping profiling. " \
|
|
70
|
-
"See previous log messages for details."
|
|
70
|
+
"See previous log messages for details.",
|
|
71
71
|
)
|
|
72
72
|
Datadog::Core::Telemetry::Logger
|
|
73
73
|
.error("Detected issue with profiler (#{failed_component} component), stopping profiling")
|
|
@@ -65,7 +65,7 @@ module Datadog
|
|
|
65
65
|
rescue Exception => e # rubocop:disable Lint/RescueException
|
|
66
66
|
Datadog.logger.warn(
|
|
67
67
|
"Profiling::Scheduler thread error. " \
|
|
68
|
-
"Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}"
|
|
68
|
+
"Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}",
|
|
69
69
|
)
|
|
70
70
|
on_failure_proc&.call
|
|
71
71
|
Datadog::Core::Telemetry::Logger.report(e, description: "Profiling::Scheduler thread error")
|
|
@@ -136,7 +136,7 @@ module Datadog
|
|
|
136
136
|
transport.export(flush)
|
|
137
137
|
rescue => e
|
|
138
138
|
Datadog.logger.warn(
|
|
139
|
-
"Unable to report profile. Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}"
|
|
139
|
+
"Unable to report profile. Cause: #{e.class}: #{e.message} Location: #{Array(e.backtrace).first}",
|
|
140
140
|
)
|
|
141
141
|
Datadog::Core::Telemetry::Logger.report(e, description: "Unable to report profile")
|
|
142
142
|
end
|
|
@@ -491,7 +491,7 @@ module Datadog
|
|
|
491
491
|
start_line: UNKNOWN_MIN_LINE,
|
|
492
492
|
end_line: UNKNOWN_MAX_LINE,
|
|
493
493
|
language_specifics: lang,
|
|
494
|
-
scopes: inner_scopes
|
|
494
|
+
scopes: inner_scopes,
|
|
495
495
|
)
|
|
496
496
|
end
|
|
497
497
|
|
|
@@ -507,7 +507,7 @@ module Datadog
|
|
|
507
507
|
source_file: source_file,
|
|
508
508
|
start_line: UNKNOWN_MIN_LINE,
|
|
509
509
|
end_line: UNKNOWN_MAX_LINE,
|
|
510
|
-
symbols: extract_scope_symbols(mod)
|
|
510
|
+
symbols: extract_scope_symbols(mod),
|
|
511
511
|
)
|
|
512
512
|
end
|
|
513
513
|
|
|
@@ -527,7 +527,7 @@ module Datadog
|
|
|
527
527
|
end_line: end_line,
|
|
528
528
|
language_specifics: build_class_language_specifics(klass),
|
|
529
529
|
scopes: method_scopes,
|
|
530
|
-
symbols: extract_scope_symbols(klass)
|
|
530
|
+
symbols: extract_scope_symbols(klass),
|
|
531
531
|
)
|
|
532
532
|
end
|
|
533
533
|
|
|
@@ -997,7 +997,7 @@ module Datadog
|
|
|
997
997
|
end_line: end_line,
|
|
998
998
|
language_specifics: lang,
|
|
999
999
|
scopes: method_scopes + child_scopes,
|
|
1000
|
-
symbols: symbols
|
|
1000
|
+
symbols: symbols,
|
|
1001
1001
|
)
|
|
1002
1002
|
end
|
|
1003
1003
|
|
|
@@ -1023,11 +1023,11 @@ module Datadog
|
|
|
1023
1023
|
end_line: end_line,
|
|
1024
1024
|
targetable_lines: targetable_lines,
|
|
1025
1025
|
language_specifics: {
|
|
1026
|
-
visibility: klass ? method_visibility(klass, method_name) : "public",
|
|
1026
|
+
visibility: klass ? method_visibility(klass, method_name) : "public",
|
|
1027
1027
|
method_type: "instance",
|
|
1028
1028
|
arity: method.arity,
|
|
1029
1029
|
},
|
|
1030
|
-
symbols: extract_method_parameters(method)
|
|
1030
|
+
symbols: extract_method_parameters(method),
|
|
1031
1031
|
)
|
|
1032
1032
|
rescue Exception => e # standard:disable Lint/RescueException
|
|
1033
1033
|
Datadog::DI.reraise_if_fatal(e)
|
|
@@ -1049,7 +1049,7 @@ module Datadog
|
|
|
1049
1049
|
symbols << Symbol.new(
|
|
1050
1050
|
symbol_type: "STATIC_FIELD",
|
|
1051
1051
|
name: var_name.to_s,
|
|
1052
|
-
line: UNKNOWN_MIN_LINE
|
|
1052
|
+
line: UNKNOWN_MIN_LINE,
|
|
1053
1053
|
)
|
|
1054
1054
|
end
|
|
1055
1055
|
end
|
|
@@ -1065,7 +1065,7 @@ module Datadog
|
|
|
1065
1065
|
symbol_type: "STATIC_FIELD",
|
|
1066
1066
|
name: const_name.to_s,
|
|
1067
1067
|
line: UNKNOWN_MIN_LINE,
|
|
1068
|
-
type: safe_mod_name(KERNEL_CLASS.bind(const_value).call)
|
|
1068
|
+
type: safe_mod_name(KERNEL_CLASS.bind(const_value).call),
|
|
1069
1069
|
)
|
|
1070
1070
|
rescue NameError, LoadError, NoMethodError, TypeError => e # standard:disable Lint/ShadowedException
|
|
1071
1071
|
# Expected: constant removed/undefined (NameError), autoload failure (LoadError),
|
|
@@ -73,7 +73,7 @@ module Datadog
|
|
|
73
73
|
@telemetry&.distribution(
|
|
74
74
|
Tracing::Ext::TELEMETRY_METRICS_NAMESPACE,
|
|
75
75
|
"symbol_database.payload_size",
|
|
76
|
-
compressed_data.bytesize
|
|
76
|
+
compressed_data.bytesize,
|
|
77
77
|
)
|
|
78
78
|
|
|
79
79
|
# Symbols for very large applications (>50MB after gzip) are dropped:
|
|
@@ -56,7 +56,7 @@ module Datadog
|
|
|
56
56
|
@buffer_spans += trace.length
|
|
57
57
|
rescue => e
|
|
58
58
|
Datadog.logger.debug(
|
|
59
|
-
"Failed to measure queue accept. Cause: #{e.class}: #{e.message} Source: #{Array(e.backtrace).first}"
|
|
59
|
+
"Failed to measure queue accept. Cause: #{e.class}: #{e.message} Source: #{Array(e.backtrace).first}",
|
|
60
60
|
)
|
|
61
61
|
end
|
|
62
62
|
|
|
@@ -66,7 +66,7 @@ module Datadog
|
|
|
66
66
|
@buffer_spans -= trace.length
|
|
67
67
|
rescue => e
|
|
68
68
|
Datadog.logger.debug(
|
|
69
|
-
"Failed to measure queue drop. Cause: #{e.class}: #{e.message} Source: #{Array(e.backtrace).first}"
|
|
69
|
+
"Failed to measure queue drop. Cause: #{e.class}: #{e.message} Source: #{Array(e.backtrace).first}",
|
|
70
70
|
)
|
|
71
71
|
end
|
|
72
72
|
|
|
@@ -91,7 +91,7 @@ module Datadog
|
|
|
91
91
|
@buffer_spans = 0
|
|
92
92
|
rescue => e
|
|
93
93
|
Datadog.logger.debug(
|
|
94
|
-
"Failed to measure queue. Cause: #{e.class}: #{e.message} Source: #{Array(e.backtrace).first}"
|
|
94
|
+
"Failed to measure queue. Cause: #{e.class}: #{e.message} Source: #{Array(e.backtrace).first}",
|
|
95
95
|
)
|
|
96
96
|
end
|
|
97
97
|
end
|
|
@@ -41,7 +41,7 @@ module Datadog
|
|
|
41
41
|
if headers && configuration.header_name
|
|
42
42
|
return Datadog::Core::Utils::Network.stripped_ip_from_request_headers(
|
|
43
43
|
headers,
|
|
44
|
-
ip_headers_to_check: Array(configuration.header_name)
|
|
44
|
+
ip_headers_to_check: Array(configuration.header_name),
|
|
45
45
|
)
|
|
46
46
|
end
|
|
47
47
|
|