lib/aspecto/opentelemetry/configurator.rb in aspecto-opentelemetry-0.1.1 vs lib/aspecto/opentelemetry/configurator.rb in aspecto-opentelemetry-0.1.2

- old
+ new

@@ -11,20 +11,21 @@ @override_resource_attributes = {} self.aspecto_auth = ENV["ASPECTO_AUTH"] self.log_level = ENV.fetch("OTEL_LOG_LEVEL", Logger::ERROR) self.env = ENV["ASPECTO_ENV"] if ENV["ASPECTO_ENV"] self.sampling_ratio = Float(ENV.fetch("ASPECTO_SAMPLING_RATIO", 1.0)) + self.otel_exporter_otlp_traces_endpoint = ENV.fetch("OTEL_EXPORTER_OTLP_TRACES_ENDPOINT", "https://otelcol.aspecto.io/v1/trace") end def service_name=(service_name) @override_resource_attributes[::OpenTelemetry::SemanticConventions::Resource::SERVICE_NAME] = service_name end def env=(env) @override_resource_attributes[::OpenTelemetry::SemanticConventions::Resource::DEPLOYMENT_ENVIRONMENT] = env end - attr_accessor :sampling_ratio, :log_level + attr_accessor :sampling_ratio, :log_level, :otel_exporter_otlp_traces_endpoint attr_reader :aspecto_auth def aspecto_auth=(aspecto_auth) @override_resource_attributes["aspecto.token"] = aspecto_auth @aspecto_auth = aspecto_auth