Class: Fluent::Plugin::Opentelemetry::Response::Traces
- Inherits:
-
Object
- Object
- Fluent::Plugin::Opentelemetry::Response::Traces
- Defined in:
- lib/fluent/plugin/opentelemetry/response.rb
Class Method Summary collapse
Instance Method Summary collapse
- #body(type:) ⇒ Object
-
#initialize(rejected: 0, error: "") ⇒ Traces
constructor
A new instance of Traces.
Constructor Details
Class Method Details
.build(rejected: 0, error: "") ⇒ Object
69 70 71 72 73 74 75 76 |
# File 'lib/fluent/plugin/opentelemetry/response.rb', line 69 def self.build(rejected: 0, error: "") Opentelemetry::Proto::Collector::Trace::V1::ExportTraceServiceResponse.new( partial_success: Opentelemetry::Proto::Collector::Trace::V1::ExportTracePartialSuccess.new( rejected_spans: rejected, error_message: error ) ) end |
Instance Method Details
#body(type:) ⇒ Object
82 83 84 85 86 87 88 |
# File 'lib/fluent/plugin/opentelemetry/response.rb', line 82 def body(type:) if type == :protobuf @response.to_proto else @response.to_json end end |