Class: Fluent::Plugin::Opentelemetry::ServiceStub::Logs

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Logs.



14
15
16
# File 'lib/fluent/plugin/opentelemetry/service_stub.rb', line 14

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

Instance Method Details

#export(json) ⇒ Object



18
19
20
21
# File 'lib/fluent/plugin/opentelemetry/service_stub.rb', line 18

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