Skip to content

Commit

Permalink
Add metastruct type
Browse files Browse the repository at this point in the history
  • Loading branch information
vpellan committed Feb 5, 2025
1 parent 3ffcd14 commit aa4b999
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
8 changes: 5 additions & 3 deletions sig/datadog/tracing/metadata/metastruct.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ module Datadog
module Tracing
module Metadata
module Metastruct
def metastruct=: (Hash[String, untyped] second) -> void
type metastruct = Hash[String, untyped]

def deep_merge_metastruct!: (Hash[String, untyped] second) -> void
def metastruct=: (metastruct second) -> void

def deep_merge_metastruct!: (metastruct second) -> void

def get_metastruct: (String key) -> untyped

def metastruct: () -> Hash[String, untyped]
def metastruct: () -> metastruct
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions sig/datadog/tracing/span.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Datadog
attr_accessor end_time: (Time | nil)
attr_accessor id: Integer
attr_accessor meta: Hash[String, String]
attr_accessor metastruct: Hash[String, untyped]
attr_accessor metastruct: Metadata::Metastruct::metastruct
attr_accessor metrics: Hash[String, Float]
attr_accessor name: String
attr_accessor parent_id: Integer
Expand All @@ -26,7 +26,7 @@ module Datadog
?end_time: (Time | nil),
?id: (Integer | nil),
?meta: (Hash[String, String] | nil),
?metastruct: (Hash[String, untyped] | nil),
?metastruct: (Metadata::Metastruct::metastruct | nil),
?metrics: (Hash[String, Float] | nil),
?parent_id: Integer,
?resource: String,
Expand Down
2 changes: 1 addition & 1 deletion sig/datadog/tracing/trace_operation.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module Datadog
attr_writer sampled: untyped
attr_writer service: untyped

def initialize: (?agent_sample_rate: untyped?, ?events: untyped?, ?hostname: untyped?, ?id: untyped?, ?max_length: untyped, ?name: untyped?, ?origin: untyped?, ?parent_span_id: untyped?, ?rate_limiter_rate: untyped?, ?resource: untyped?, ?rule_sample_rate: untyped?, ?sample_rate: untyped?, ?sampled: untyped?, ?sampling_priority: untyped?, ?service: untyped?, ?tags: untyped?, ?metastruct: untyped?, ?metrics: untyped?, ?remote_parent: untyped?) -> void
def initialize: (?agent_sample_rate: untyped?, ?events: untyped?, ?hostname: untyped?, ?id: untyped?, ?max_length: untyped, ?name: untyped?, ?origin: untyped?, ?parent_span_id: untyped?, ?rate_limiter_rate: untyped?, ?resource: untyped?, ?rule_sample_rate: untyped?, ?sample_rate: untyped?, ?sampled: untyped?, ?sampling_priority: untyped?, ?service: untyped?, ?tags: untyped?, ?metastruct: Metadata::Metastruct::metastruct?, ?metrics: untyped?, ?remote_parent: untyped?) -> void
def full?: () -> untyped
def finished_span_count: () -> untyped
def finished?: () -> untyped
Expand Down
4 changes: 2 additions & 2 deletions sig/datadog/tracing/trace_segment.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module Datadog
attr_reader sampling_priority: untyped
attr_reader service: untyped

def initialize: (untyped spans, ?agent_sample_rate: untyped?, ?hostname: untyped?, ?id: untyped?, ?lang: untyped?, ?name: untyped?, ?origin: untyped?, ?process_id: untyped?, ?rate_limiter_rate: untyped?, ?resource: untyped?, ?root_span_id: untyped?, ?rule_sample_rate: untyped?, ?runtime_id: untyped?, ?sample_rate: untyped?, ?sampling_priority: untyped?, ?service: untyped?, ?tags: untyped?, ?metrics: untyped?, ?metastruct: untyped?) -> void
def initialize: (untyped spans, ?agent_sample_rate: untyped?, ?hostname: untyped?, ?id: untyped?, ?lang: untyped?, ?name: untyped?, ?origin: untyped?, ?process_id: untyped?, ?rate_limiter_rate: untyped?, ?resource: untyped?, ?root_span_id: untyped?, ?rule_sample_rate: untyped?, ?runtime_id: untyped?, ?sample_rate: untyped?, ?sampling_priority: untyped?, ?service: untyped?, ?tags: untyped?, ?metrics: untyped?, ?metastruct: Metadata::Metastruct::metastruct?) -> void
def any?: () -> untyped
def count: () -> untyped
def empty?: () -> untyped
Expand All @@ -36,7 +36,7 @@ module Datadog
attr_reader root_span_id: untyped
attr_reader meta: untyped
attr_reader metrics: untyped
attr_reader metastruct: untyped
attr_reader metastruct: Metadata::Metastruct::metastruct

private

Expand Down

0 comments on commit aa4b999

Please sign in to comment.