README.md in opentelemetry-exporter-otlp-0.20.1 vs README.md in opentelemetry-exporter-otlp-0.20.2
- old
+ new
@@ -33,21 +33,20 @@
```ruby
require 'opentelemetry/sdk'
require 'opentelemetry/exporter/otlp'
-# Configure the sdk with custom export
-OpenTelemetry::SDK.configure do |c|
- c.add_span_processor(
- OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor.new(
- OpenTelemetry::Exporter::OTLP::Exporter.new(
- compression: 'gzip'
- )
- )
- )
-end
+# The OTLP exporter is the default, so no configuration is needed.
+# However, it could be manually selected via an environment variable if required:
+#
+# ENV['OTEL_TRACES_EXPORTER'] = 'otlp'
+#
+# You may also configure various settings via environment variables:
+# ENV['OTEL_EXPORTER_OTLP_COMPRESSION'] = 'gzip'
+OpenTelemetry::SDK.configure
+
# To start a trace you need to get a Tracer from the TracerProvider
tracer = OpenTelemetry.tracer_provider.tracer('my_app_or_gem', '0.1.0')
# create a span
tracer.in_span('foo') do |span|
@@ -65,10 +64,10 @@
For additional examples, see the [examples on github][examples-github].
## How can I configure the OTLP exporter?
-The collector exporter can be configured explicitly in code, as shown above, or via environment variables. The configuration parameters, environment variables, and defaults are shown below.
+The collector exporter can be configured explicitly in code, or via environment variables as shown above. The configuration parameters, environment variables, and defaults are shown below.
| Parameter | Environment variable | Default |
| ------------------- | -------------------------------------------- | ----------------------------------- |
| `endpoint:` | `OTEL_EXPORTER_OTLP_ENDPOINT` | `"http://localhost:4317/v1/traces"` |
| `certificate_file: `| `OTEL_EXPORTER_OTLP_CERTIFICATE` | |