README.md in opentelemetry-exporter-otlp-0.6.0 vs README.md in opentelemetry-exporter-otlp-0.7.0
- old
+ new
@@ -36,12 +36,12 @@
require 'opentelemetry/exporter/otlp'
# Configure the sdk with custom export
OpenTelemetry::SDK.configure do |c|
c.add_span_processor(
- OpenTelemetry::SDK::Trace::Export::SimpleSpanProcessor.new(
- OpenTelemetry::Exporter::OTLP::Exporter.new(
+ OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
+ exporter: OpenTelemetry::Exporter::OTLP::Exporter.new(
host: 'localhost', port: 55680
)
)
)
end
@@ -52,10 +52,10 @@
# create a span
tracer.in_span('foo') do |span|
# set an attribute
span.set_attribute('platform', 'osx')
# add an event
- span.add_event(name: 'event in bar')
+ span.add_event('event in bar')
# create bar as child of foo
tracer.in_span('bar') do |child_span|
# inspect the span
pp child_span
end