Skip to content

Commit

Permalink
add missing consts
Browse files Browse the repository at this point in the history
  • Loading branch information
garysassano committed Jan 21, 2025
1 parent d89186a commit 4580d26
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ import {
ResourceDetectionConfig,
} from '@opentelemetry/resources';
import {
// AWS attributes
ATTR_AWS_LOG_GROUP_NAMES,
// Cloud attributes
ATTR_CLOUD_PROVIDER,
ATTR_CLOUD_PLATFORM,
ATTR_CLOUD_REGION,
// Cloud values (AWS)
ATTR_FAAS_NAME,
ATTR_FAAS_VERSION,
ATTR_FAAS_INSTANCE,
ATTR_FAAS_MAX_MEMORY,
CLOUD_PROVIDER_VALUE_AWS,
CLOUD_PLATFORM_VALUE_AWS_LAMBDA,
} from '../semconv';
Expand Down
22 changes: 22 additions & 0 deletions detectors/node/opentelemetry-resource-detector-aws/src/semconv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,28 @@ export const ATTR_CONTAINER_NAME = 'container.name';
*/
export const ATTR_FAAS_NAME = 'faas.name';

/**
* The execution environment ID as a string, that will be potentially reused for other invocations to the same function/function version.
*
* @example 2021/06/28/[$LATEST]2f399eb14537447da05ab2a2e39309de
*
* @note * **AWS Lambda:** Use the (full) log stream name.
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
export const ATTR_FAAS_INSTANCE = 'faas.instance' as const;

/**
* The amount of memory available to the serverless function converted to Bytes.
*
* @example 134217728
*
* @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).
*
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
*/
export const ATTR_FAAS_MAX_MEMORY = 'faas.max_memory' as const;

/**
* The immutable version of the function being executed.
*
Expand Down

0 comments on commit 4580d26

Please sign in to comment.