Skip to content

Commit ca846b1

Browse files
authored
Merge branch 'main' into fix-sigterm-test
2 parents cbe2117 + 3e95995 commit ca846b1

File tree

15 files changed

+491
-30
lines changed

15 files changed

+491
-30
lines changed

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@ import {
2424
ResourceAttributes,
2525
ResourceDetectionConfig,
2626
} from '@opentelemetry/resources';
27+
import {
28+
ATTR_SERVICE_NAME,
29+
ATTR_SERVICE_VERSION,
30+
} from '@opentelemetry/semantic-conventions';
2731
import {
2832
ATTR_CLOUD_PROVIDER,
2933
ATTR_CLOUD_PLATFORM,
30-
ATTR_SERVICE_NAME,
3134
ATTR_SERVICE_NAMESPACE,
32-
ATTR_SERVICE_VERSION,
3335
ATTR_SERVICE_INSTANCE_ID,
3436
CLOUD_PROVIDER_VALUE_AWS,
3537
CLOUD_PLATFORM_VALUE_AWS_ELASTIC_BEANSTALK,
36-
} from '@opentelemetry/semantic-conventions/incubating';
38+
} from '../semconv';
3739
import * as fs from 'fs';
3840
import * as util from 'util';
3941

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import {
3434
ATTR_HOST_NAME,
3535
CLOUD_PROVIDER_VALUE_AWS,
3636
CLOUD_PLATFORM_VALUE_AWS_EC2,
37-
} from '@opentelemetry/semantic-conventions/incubating';
37+
} from '../semconv';
3838
import * as http from 'http';
3939

4040
/**

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import {
4242
ATTR_AWS_LOG_STREAM_ARNS,
4343
CLOUD_PROVIDER_VALUE_AWS,
4444
CLOUD_PLATFORM_VALUE_AWS_ECS,
45-
} from '@opentelemetry/semantic-conventions/incubating';
45+
} from '../semconv';
4646
// Patch until the OpenTelemetry SDK is updated to ship this attribute
4747
import { SemanticResourceAttributes as AdditionalSemanticResourceAttributes } from './SemanticResourceAttributes';
4848
import * as http from 'http';
@@ -166,8 +166,7 @@ export class AwsEcsDetectorSync implements DetectorSync {
166166

167167
const accountId: string = AwsEcsDetectorSync._getAccountFromArn(taskArn);
168168
const region: string = AwsEcsDetectorSync._getRegionFromArn(taskArn);
169-
const availabilityZone: string | undefined =
170-
taskMetadata?.['AvailabilityZone'];
169+
const availabilityZone: string | undefined = taskMetadata?.AvailabilityZone;
171170

172171
const clusterArn = cluster.startsWith('arn:')
173172
? cluster

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import {
3030
ATTR_CONTAINER_ID,
3131
CLOUD_PROVIDER_VALUE_AWS,
3232
CLOUD_PLATFORM_VALUE_AWS_EKS,
33-
} from '@opentelemetry/semantic-conventions/incubating';
33+
} from '../semconv';
3434
import * as https from 'https';
3535
import * as fs from 'fs';
3636
import * as util from 'util';

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 '../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/src/semconv.ts

Lines changed: 345 additions & 0 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 2 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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';

plugins/node/opentelemetry-instrumentation-pg/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
"dependencies": {
7272
"@opentelemetry/core": "^1.26.0",
7373
"@opentelemetry/instrumentation": "^0.57.0",
74-
"@opentelemetry/semantic-conventions": "1.27.0",
74+
"@opentelemetry/semantic-conventions": "^1.27.0",
7575
"@opentelemetry/sql-common": "^0.40.1",
7676
"@types/pg": "8.6.1",
7777
"@types/pg-pool": "2.0.6"

0 commit comments

Comments
 (0)