From 7d8c852ebf883b42c3b7ef16a164d612fca8d05f Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Mon, 13 Jan 2025 10:27:29 +0100 Subject: [PATCH] Update RBS signatures --- sig/datadog/appsec/event.rbs | 14 +++++++------- sig/datadog/appsec/ext.rbs | 12 +++++++----- sig/datadog/appsec/scope.rbs | 35 ----------------------------------- 3 files changed, 14 insertions(+), 47 deletions(-) delete mode 100644 sig/datadog/appsec/scope.rbs diff --git a/sig/datadog/appsec/event.rbs b/sig/datadog/appsec/event.rbs index b4b0e584513..713f73a2129 100644 --- a/sig/datadog/appsec/event.rbs +++ b/sig/datadog/appsec/event.rbs @@ -8,14 +8,14 @@ module Datadog MAX_ENCODED_SCHEMA_SIZE: Numeric MIN_SCHEMA_SIZE_FOR_COMPRESSION: Numeric - def self.record: (Datadog::Tracing::SpanOperation, *untyped events) -> (nil | untyped) + def self.record: (Tracing::SpanOperation, *untyped events) -> (nil | untyped) - def self.record_via_span: (Datadog::Tracing::SpanOperation, *untyped events) -> untyped + def self.record_via_span: (Tracing::SpanOperation, *untyped events) -> untyped def self.build_service_entry_tags: (Array[Hash[::Symbol, untyped]] event_group) -> Hash[::String, untyped] - - def self.tag_and_keep!: (Datadog::AppSec::Scope scope, Datadog::AppSec::WAF::Result waf_result) -> void - + + def self.tag_and_keep!: (Context scope, WAF::Result waf_result) -> void + private def self.compressed_and_base64_encoded: (untyped value) -> untyped @@ -23,8 +23,8 @@ module Datadog def self.json_parse: (untyped value) -> untyped def self.gzip: (untyped value) -> untyped - - def self.add_distributed_tags: (Datadog::Tracing::TraceOperation trace) -> void + + def self.add_distributed_tags: (Tracing::TraceOperation trace) -> void end end end diff --git a/sig/datadog/appsec/ext.rbs b/sig/datadog/appsec/ext.rbs index 2ac545ba1d3..8c4b59fb575 100644 --- a/sig/datadog/appsec/ext.rbs +++ b/sig/datadog/appsec/ext.rbs @@ -1,12 +1,14 @@ module Datadog module AppSec module Ext - INTERRUPT: Symbol - SCOPE_KEY: String + RASP_SQLI: ::Symbol + INTERRUPT: ::Symbol + CONTEXT_KEY: ::String + ACTIVE_CONTEXT_KEY: ::Symbol - TAG_APPSEC_ENABLED: String - TAG_APM_ENABLED: String - TAG_DISTRIBUTED_APPSEC_EVENT: String + TAG_APPSEC_ENABLED: ::String + TAG_APM_ENABLED: ::String + TAG_DISTRIBUTED_APPSEC_EVENT: ::String end end end diff --git a/sig/datadog/appsec/scope.rbs b/sig/datadog/appsec/scope.rbs deleted file mode 100644 index bde7a39b332..00000000000 --- a/sig/datadog/appsec/scope.rbs +++ /dev/null @@ -1,35 +0,0 @@ -module Datadog - module AppSec - class Scope - attr_reader trace: Datadog::Tracing::TraceOperation - - attr_reader service_entry_span: Datadog::Tracing::SpanOperation - - attr_reader processor_context: Datadog::AppSec::Processor::Context - - def initialize: (Datadog::Tracing::TraceOperation trace, Datadog::Tracing::SpanOperation service_entry_span, Datadog::AppSec::Processor::Context processor_context) -> void - - def finalize: () -> void - - def self.activate_scope: (Datadog::Tracing::TraceOperation trace, Datadog::Tracing::SpanOperation service_entry_span, Datadog::AppSec::Processor processor) -> Scope - - def self.deactivate_scope: () -> void - - def self.active_scope: () -> Scope - - private - - def self.active_scope=: (Scope scope) -> Scope - - def self.reset_active_scope: () -> void - - public - - class InactiveScopeError < StandardError - end - - class ActiveScopeError < StandardError - end - end - end -end