File tree Expand file tree Collapse file tree
instrumentation-api-incubator/src/main/java/io/opentelemetry/instrumentation/api/incubator/semconv/faas Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright The OpenTelemetry Authors
3+ * SPDX-License-Identifier: Apache-2.0
4+ */
5+
6+ package io .opentelemetry .instrumentation .api .incubator .semconv .faas ;
7+
8+ import io .opentelemetry .api .logs .Severity ;
9+ import io .opentelemetry .instrumentation .api .instrumenter .InstrumenterBuilder ;
10+ import io .opentelemetry .instrumentation .api .internal .Experimental ;
11+
12+ /** Utilities for configuring FaaS exception events. */
13+ public final class FaasExceptionEventExtractors {
14+
15+ /** Configures the FaaS invocation exception event name and severity. */
16+ public static <REQUEST > void setFaasInvocationExceptionEventExtractor (
17+ InstrumenterBuilder <REQUEST , ?> builder ) {
18+ Experimental .setExceptionEventExtractor (
19+ builder ,
20+ (logRecordBuilder , context , request ) -> {
21+ logRecordBuilder .setEventName ("faas.invocation.exception" );
22+ logRecordBuilder .setSeverity (Severity .ERROR );
23+ });
24+ }
25+
26+ private FaasExceptionEventExtractors () {}
27+ }
You can’t perform that action at this time.
0 commit comments