abstract struct OpenTelemetry::Sampler
- OpenTelemetry::Sampler
- Struct
- Value
- Object
Direct Known Subclasses
Defined in:
sampler.crsampler/sampling_result.cr
Constructors
-
.new(arg = nil)
The generic initializer should always accept an arg, even if that arg isn't used.
Instance Method Summary
-
#description
This should probably be overridden with a specific, appropriate name.
-
#get_description
Crystal doesn't tend to yuse
get_*
names, but this name is provided as an alias for#description
to be more spec compliant, as it requestgetDescription
or a close equivalent. - #should_sample(context : SpanContext, name : String = "", trace_id : Slice(UInt8) | Nil = nil, kind : OpenTelemetry::Span::Kind = OpenTelemetry::Span::Kind::Internal, attributes : Hash(String, AnyAttribute) = {} of String => AnyAttribute, links : Nil = nil) : SamplingResult
- #should_sample(span)
- #to_s(io)
Constructor Detail
def self.new(arg = nil)
#
The generic initializer should always accept an arg, even if that arg isn't used. This just makes life easier for implementers.
Instance Method Detail
def get_description
#
Crystal doesn't tend to yuse get_*
names, but this name is provided as an alias for #description
to be more spec compliant,
as it request getDescription
or a close equivalent.
ameba:disable Naming/AccessorMethodName
def should_sample(context : SpanContext, name : String = "", trace_id : Slice(UInt8) | Nil = nil, kind : OpenTelemetry::Span::Kind = OpenTelemetry::Span::Kind::Internal, attributes : Hash(String, AnyAttribute) = {} of String => AnyAttribute, links : Nil = nil) : SamplingResult
#