Class: Fluent::Plugin::Opentelemetry::GrpcOutputHandler::ServiceStub::Traces

Inherits:
Object
  • Object
show all
Defined in:
lib/fluent/plugin/opentelemetry/grpc_output_handler.rb

Instance Method Summary collapse

Constructor Details

#initialize(host, creds, **kw) ⇒ Traces

Returns a new instance of Traces.



39
40
41
# File 'lib/fluent/plugin/opentelemetry/grpc_output_handler.rb', line 39

def initialize(host, creds, **kw)
  @stub = Opentelemetry::Proto::Collector::Trace::V1::TraceService::Stub.new(host, creds, **kw)
end

Instance Method Details

#export(json, **kw) ⇒ Object



43
44
45
46
# File 'lib/fluent/plugin/opentelemetry/grpc_output_handler.rb', line 43

def export(json, **kw)
  message = Opentelemetry::Proto::Collector::Trace::V1::ExportTraceServiceRequest.decode_json(json)
  @stub.export(message, **kw)
end