Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/metrics_sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
# Default endpoints: 0.0.0.0:4317 for gRPC and 0.0.0.0:4318 for HTTP
endpoint: 0.0.0.0:4318

exporters:
debug:
Expand Down
3 changes: 3 additions & 0 deletions examples/metrics_sdk/metrics_collect.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
require 'opentelemetry/sdk'
require 'opentelemetry-metrics-sdk'

# this example manually configures the exporter, turn off automatic configuration
ENV['OTEL_METRICS_EXPORTER'] = 'none'

OpenTelemetry::SDK.configure

console_metric_exporter = OpenTelemetry::SDK::Metrics::Export::ConsoleMetricPullExporter.new
Expand Down
3 changes: 3 additions & 0 deletions examples/metrics_sdk/metrics_collect_otlp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
require 'opentelemetry-metrics-sdk'
require 'opentelemetry-exporter-otlp-metrics'

# this example manually configures the exporter, turn off automatic configuration
ENV['OTEL_METRICS_EXPORTER'] = 'none'

OpenTelemetry::SDK.configure

otlp_metric_exporter = OpenTelemetry::Exporter::OTLP::Metrics::MetricsExporter.new
Expand Down
Loading