datadog 2.43.0 → 2.45.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 +69 -1
- data/ext/datadog_profiling_native_extension/collectors_cpu_and_wall_time_worker.c +136 -132
- data/ext/datadog_profiling_native_extension/collectors_discrete_dynamic_sampler.c +1 -5
- data/ext/datadog_profiling_native_extension/collectors_gc_profiling_helper.c +0 -2
- data/ext/datadog_profiling_native_extension/collectors_idle_sampling_helper.c +19 -20
- data/ext/datadog_profiling_native_extension/collectors_idle_sampling_helper.h +5 -1
- data/ext/datadog_profiling_native_extension/collectors_stack.c +7 -7
- data/ext/datadog_profiling_native_extension/collectors_stack.h +1 -1
- data/ext/datadog_profiling_native_extension/collectors_thread_context.c +146 -109
- data/ext/datadog_profiling_native_extension/collectors_thread_context.h +3 -2
- data/ext/datadog_profiling_native_extension/extconf.rb +6 -2
- data/ext/datadog_profiling_native_extension/heap_recorder.c +2 -2
- data/ext/datadog_profiling_native_extension/private_vm_api_access.c +122 -53
- data/ext/datadog_profiling_native_extension/private_vm_api_access.h +6 -2
- data/ext/datadog_profiling_native_extension/profiling.c +22 -23
- data/ext/datadog_profiling_native_extension/ruby_helpers.c +3 -1
- data/ext/datadog_profiling_native_extension/ruby_helpers.h +4 -0
- data/ext/datadog_profiling_native_extension/setup_signal_handler.c +0 -2
- data/ext/datadog_profiling_native_extension/stack_recorder.c +10 -28
- data/ext/datadog_profiling_native_extension/stack_recorder.h +0 -1
- data/ext/datadog_profiling_native_extension/time_helpers.c +2 -4
- data/ext/datadog_profiling_native_extension/time_helpers.h +13 -14
- data/ext/libdatadog_api/di.c +8 -3
- data/ext/libdatadog_api/extconf.rb +1 -1
- data/ext/libdatadog_api/feature_flags.c +8 -0
- data/ext/libdatadog_api/init.c +3 -1
- data/ext/libdatadog_api/otel_thread_context.c +38 -17
- data/ext/libdatadog_api/trace_exporter.c +77 -11
- data/ext/libdatadog_extconf_helpers.rb +14 -9
- data/lib/datadog/ai_guard/component.rb +17 -8
- data/lib/datadog/ai_guard/configuration/ext.rb +2 -0
- data/lib/datadog/ai_guard/configuration.rb +13 -0
- data/lib/datadog/ai_guard/contrib/ruby_llm/chat_instrumentation.rb +48 -55
- data/lib/datadog/ai_guard/contrib/ruby_llm/integration.rb +1 -1
- data/lib/datadog/ai_guard/contrib/ruby_llm/message_adapter.rb +76 -0
- data/lib/datadog/ai_guard/contrib/ruby_llm/patcher.rb +1 -0
- data/lib/datadog/ai_guard/contrib/ruby_llm/redaction_change_set.rb +135 -0
- data/lib/datadog/ai_guard/evaluation/client.rb +50 -0
- data/lib/datadog/ai_guard/evaluation/content_part.rb +12 -0
- data/lib/datadog/ai_guard/evaluation/message.rb +25 -7
- data/lib/datadog/ai_guard/evaluation/message_builder.rb +31 -0
- data/lib/datadog/ai_guard/evaluation/no_op_result.rb +6 -6
- data/lib/datadog/ai_guard/evaluation/outcome.rb +24 -0
- data/lib/datadog/ai_guard/evaluation/request.rb +4 -60
- data/lib/datadog/ai_guard/evaluation/response.rb +33 -0
- data/lib/datadog/ai_guard/evaluation/result.rb +11 -18
- data/lib/datadog/ai_guard/evaluation/tool_call.rb +15 -2
- data/lib/datadog/ai_guard/evaluation.rb +25 -11
- data/lib/datadog/ai_guard/ext.rb +1 -0
- data/lib/datadog/ai_guard/{api_client.rb → http_client.rb} +6 -4
- data/lib/datadog/ai_guard/metrics/telemetry.rb +43 -0
- data/lib/datadog/ai_guard/redaction/replacements.rb +97 -0
- data/lib/datadog/ai_guard/redaction/result.rb +29 -0
- data/lib/datadog/ai_guard/redaction.rb +80 -0
- data/lib/datadog/ai_guard.rb +58 -57
- data/lib/datadog/core/configuration/components.rb +9 -1
- data/lib/datadog/core/configuration/settings.rb +5 -2
- data/lib/datadog/core/configuration/supported_configurations.rb +8 -0
- data/lib/datadog/core/remote/client/capabilities.rb +10 -4
- data/lib/datadog/core/remote/component.rb +9 -2
- data/lib/datadog/core/remote/worker.rb +8 -0
- data/lib/datadog/di/instrumenter.rb +1 -1
- data/lib/datadog/di/probe_manager.rb +10 -5
- data/lib/datadog/di/proc_responder.rb +1 -1
- data/lib/datadog/open_feature/agentless/configuration_source.rb +246 -0
- data/lib/datadog/open_feature/agentless/parser.rb +43 -0
- data/lib/datadog/open_feature/agentless/response.rb +19 -0
- data/lib/datadog/open_feature/agentless/transport.rb +103 -0
- data/lib/datadog/open_feature/component.rb +57 -1
- data/lib/datadog/open_feature/configuration/agentless_endpoint.rb +90 -0
- data/lib/datadog/open_feature/configuration/source/resolution.rb +22 -0
- data/lib/datadog/open_feature/configuration/source.rb +43 -0
- data/lib/datadog/open_feature/configuration.rb +118 -0
- data/lib/datadog/open_feature/native_evaluator.rb +1 -14
- data/lib/datadog/open_feature/remote.rb +5 -5
- data/lib/datadog/opentelemetry/signal_configuration.rb +13 -9
- data/lib/datadog/profiling/collectors/cpu_and_wall_time_worker.rb +7 -2
- data/lib/datadog/profiling/collectors/idle_sampling_helper.rb +5 -7
- data/lib/datadog/profiling/component.rb +2 -3
- data/lib/datadog/profiling/exporter.rb +7 -5
- data/lib/datadog/symbol_database/extractor.rb +84 -102
- data/lib/datadog/tracing/component.rb +3 -1
- data/lib/datadog/tracing/configuration/ext.rb +1 -0
- data/lib/datadog/tracing/configuration/settings.rb +9 -2
- data/lib/datadog/tracing/context.rb +24 -2
- data/lib/datadog/tracing/context_provider.rb +9 -5
- data/lib/datadog/tracing/contrib/grape/endpoint.rb +32 -5
- data/lib/datadog/tracing/contrib/utils/quantization/http.rb +6 -3
- data/lib/datadog/tracing/diagnostics/environment_logger.rb +1 -0
- data/lib/datadog/tracing/metadata/ext.rb +3 -0
- data/lib/datadog/tracing/otel_thread_context.rb +76 -11
- data/lib/datadog/tracing/tracer.rb +15 -2
- data/lib/datadog/tracing/transport/native.rb +23 -22
- data/lib/datadog/tracing/transport/trace_formatter.rb +13 -3
- data/lib/datadog/tracing/transport/traces.rb +1 -1
- data/lib/datadog/version.rb +1 -1
- metadata +23 -7
- data/lib/datadog/ai_guard/evaluation/content_builder.rb +0 -31
|
@@ -9,24 +9,89 @@ module Datadog
|
|
|
9
9
|
# https://github.com/open-telemetry/opentelemetry-specification/blob/main/oteps/profiles/4947-thread-ctx.md
|
|
10
10
|
#
|
|
11
11
|
# Native functions are implemented in ext/libdatadog_api/otel_thread_context.c
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
class OTelThreadContext
|
|
13
|
+
UNKNOWN_LOCAL_ROOT_SPAN_ID = 0
|
|
14
|
+
|
|
15
|
+
def self.build(tracing_settings)
|
|
16
|
+
return unless tracing_settings.otel_thread_context_enabled
|
|
17
|
+
|
|
18
|
+
instance = new
|
|
19
|
+
instance if instance.supported? && instance._native_enable
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def initialize
|
|
23
|
+
@span_before_start = proc do |event_span_op, event_trace_op|
|
|
24
|
+
set(
|
|
25
|
+
trace_id: event_trace_op.id,
|
|
26
|
+
span_id: event_span_op.id,
|
|
27
|
+
local_root_span_id: event_trace_op.send(:root_span).id
|
|
28
|
+
)
|
|
16
29
|
end
|
|
17
30
|
|
|
18
|
-
|
|
19
|
-
|
|
31
|
+
@span_finished = proc do |_event_span_op, event_trace_op|
|
|
32
|
+
next if event_trace_op.finished?
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
update_from_trace_op(event_trace_op)
|
|
22
35
|
end
|
|
36
|
+
end
|
|
23
37
|
|
|
24
|
-
|
|
25
|
-
|
|
38
|
+
private_class_method :new
|
|
39
|
+
|
|
40
|
+
def subscribe_to_tracer_events!(events)
|
|
41
|
+
events.span_before_start.subscribe(&@span_before_start)
|
|
42
|
+
events.span_finished.subscribe(&@span_finished)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def set(trace_id:, span_id:, local_root_span_id:)
|
|
46
|
+
# OTel requires trace-id and span-id to be either both set or both unset.
|
|
47
|
+
# Zeroes can be used to indicate that no trace and span are active.
|
|
48
|
+
# https://github.com/open-telemetry/opentelemetry-specification/blob/v1.61.0/oteps/profiles/4947-thread-ctx.md?plain=1#L116C144-L116C189
|
|
49
|
+
return clear if trace_id.zero? || span_id.zero?
|
|
50
|
+
|
|
51
|
+
_native_set(trace_id, span_id, local_root_span_id)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def after_fork
|
|
55
|
+
clear
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def clear
|
|
59
|
+
_native_clear
|
|
60
|
+
rescue => e
|
|
61
|
+
Datadog.logger.debug do
|
|
62
|
+
"Error clearing OTel thread context: #{e.class}: #{e.message}"
|
|
26
63
|
end
|
|
27
64
|
|
|
28
|
-
|
|
29
|
-
|
|
65
|
+
false
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def supported?
|
|
69
|
+
Datadog::Core::LIBDATADOG_API_FAILURE.nil? && _native_supported?
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def update_from_trace_op(trace_op)
|
|
73
|
+
active_span = trace_op.active_span
|
|
74
|
+
|
|
75
|
+
if active_span
|
|
76
|
+
# Internally created active span
|
|
77
|
+
set(
|
|
78
|
+
trace_id: trace_op.id,
|
|
79
|
+
span_id: active_span.id,
|
|
80
|
+
local_root_span_id: trace_op.send(:root_span).id
|
|
81
|
+
)
|
|
82
|
+
elsif trace_op.parent_span_id && trace_op.parent_span_id != 0
|
|
83
|
+
# Active distributed trace context, before first local trace is created
|
|
84
|
+
set(
|
|
85
|
+
trace_id: trace_op.id,
|
|
86
|
+
span_id: trace_op.parent_span_id,
|
|
87
|
+
local_root_span_id: UNKNOWN_LOCAL_ROOT_SPAN_ID
|
|
88
|
+
)
|
|
89
|
+
else
|
|
90
|
+
clear
|
|
91
|
+
end
|
|
92
|
+
rescue => e
|
|
93
|
+
Datadog.logger.debug do
|
|
94
|
+
"Error updating OTel thread context: #{e.class}: #{e.message}"
|
|
30
95
|
end
|
|
31
96
|
end
|
|
32
97
|
end
|
|
@@ -52,10 +52,11 @@ module Datadog
|
|
|
52
52
|
# rubocop:disable Style/KeywordParametersOrder
|
|
53
53
|
# https://github.com/rubocop/rubocop/issues/13933
|
|
54
54
|
trace_flush: Flush::Finished.new,
|
|
55
|
-
context_provider:
|
|
55
|
+
context_provider: nil,
|
|
56
56
|
default_service: Core::Environment::Ext::FALLBACK_SERVICE_NAME,
|
|
57
57
|
enabled: true,
|
|
58
58
|
logger: Datadog.logger,
|
|
59
|
+
otel_thread_context: nil,
|
|
59
60
|
sampler: Sampling::PrioritySampler.new(
|
|
60
61
|
base_sampler: Sampling::AllSampler.new,
|
|
61
62
|
post_sampler: Sampling::RuleSampler.new
|
|
@@ -71,11 +72,16 @@ module Datadog
|
|
|
71
72
|
@default_service = default_service
|
|
72
73
|
@enabled = enabled
|
|
73
74
|
@logger = logger
|
|
74
|
-
@provider = context_provider
|
|
75
75
|
@sampler = sampler
|
|
76
76
|
@span_sampler = span_sampler
|
|
77
77
|
@tags = tags
|
|
78
78
|
@writer = writer
|
|
79
|
+
|
|
80
|
+
@otel_thread_context = otel_thread_context
|
|
81
|
+
|
|
82
|
+
@provider = context_provider || DefaultContextProvider.new(
|
|
83
|
+
otel_thread_context: otel_thread_context
|
|
84
|
+
)
|
|
79
85
|
end
|
|
80
86
|
|
|
81
87
|
# Return a {Datadog::Tracing::SpanOperation span_op} and {Datadog::Tracing::TraceOperation trace_op}
|
|
@@ -341,6 +347,10 @@ module Datadog
|
|
|
341
347
|
# rubocop:enable Lint/UselessMethodDefinition
|
|
342
348
|
end
|
|
343
349
|
|
|
350
|
+
def after_fork
|
|
351
|
+
@otel_thread_context&.after_fork
|
|
352
|
+
end
|
|
353
|
+
|
|
344
354
|
# Shorthand that calls the `shutdown!` method of a registered worker.
|
|
345
355
|
# It's useful to ensure that the Trace Buffer is properly flushed before
|
|
346
356
|
# shutting down the application.
|
|
@@ -352,6 +362,7 @@ module Datadog
|
|
|
352
362
|
#
|
|
353
363
|
# tracer.shutdown!
|
|
354
364
|
def shutdown!
|
|
365
|
+
@otel_thread_context&.clear
|
|
355
366
|
return unless @enabled
|
|
356
367
|
|
|
357
368
|
@writer&.stop
|
|
@@ -445,6 +456,8 @@ module Datadog
|
|
|
445
456
|
reconsider_trace_sampling_on_resource(event_trace_op)
|
|
446
457
|
end
|
|
447
458
|
end
|
|
459
|
+
|
|
460
|
+
@otel_thread_context&.subscribe_to_tracer_events!(events)
|
|
448
461
|
end
|
|
449
462
|
|
|
450
463
|
# Creates a new TraceOperation, with events bounds to this Tracer instance.
|
|
@@ -47,10 +47,10 @@ module Datadog
|
|
|
47
47
|
include Statistics
|
|
48
48
|
include SpanEventsNegotiation
|
|
49
49
|
|
|
50
|
-
attr_reader :logger
|
|
50
|
+
attr_reader :logger, :url
|
|
51
51
|
|
|
52
52
|
# @param agent_settings [Datadog::Core::Configuration::AgentSettingsResolver::AgentSettings]
|
|
53
|
-
# Agent connection settings
|
|
53
|
+
# Agent connection settings, including the request timeout.
|
|
54
54
|
# @param logger [Logger]
|
|
55
55
|
def initialize(agent_settings:, logger:)
|
|
56
56
|
unless Native.supported?
|
|
@@ -67,7 +67,7 @@ module Datadog
|
|
|
67
67
|
# this is held across the fork through the matching completion hook.
|
|
68
68
|
@fork_mutex = Mutex.new
|
|
69
69
|
|
|
70
|
-
url = agent_settings.url
|
|
70
|
+
@url = agent_settings.url
|
|
71
71
|
tracer_version = tracer_version_string
|
|
72
72
|
language = Core::Environment::Ext::LANG
|
|
73
73
|
language_version = Core::Environment::Ext::LANG_VERSION
|
|
@@ -83,6 +83,7 @@ module Datadog
|
|
|
83
83
|
|
|
84
84
|
exporter = Native::TraceExporter._native_new(
|
|
85
85
|
url: url,
|
|
86
|
+
timeout_milliseconds: agent_settings.timeout_seconds * 1000,
|
|
86
87
|
tracer_version: tracer_version,
|
|
87
88
|
language: language,
|
|
88
89
|
language_version: language_version,
|
|
@@ -90,7 +91,8 @@ module Datadog
|
|
|
90
91
|
hostname: hostname,
|
|
91
92
|
env: env,
|
|
92
93
|
service: service,
|
|
93
|
-
version: version
|
|
94
|
+
version: version,
|
|
95
|
+
client_computed_stats: !Datadog.configuration.apm.tracing.enabled
|
|
94
96
|
)
|
|
95
97
|
@exporter = exporter
|
|
96
98
|
|
|
@@ -215,25 +217,24 @@ module Datadog
|
|
|
215
217
|
# native exporter so its runtime can shut down. Idempotent: safe to
|
|
216
218
|
# call multiple times and safe to call after the finalizer has run.
|
|
217
219
|
def close
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
220
|
+
@fork_mutex.synchronize do
|
|
221
|
+
@send_mutex.synchronize do
|
|
222
|
+
hooks = @fork_hooks
|
|
223
|
+
return if hooks.nil?
|
|
224
|
+
|
|
225
|
+
begin
|
|
226
|
+
@exporter&._native_close
|
|
227
|
+
ensure
|
|
228
|
+
@fork_hooks = nil
|
|
229
|
+
@exporter = nil
|
|
230
|
+
hooks.each do |stage, block|
|
|
231
|
+
Core::Utils::AtForkMonkeyPatch.remove_at_fork(stage, block)
|
|
232
|
+
end
|
|
233
|
+
ObjectSpace.undefine_finalizer(self)
|
|
234
|
+
end
|
|
235
|
+
end
|
|
229
236
|
end
|
|
230
237
|
|
|
231
|
-
# The finalizer only exists to deregister the hooks for a transport
|
|
232
|
-
# dropped without #close. We have just done that, so remove it;
|
|
233
|
-
# otherwise its closed-over hook blocks keep the exporter alive until
|
|
234
|
-
# this transport is itself collected.
|
|
235
|
-
ObjectSpace.undefine_finalizer(self)
|
|
236
|
-
|
|
237
238
|
nil
|
|
238
239
|
end
|
|
239
240
|
|
|
@@ -264,7 +265,7 @@ module Datadog
|
|
|
264
265
|
return [] if traces.empty?
|
|
265
266
|
|
|
266
267
|
# Apply trace-level tags to root spans (same as the HTTP transport)
|
|
267
|
-
traces.each { |trace| TraceFormatter.format!(trace) }
|
|
268
|
+
traces.each { |trace| TraceFormatter.format!(trace, transport: "native") }
|
|
268
269
|
|
|
269
270
|
# Build the Array<Array<Span>> structure expected by the C extension.
|
|
270
271
|
# Each trace segment becomes one inner array (one trace chunk).
|
|
@@ -19,8 +19,8 @@ module Datadog
|
|
|
19
19
|
:first_span,
|
|
20
20
|
:trace
|
|
21
21
|
|
|
22
|
-
def self.format!(trace)
|
|
23
|
-
new(trace).format!
|
|
22
|
+
def self.format!(trace, transport: nil)
|
|
23
|
+
new(trace).format!(transport: transport)
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def initialize(trace)
|
|
@@ -32,7 +32,7 @@ module Datadog
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
# Modifies a trace so suitable for transport
|
|
35
|
-
def format!
|
|
35
|
+
def format!(transport: nil)
|
|
36
36
|
return unless trace
|
|
37
37
|
return trace unless root_span
|
|
38
38
|
|
|
@@ -65,10 +65,13 @@ module Datadog
|
|
|
65
65
|
|
|
66
66
|
if first_span
|
|
67
67
|
tag_process_tags!
|
|
68
|
+
tag_sdk_otlp_export!
|
|
68
69
|
tag_git_repository_url!
|
|
69
70
|
tag_git_commit_sha!
|
|
70
71
|
end
|
|
71
72
|
|
|
73
|
+
root_span.set_tag("_dd.tracing.transport", transport) if transport && !partial?
|
|
74
|
+
|
|
72
75
|
trace
|
|
73
76
|
end
|
|
74
77
|
|
|
@@ -237,6 +240,13 @@ module Datadog
|
|
|
237
240
|
)
|
|
238
241
|
end
|
|
239
242
|
|
|
243
|
+
# TODO: Revisit when OTLP trace export support lands. The OTLP path sets
|
|
244
|
+
# `_dd.sdk.otlp_export: "true"` on the OTLP resource, so this tag must not
|
|
245
|
+
# also be set to "false" on the first span of a chunk exported over OTLP.
|
|
246
|
+
def tag_sdk_otlp_export!
|
|
247
|
+
first_span.set_tag(Tracing::Metadata::Ext::TAG_SDK_OTLP_EXPORT, "false")
|
|
248
|
+
end
|
|
249
|
+
|
|
240
250
|
private
|
|
241
251
|
|
|
242
252
|
def partial?
|
|
@@ -100,7 +100,7 @@ module Datadog
|
|
|
100
100
|
|
|
101
101
|
def encode_trace(encoder, trace, logger:, native_events_supported:)
|
|
102
102
|
# Format the trace for transport
|
|
103
|
-
TraceFormatter.format!(trace)
|
|
103
|
+
TraceFormatter.format!(trace, transport: "ruby")
|
|
104
104
|
|
|
105
105
|
# Make the trace serializable
|
|
106
106
|
serializable_trace = SerializableTrace.new(trace, native_events_supported: native_events_supported)
|
data/lib/datadog/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: datadog
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.45.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Datadog, Inc.
|
|
@@ -63,14 +63,14 @@ dependencies:
|
|
|
63
63
|
requirements:
|
|
64
64
|
- - "~>"
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
|
-
version:
|
|
66
|
+
version: 45.0.0.1.0
|
|
67
67
|
type: :runtime
|
|
68
68
|
prerelease: false
|
|
69
69
|
version_requirements: !ruby/object:Gem::Requirement
|
|
70
70
|
requirements:
|
|
71
71
|
- - "~>"
|
|
72
72
|
- !ruby/object:Gem::Version
|
|
73
|
-
version:
|
|
73
|
+
version: 45.0.0.1.0
|
|
74
74
|
- !ruby/object:Gem::Dependency
|
|
75
75
|
name: logger
|
|
76
76
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -190,7 +190,6 @@ files:
|
|
|
190
190
|
- ext/libdatadog_extconf_helpers.rb
|
|
191
191
|
- lib/datadog.rb
|
|
192
192
|
- lib/datadog/ai_guard.rb
|
|
193
|
-
- lib/datadog/ai_guard/api_client.rb
|
|
194
193
|
- lib/datadog/ai_guard/autoload.rb
|
|
195
194
|
- lib/datadog/ai_guard/component.rb
|
|
196
195
|
- lib/datadog/ai_guard/configuration.rb
|
|
@@ -204,16 +203,26 @@ files:
|
|
|
204
203
|
- lib/datadog/ai_guard/contrib/rails/patcher.rb
|
|
205
204
|
- lib/datadog/ai_guard/contrib/ruby_llm/chat_instrumentation.rb
|
|
206
205
|
- lib/datadog/ai_guard/contrib/ruby_llm/integration.rb
|
|
206
|
+
- lib/datadog/ai_guard/contrib/ruby_llm/message_adapter.rb
|
|
207
207
|
- lib/datadog/ai_guard/contrib/ruby_llm/patcher.rb
|
|
208
|
+
- lib/datadog/ai_guard/contrib/ruby_llm/redaction_change_set.rb
|
|
208
209
|
- lib/datadog/ai_guard/evaluation.rb
|
|
209
|
-
- lib/datadog/ai_guard/evaluation/
|
|
210
|
+
- lib/datadog/ai_guard/evaluation/client.rb
|
|
210
211
|
- lib/datadog/ai_guard/evaluation/content_part.rb
|
|
211
212
|
- lib/datadog/ai_guard/evaluation/message.rb
|
|
213
|
+
- lib/datadog/ai_guard/evaluation/message_builder.rb
|
|
212
214
|
- lib/datadog/ai_guard/evaluation/no_op_result.rb
|
|
215
|
+
- lib/datadog/ai_guard/evaluation/outcome.rb
|
|
213
216
|
- lib/datadog/ai_guard/evaluation/request.rb
|
|
217
|
+
- lib/datadog/ai_guard/evaluation/response.rb
|
|
214
218
|
- lib/datadog/ai_guard/evaluation/result.rb
|
|
215
219
|
- lib/datadog/ai_guard/evaluation/tool_call.rb
|
|
216
220
|
- lib/datadog/ai_guard/ext.rb
|
|
221
|
+
- lib/datadog/ai_guard/http_client.rb
|
|
222
|
+
- lib/datadog/ai_guard/metrics/telemetry.rb
|
|
223
|
+
- lib/datadog/ai_guard/redaction.rb
|
|
224
|
+
- lib/datadog/ai_guard/redaction/replacements.rb
|
|
225
|
+
- lib/datadog/ai_guard/redaction/result.rb
|
|
217
226
|
- lib/datadog/appsec.rb
|
|
218
227
|
- lib/datadog/appsec/actions_handler.rb
|
|
219
228
|
- lib/datadog/appsec/actions_handler/serializable_backtrace.rb
|
|
@@ -577,8 +586,15 @@ files:
|
|
|
577
586
|
- lib/datadog/kit/identity.rb
|
|
578
587
|
- lib/datadog/kit/tracing/method_tracer.rb
|
|
579
588
|
- lib/datadog/open_feature.rb
|
|
589
|
+
- lib/datadog/open_feature/agentless/configuration_source.rb
|
|
590
|
+
- lib/datadog/open_feature/agentless/parser.rb
|
|
591
|
+
- lib/datadog/open_feature/agentless/response.rb
|
|
592
|
+
- lib/datadog/open_feature/agentless/transport.rb
|
|
580
593
|
- lib/datadog/open_feature/component.rb
|
|
581
594
|
- lib/datadog/open_feature/configuration.rb
|
|
595
|
+
- lib/datadog/open_feature/configuration/agentless_endpoint.rb
|
|
596
|
+
- lib/datadog/open_feature/configuration/source.rb
|
|
597
|
+
- lib/datadog/open_feature/configuration/source/resolution.rb
|
|
582
598
|
- lib/datadog/open_feature/evaluation_engine.rb
|
|
583
599
|
- lib/datadog/open_feature/exposures/batch_builder.rb
|
|
584
600
|
- lib/datadog/open_feature/exposures/buffer.rb
|
|
@@ -1174,8 +1190,8 @@ licenses:
|
|
|
1174
1190
|
- Apache-2.0
|
|
1175
1191
|
metadata:
|
|
1176
1192
|
allowed_push_host: https://rubygems.org
|
|
1177
|
-
changelog_uri: https://github.com/DataDog/dd-trace-rb/blob/v2.
|
|
1178
|
-
source_code_uri: https://github.com/DataDog/dd-trace-rb/tree/v2.
|
|
1193
|
+
changelog_uri: https://github.com/DataDog/dd-trace-rb/blob/v2.45.0/CHANGELOG.md
|
|
1194
|
+
source_code_uri: https://github.com/DataDog/dd-trace-rb/tree/v2.45.0
|
|
1179
1195
|
post_install_message: 'JRuby support in the datadog gem is deprecated. Details: https://dtdg.co/jruby-deprecation'
|
|
1180
1196
|
rdoc_options: []
|
|
1181
1197
|
require_paths:
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Datadog
|
|
4
|
-
module AIGuard
|
|
5
|
-
module Evaluation
|
|
6
|
-
# Builder for collecting content parts inside a message block.
|
|
7
|
-
#
|
|
8
|
-
# Used via the block form of {Datadog::AIGuard.message}:
|
|
9
|
-
#
|
|
10
|
-
# Datadog::AIGuard.message(role: :user) do |m|
|
|
11
|
-
# m.text("What's in this image?")
|
|
12
|
-
# m.image_url("https://example.com/img.png")
|
|
13
|
-
# end
|
|
14
|
-
class ContentBuilder
|
|
15
|
-
attr_reader :parts
|
|
16
|
-
|
|
17
|
-
def initialize
|
|
18
|
-
@parts = []
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def text(text)
|
|
22
|
-
@parts << ContentPart::Text.new(text)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def image_url(url)
|
|
26
|
-
@parts << ContentPart::ImageURL.new(url)
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|