Creates a dynamic instrumentation configuration for a specific code or endpoint location within a service and environment¶
Description¶
Creates a dynamic instrumentation configuration for a specific code or endpoint location within a service and environment. Configurations are immutable after creation.
For BREAKPOINT type configurations, they expire after 24 hours unless a shorter expiration is provided. For PROBE type configurations, they persist until explicitly deleted; an expiration cannot be set for PROBE configurations.
If a configuration already exists for the same service, environment, signal type, and location, this operation returns a conflict instead of overwriting it. Use attribute filters and capture settings to control where the instrumentation runs and which data is collected.
Usage¶
cloudwatchapplicationsignals_create_instrumentation_configuration(
InstrumentationType, Service, Environment, SignalType, Location,
Description, ExpiresAt, AttributeFilters, CaptureConfiguration, Tags)
Arguments¶
-
InstrumentationType[required] Type of instrumentation: BREAKPOINT (temporary) or PROBE (permanent)
-
Service[required] The name of the service to instrument. This should match the
service.nameresource attribute reported by the application. -
Environment[required] The environment that the service is running in, such as
eks:cluster-prod/namespaceorec2:production. -
SignalType[required] The telemetry signal type to emit for this instrumentation. The supported value is
SNAPSHOT. -
Location[required] The location where instrumentation should be applied. Specify a
CodeLocationfor code-level instrumentation. -
DescriptionAn optional short description (up to 50 characters) that explains the purpose of this instrumentation.
-
ExpiresAtFor BREAKPOINT: optional, defaults to 24 hours, must be between 5 min and 24 hours. For PROBE: not supported. PROBE configurations are permanent and persist until explicitly deleted.
-
AttributeFiltersClient-side filters that target specific instances. Each object in the array is AND-matched on its keys, and multiple objects are OR-matched to decide where to apply the instrumentation.
-
CaptureConfiguration[required] Specifies what to capture when the instrumentation point is hit. Specify
CodeCapturefor code-level capture settings. -
TagsAn optional list of key-value pairs to associate with the instrumentation configuration. Tags can help you organize and categorize your resources.
Value¶
A list with the following syntax:
list(
InstrumentationType = "BREAKPOINT"|"PROBE",
Service = "string",
Environment = "string",
SignalType = "SNAPSHOT",
Location = list(
CodeLocation = list(
Language = "Java"|"Python"|"Javascript",
CodeUnit = "string",
ClassName = "string",
MethodName = "string",
FilePath = "string",
LineNumber = 123
)
),
LocationHash = "string",
Description = "string",
ExpiresAt = as.POSIXct(
"2015-01-01"
),
AttributeFilters = list(
list(
"string"
)
),
CaptureConfiguration = list(
CodeCapture = list(
CaptureArguments = list(
"string"
),
CaptureReturn = TRUE|FALSE,
CaptureStackTrace = TRUE|FALSE,
CaptureLocals = list(
"string"
),
CaptureLimits = list(
MaxHits = 123,
MaxStringLength = 123,
MaxCollectionWidth = 123,
MaxCollectionDepth = 123,
MaxStackFrames = 123,
MaxStackTraceSize = 123,
MaxObjectDepth = 123,
MaxFieldsPerObject = 123
)
)
),
CreatedAt = as.POSIXct(
"2015-01-01"
),
ARN = "string"
)
Request syntax¶
svc$create_instrumentation_configuration(
InstrumentationType = "BREAKPOINT"|"PROBE",
Service = "string",
Environment = "string",
SignalType = "SNAPSHOT",
Location = list(
CodeLocation = list(
Language = "Java"|"Python"|"Javascript",
CodeUnit = "string",
ClassName = "string",
MethodName = "string",
FilePath = "string",
LineNumber = 123
)
),
Description = "string",
ExpiresAt = as.POSIXct(
"2015-01-01"
),
AttributeFilters = list(
list(
"string"
)
),
CaptureConfiguration = list(
CodeCapture = list(
CaptureArguments = list(
"string"
),
CaptureReturn = TRUE|FALSE,
CaptureStackTrace = TRUE|FALSE,
CaptureLocals = list(
"string"
),
CaptureLimits = list(
MaxHits = 123,
MaxStringLength = 123,
MaxCollectionWidth = 123,
MaxCollectionDepth = 123,
MaxStackFrames = 123,
MaxStackTraceSize = 123,
MaxObjectDepth = 123,
MaxFieldsPerObject = 123
)
)
),
Tags = list(
list(
Key = "string",
Value = "string"
)
)
)