Class: Fluent::Plugin::Opentelemetry::Response::Logs
- Inherits:
-
Object
- Object
- Fluent::Plugin::Opentelemetry::Response::Logs
- Defined in:
- lib/fluent/plugin/opentelemetry/response.rb
Class Method Summary collapse
Instance Method Summary collapse
- #body(type:) ⇒ Object
-
#initialize(rejected: 0, error: "") ⇒ Logs
constructor
A new instance of Logs.
Constructor Details
Class Method Details
.build(rejected: 0, error: "") ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/fluent/plugin/opentelemetry/response.rb', line 23 def self.build(rejected: 0, error: "") Opentelemetry::Proto::Collector::Logs::V1::ExportLogsServiceResponse.new( partial_success: Opentelemetry::Proto::Collector::Logs::V1::ExportLogsPartialSuccess.new( rejected_log_records: rejected, error_message: error ) ) end |
Instance Method Details
#body(type:) ⇒ Object
36 37 38 39 40 41 42 |
# File 'lib/fluent/plugin/opentelemetry/response.rb', line 36 def body(type:) if type == :protobuf @response.to_proto else @response.to_json end end |