class OpenTelemetry::TraceProvider

Overview

A TraceProvider encapsulates a set of tracing configuration, and provides an interface for creating Trace instances.

Defined in:

trace_provider.cr

Instance Method Summary

Instance methods inherited from class OpenTelemetry::Provider

config : Configuration config, configure!(new_config) configure!, exporter exporter, exporter=(val) exporter=, id_generator id_generator, id_generator=(val) id_generator=, merge_configuration(secondary_config) merge_configuration, sampler sampler, sampler=(val) sampler=, schema_url schema_url, schema_url=(val) schema_url=, service_name service_name, service_name=(val) service_name=, service_version service_version, service_version=(val) service_version=

Constructor methods inherited from class OpenTelemetry::Provider

new(service_name : String = "", service_version : String = "", schema_url : String = "", exporter : Exporter | Nil = nil, sampler : Sampler = Sampler::AlwaysOn.new, id_generator = "unique")
new(config, &block : Configuration::Factory -> )
new(&block : Configuration::Factory -> )
new

Instance Method Detail

def trace(service_name = nil, service_version = nil, schema_url = nil, provider = self) #

Create a new trace, initializing it with the provided parameters.


[View source]
def trace(&) #

Create a new, uninitialized trace, and pass it to the provided block to complete its initialization.


[View source]
def tracer(service_name = nil, service_version = nil, schema_url = nil, provider = self) #

Alias. The spec uses TracerProviders, which manage Tracers, but which have internal methods and entities like trace_id and TraceState and TraceFlags. Then this library was initially written, I opted for uniformly consistent naming, but that violates the spec. Future versions will move towards deprecating the uniform naming, in places where that naming violates the spec. This is here to start preparing for that transition.


[View source]
def tracer(&) #

Alias. The spec uses TracerProviders, which manage Tracers, but which have internal methods and entities like trace_id and TraceState and TraceFlags. Then this library was initially written, I opted for uniformly consistent naming, but that violates the spec. Future versions will move towards deprecating the uniform naming, in places where that naming violates the spec. This is here to start preparing for that transition.


[View source]