Skip to content

Commit 0db649f

Browse files
authored
fix(instrumentation-aws-lambda): do not import from semantic-conventions incubating entry-point (#2670)
1 parent 4fb610d commit 0db649f

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

plugins/node/opentelemetry-instrumentation-aws-lambda/src/instrumentation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import {
4545
SEMRESATTRS_CLOUD_ACCOUNT_ID,
4646
SEMRESATTRS_FAAS_ID,
4747
} from '@opentelemetry/semantic-conventions';
48-
import { ATTR_FAAS_COLDSTART } from '@opentelemetry/semantic-conventions/incubating';
48+
import { ATTR_FAAS_COLDSTART } from './semconv';
4949

5050
import {
5151
APIGatewayProxyEventHeaders,
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright The OpenTelemetry Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/*
18+
* This file contains a copy of unstable semantic convention definitions
19+
* used by this package.
20+
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
21+
*/
22+
23+
/**
24+
* A boolean that is true if the serverless function is executed for the first time (aka cold-start).
25+
*
26+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
27+
*/
28+
export const ATTR_FAAS_COLDSTART = 'faas.coldstart';

0 commit comments

Comments
 (0)