InstrumentationConfiguration
Source:
src/AWS/ApplicationSignals/InstrumentationConfiguration.ts
A CloudWatch Application Signals dynamic instrumentation configuration — instructs instrumented SDK agents to capture a snapshot (arguments, locals, return value, stack trace) at a specific code location of a discovered service, without redeploying the application.
Configurations are immutable after creation: every change except tags replaces the configuration. Tags remain mutable through the standard tagging APIs.
Creating an Instrumentation Configuration
Section titled “Creating an Instrumentation Configuration”Snapshot Probe on a Python Method
import * as AWS from "alchemy/AWS";
const probe = yield* AWS.ApplicationSignals.InstrumentationConfiguration( "CheckoutProbe", { instrumentationType: "PROBE", service: "checkout-service", environment: "eks:prod", signalType: "SNAPSHOT", location: { Language: "Python", CodeUnit: "app.checkout", MethodName: "process_order", FilePath: "app/checkout.py", LineNumber: 42, }, captureConfiguration: { CaptureLocals: ["order_id", "total"], CaptureLimits: { MaxHits: 100 }, }, },);Expiring Probe with Attribute Filters
const probe = yield* AWS.ApplicationSignals.InstrumentationConfiguration( "DebugProbe", { instrumentationType: "PROBE", service: "checkout-service", environment: "eks:prod", signalType: "SNAPSHOT", location: { Language: "Java", ClassName: "com.example.Checkout", MethodName: "processOrder", FilePath: "src/main/java/com/example/Checkout.java", }, captureConfiguration: { CaptureArguments: ["order"], CaptureLimits: { MaxHits: 10 }, }, expiresAt: new Date(Date.now() + 24 * 3600 * 1000), attributeFilters: [{ "aws.local.operation": "POST /checkout" }], },);