Skip to content

Commit 4580d26

Browse files
committed
add missing consts
1 parent d89186a commit 4580d26

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,14 @@ import {
2222
ResourceDetectionConfig,
2323
} from '@opentelemetry/resources';
2424
import {
25-
// AWS attributes
2625
ATTR_AWS_LOG_GROUP_NAMES,
27-
// Cloud attributes
2826
ATTR_CLOUD_PROVIDER,
2927
ATTR_CLOUD_PLATFORM,
3028
ATTR_CLOUD_REGION,
31-
// Cloud values (AWS)
29+
ATTR_FAAS_NAME,
30+
ATTR_FAAS_VERSION,
31+
ATTR_FAAS_INSTANCE,
32+
ATTR_FAAS_MAX_MEMORY,
3233
CLOUD_PROVIDER_VALUE_AWS,
3334
CLOUD_PLATFORM_VALUE_AWS_LAMBDA,
3435
} from '../semconv';

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,28 @@ export const ATTR_CONTAINER_NAME = 'container.name';
210210
*/
211211
export const ATTR_FAAS_NAME = 'faas.name';
212212

213+
/**
214+
* The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.
215+
*
216+
* @example 2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de
217+
*
218+
* @note * **AWS Lambda:** Use the (full) log stream name.
219+
*
220+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
221+
*/
222+
export const ATTR_FAAS_INSTANCE = 'faas.instance' as const;
223+
224+
/**
225+
* The amount of memory available to the serverless function converted to Bytes.
226+
*
227+
* @example 134217728
228+
*
229+
* @note It's recommended to set this attribute since e.g. too little memory can easily stop a Java AWS Lambda function from working correctly. On AWS Lambda, the environment variable `AWS_LAMBDA_FUNCTION_MEMORY_SIZE` provides this information (which must be multiplied by 1,048,576).
230+
*
231+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
232+
*/
233+
export const ATTR_FAAS_MAX_MEMORY = 'faas.max_memory' as const;
234+
213235
/**
214236
* The immutable version of the function being executed.
215237
*

0 commit comments

Comments
 (0)