File tree Expand file tree Collapse file tree 3 files changed +34
-2
lines changed
detectors/node/opentelemetry-resource-detector-aws Expand file tree Collapse file tree 3 files changed +34
-2
lines changed Original file line number Diff line number Diff line change 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' ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 66 },
77 "include" : [
88 " src/**/*.ts" ,
9- " test/**/*.ts"
9+ " test/**/*.ts" ,
10+ " lib/**/*.ts"
1011 ]
1112}
You can’t perform that action at this time.
0 commit comments