Skip to content

Commit d0e8d43

Browse files
committed
fix(detector-aws): remove semconv incubating import
1 parent 4cf7e6f commit d0e8d43

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
* Following OpenTelemetry semantic conventions best practices, we copy the incubating
19+
* semantic conventions into our codebase rather than importing them directly.
20+
* This prevents breaking changes in minor versions and reduces disk usage from multiple versions.
21+
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
22+
*/
23+
24+
export const ATTR_CLOUD_PROVIDER = 'cloud.provider';
25+
export const ATTR_CLOUD_PLATFORM = 'cloud.platform';
26+
export const ATTR_CLOUD_REGION = 'cloud.region';
27+
export const ATTR_FAAS_VERSION = 'faas.version';
28+
export const ATTR_FAAS_NAME = 'faas.name';
29+
30+
export const CLOUD_PROVIDER_VALUE_AWS = 'aws';
31+
export const CLOUD_PLATFORM_VALUE_AWS_LAMBDA = 'aws_lambda';

detectors/node/opentelemetry-resource-detector-aws/src/detectors/AwsLambdaDetectorSync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import {
2929
ATTR_FAAS_NAME,
3030
CLOUD_PROVIDER_VALUE_AWS,
3131
CLOUD_PLATFORM_VALUE_AWS_LAMBDA,
32-
} from '@opentelemetry/semantic-conventions/incubating';
32+
} from '../../lib/semconv';
3333

3434
/**
3535
* The AwsLambdaDetector can be used to detect if a process is running in AWS Lambda

detectors/node/opentelemetry-resource-detector-aws/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
},
77
"include": [
88
"src/**/*.ts",
9-
"test/**/*.ts"
9+
"test/**/*.ts",
10+
"lib/**/*.ts"
1011
]
1112
}

0 commit comments

Comments
 (0)