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.



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

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

Instance Method Details

#export(json) ⇒ Object



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

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