tags

package
v0.0.0-...-45a9bcf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (

	//nolint:revive // TODO(SERV) Fix revive linter
	InitType = "AWS_LAMBDA_INITIALIZATION_TYPE"

	// FunctionARNKey is the tag key for a function's arn
	FunctionARNKey = "function_arn"
	// FunctionNameKey is the tag key for a function's name
	FunctionNameKey = "functionname"
	// ExecutedVersionKey is the tag key for a function's executed version
	ExecutedVersionKey = "executedversion"
	// RuntimeKey is the tag key for a function's runtime (e.g node, python)
	RuntimeKey = "runtime"
	// MemorySizeKey is the tag key for a function's allocated memory size
	MemorySizeKey = "memorysize"
	// ArchitectureKey is the tag key for a function's architecture (e.g. x86_64, arm64)
	ArchitectureKey = "architecture"

	// EnvKey is the tag key for a function's env environment variable
	EnvKey = "env"
	// VersionKey is the tag key for a function's version environment variable
	VersionKey = "version"
	// ServiceKey is the tag key for a function's service environment variable
	ServiceKey = "service"

	// SnapStartValue is the Lambda init type env var value indicating SnapStart initialized the function
	SnapStartValue = "snap-start"

	// ComputeStatsKey is the tag key indicating whether trace stats should be computed
	ComputeStatsKey = "_dd.compute_stats"
	// ComputeStatsValue is the tag value indicating trace stats should be computed
	ComputeStatsValue = "1"

	// X86LambdaPlatform is for the lambda platform X86_64
	X86LambdaPlatform = "x86_64"
	// ArmLambdaPlatform is for the lambda platform Arm64
	ArmLambdaPlatform = "arm64"
	// AmdLambdaPlatform is for the lambda platform Amd64, which is an extendion of X86_64
	AmdLambdaPlatform = "amd64"
)

Variables

This section is empty.

Functions

func AddColdStartTag

func AddColdStartTag(tags []string, coldStart bool, proactiveInit bool) []string

AddColdStartTag appends the cold_start tag to existing tags

func AddInitTypeTag

func AddInitTypeTag(tags []string) []string

AddInitTypeTag appends the init_type tag to existing tags

func ArrayToMap

func ArrayToMap(tagArray []string) map[string]string

func BuildTagMap

func BuildTagMap(arn string, configTags []string) map[string]string

BuildTagMap builds a map of tag based on the arn and user defined tags

func BuildTagsFromMap

func BuildTagsFromMap(tags map[string]string) []string

BuildTagsFromMap builds an array of tag based on map of tags

func BuildTracerTags

func BuildTracerTags(tags map[string]string) map[string]string

BuildTracerTags builds a map of tag from an existing map of tag removing useless tags for traces

func GetExtensionVersion

func GetExtensionVersion() string

GetExtensionVersion returns the extension version which is fed at build time

func MapToArray

func MapToArray(tagsMap map[string]string) []string

func MergeWithOverwrite

func MergeWithOverwrite(tags map[string]string, overwritingTags map[string]string) map[string]string

func ResolveRuntimeArch

func ResolveRuntimeArch() string

ResolveRuntimeArch determines the architecture of the lambda at runtime

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL