lib/opentelemetry/sdk/configurator.rb in opentelemetry-sdk-1.5.0 vs lib/opentelemetry/sdk/configurator.rb in opentelemetry-sdk-1.6.0
- old
+ new
@@ -88,11 +88,11 @@
self.resource = OpenTelemetry::SDK::Resources::Resource.create(
OpenTelemetry::SemanticConventions::Resource::SERVICE_VERSION => service_version
)
end
- # Install an instrumentation with specificied optional +config+.
+ # Install an instrumentation with specified optional +config+.
# Use can be called multiple times to install multiple instrumentation.
# Only +use+ or +use_all+, but not both when installing
# instrumentation. A call to +use_all+ after +use+ will result in an
# exception.
#
@@ -124,31 +124,41 @@
# {SimpleSpanProcessor} for an example.
def add_span_processor(span_processor)
@span_processors << span_processor
end
+ # Add a log record processor to the export pipeline
+ #
+ # @param [#emit, #shutdown, #force_flush] log_record_processor A log_record_processor
+ # that satisfies the duck type #emit, #shutdown, #force_flush. See
+ # {SimpleLogRecordProcessor} for an example.
+ def add_log_record_processor(log_record_processor); end
+
# @api private
# The configure method is where we define the setup process. This allows
# us to make certain guarantees about which systems and globals are setup
# at each stage. The setup process is:
# - setup logging
# - setup propagation
- # - setup tracer_provider and meter_provider
+ # - setup tracer_provider, meter_provider, and logger_provider
# - install instrumentation
def configure
OpenTelemetry.logger = logger
OpenTelemetry.error_handler = error_handler
configure_propagation
configure_span_processors
tracer_provider.id_generator = @id_generator
OpenTelemetry.tracer_provider = tracer_provider
metrics_configuration_hook
+ logs_configuration_hook
install_instrumentation
end
private
def metrics_configuration_hook; end
+
+ def logs_configuration_hook; end
def tracer_provider
@tracer_provider ||= Trace::TracerProvider.new(resource: @resource)
end