class OpenTelemetry::Provider::Configuration

Overview

This class encapsulates the configuration for a TraceProvider.

Defined in:

provider/configuration.cr
provider/configuration/factory.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(service_name : String = "", service_version : String = "", schema_url : String = "", exporter : Exporter | Nil = nil, sampler : Sampler = Sampler::AlwaysOn.new, id_generator : IdGenerator = IdGenerator.new("unique")) #

[View source]
def self.new(service_name : String = "", service_version : String = "", schema_url : String = "", exporter : Exporter | Nil = nil, sampler : Sampler = Sampler::AlwaysOn.new, id_generator : String = "unique") #

[View source]

Class Method Detail

def self.default_exporter_instance #

[View source]
def self.default_sampler_instance #

TODO The Sampler code all feels kind of bodgey. It should be revisited, though maybe that will come naturally when all of the SDK code is surgically separated from the API code.


[View source]
def self.default_schema_url #

[View source]
def self.default_service_name #

[View source]
def self.default_service_version #

[View source]
def self.default_traces_exporter #

[View source]
def self.default_traces_sampler #

[View source]
def self.default_traces_sampler_arg #

[View source]
def self.get_sampler_class_from_name(name) #

[View source]
def self.get_sampler_instance_from_class_and_arg(klass, arg = nil) #

[View source]

Instance Method Detail

def exporter : Exporter | Nil #

[View source]
def exporter=(exporter : Exporter | Nil) #

[View source]
def finalize #

Ensure that any resources, like fibers, are shut down when a TracerProvider object is collected.


[View source]
def id_generator : IdGenerator #

[View source]
def id_generator=(id_generator : IdGenerator) #

[View source]
def sampler : Sampler #

[View source]
def sampler=(sampler : Sampler) #

[View source]
def schema_url : String #

[View source]
def schema_url=(schema_url : String) #

[View source]
def service_name : String #

[View source]
def service_name=(service_name : String) #

[View source]
def service_version : String #

[View source]
def service_version=(service_version : String) #

[View source]