Skip to content

Commit aa4b999

Browse files
committed
Add metastruct type
1 parent 3ffcd14 commit aa4b999

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

sig/datadog/tracing/metadata/metastruct.rbs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ module Datadog
22
module Tracing
33
module Metadata
44
module Metastruct
5-
def metastruct=: (Hash[String, untyped] second) -> void
5+
type metastruct = Hash[String, untyped]
66

7-
def deep_merge_metastruct!: (Hash[String, untyped] second) -> void
7+
def metastruct=: (metastruct second) -> void
8+
9+
def deep_merge_metastruct!: (metastruct second) -> void
810

911
def get_metastruct: (String key) -> untyped
1012

11-
def metastruct: () -> Hash[String, untyped]
13+
def metastruct: () -> metastruct
1214
end
1315
end
1416
end

sig/datadog/tracing/span.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ module Datadog
66
attr_accessor end_time: (Time | nil)
77
attr_accessor id: Integer
88
attr_accessor meta: Hash[String, String]
9-
attr_accessor metastruct: Hash[String, untyped]
9+
attr_accessor metastruct: Metadata::Metastruct::metastruct
1010
attr_accessor metrics: Hash[String, Float]
1111
attr_accessor name: String
1212
attr_accessor parent_id: Integer
@@ -26,7 +26,7 @@ module Datadog
2626
?end_time: (Time | nil),
2727
?id: (Integer | nil),
2828
?meta: (Hash[String, String] | nil),
29-
?metastruct: (Hash[String, untyped] | nil),
29+
?metastruct: (Metadata::Metastruct::metastruct | nil),
3030
?metrics: (Hash[String, Float] | nil),
3131
?parent_id: Integer,
3232
?resource: String,

sig/datadog/tracing/trace_operation.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module Datadog
2323
attr_writer sampled: untyped
2424
attr_writer service: untyped
2525

26-
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
26+
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
2727
def full?: () -> untyped
2828
def finished_span_count: () -> untyped
2929
def finished?: () -> untyped

sig/datadog/tracing/trace_segment.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module Datadog
2222
attr_reader sampling_priority: untyped
2323
attr_reader service: untyped
2424

25-
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
25+
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
2626
def any?: () -> untyped
2727
def count: () -> untyped
2828
def empty?: () -> untyped
@@ -36,7 +36,7 @@ module Datadog
3636
attr_reader root_span_id: untyped
3737
attr_reader meta: untyped
3838
attr_reader metrics: untyped
39-
attr_reader metastruct: untyped
39+
attr_reader metastruct: Metadata::Metastruct::metastruct
4040

4141
private
4242

0 commit comments

Comments
 (0)