Class: Skywalking::Reporter::Client::GrpcClient::TraceSegmentReportServiceGrpc
- Inherits:
-
Object
- Object
- Skywalking::Reporter::Client::GrpcClient::TraceSegmentReportServiceGrpc
- Includes:
- Log::Logging
- Defined in:
- lib/skywalking/reporter/client/grpc_client.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ TraceSegmentReportServiceGrpc
constructor
A new instance of TraceSegmentReportServiceGrpc.
- #report_segment(enumerator) ⇒ Object
Methods included from Log::Logging
#debug, #error, #info, #log, #warn
Constructor Details
#initialize(config) ⇒ TraceSegmentReportServiceGrpc
Returns a new instance of TraceSegmentReportServiceGrpc.
97 98 99 100 101 102 103 |
# File 'lib/skywalking/reporter/client/grpc_client.rb', line 97 def initialize(config) @config = config @trace_service ||= TraceSegmentReportServiceStub.new( @config[:collector_backend_services], :this_channel_is_insecure ) end |
Instance Method Details
#report_segment(enumerator) ⇒ Object
105 106 107 108 109 |
# File 'lib/skywalking/reporter/client/grpc_client.rb', line 105 def report_segment(enumerator) @trace_service.collect(enumerator) rescue Exception => e error "Error to report trace segment: #{e.message}}" end |