SDK/Logs/LogRecord/Processor/Simple.pm

filter: Statementstmt 95.6% 22 / 23 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 1 / 1 totaltotal 96.5% 28 / 29 CC 1 SCAR 0.0
CC
1
Cov
96%
on_emit
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« SDK/Trace/Sampler/Result.pm ↑ Summary SDK/InstrumentationScope.pm »
1 2 ▶use Object::Pad ':experimental(init_expr)';
Subroutine BEGIN: called CC=1 SCAR=0.0
2 # ABSTRACT: A basic OpenTelemetry log record processor
3  
4 package OpenTelemetry::SDK::Logs::LogRecord::Processor::Simple;
5  
6 2 our $VERSION = '0.101';
7  
8 class OpenTelemetry::SDK::Logs::LogRecord::Processor::Simple
9 :isa(OpenTelemetry::Processor::Simple)
10 :does(OpenTelemetry::Logs::LogRecord::Processor)
11 1 ▶{
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶ use Feature::Compat::Try;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 ▶ method on_emit ($log) {
Subroutine on_emit: called CC=1 SCAR=0.0
Pod documented
15 1 try {
16 1 $self->process($log);
17 }
18 catch ($e) {
19 # TODO: One consequence of using these classes for logging
20 # and not just traces is that we are limited in our ability
21 # to log things. For the time being, we are falling back to
22 # plain warns, but it might be that we need to come up with
23 # some sort of logging equivalent to the untraced_context
24 # that was added to OpenTelemetry::Trace to disable traces
25 # in the OTLP exporter, which uses HTTP::Tiny, and would
26 # generate traces when exporting traces, etc.
27 0 warn "ERROR: $e";
28 # OpenTelemetry->handle_error(
29 # exception => $e,
30 # message => 'unexpected error in ' . ref($self) . '->on_emit',
31 # );
32 }
33  
34 1 return;
35 2 }
36 2 }
« SDK/Trace/Sampler/Result.pm ↑ Summary SDK/InstrumentationScope.pm »