-
Notifications
You must be signed in to change notification settings - Fork 280
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Share details about your runtime
Operating system details: MacOS
RUBY_ENGINE: "ruby"
RUBY_VERSION: "3.4.5"
RUBY_DESCRIPTION: "ruby 3.4.5 (2025-07-16 revision 20cda200d3) +PRISM [arm64-darwin24]"
Share a simplified reproduction if possible
require 'opentelemetry-logs-sdk'
require 'opentelemetry/exporter/otlp_logs'
# Create a LoggerProvider
logger_provider = OpenTelemetry::SDK::Logs::LoggerProvider.new
# Create a batching processor configured to export to the OTLP exporter
processor = OpenTelemetry::SDK::Logs::Export::BatchLogRecordProcessor.new(OpenTelemetry::Exporter::OTLP::Logs::LogsExporter.new)
# Add the processor to the LoggerProvider
logger_provider.add_log_record_processor(processor)
# Access a Logger for your library from your LoggerProvider
logger = logger_provider.logger(name: 'my_app_or_gem', version: '0.1.0')
# Use your Logger to emit a log record
logger.on_emit(
timestamp: Time.now,
severity_text: 'INFO',
body: 'Thuja plicata',
attributes: { 'cedar' => true },
)
logger_provider.shutdown
Tip: React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working