# CodeCaptureConfigurationProperty

Defines what data to capture for code-level instrumentation.

- Source: Generated code
- Type last changed: v2.274.0 · 20 Oct 2026

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_applicationsignals as applicationsignals } from 'aws-cdk-lib';
const codeCaptureConfigurationProperty: applicationsignals.CfnInstrumentationConfig.CodeCaptureConfigurationProperty = {
  captureLimits: {
    maxCollectionDepth: 123,
    maxCollectionWidth: 123,
    maxFieldsPerObject: 123,
    maxHits: 123,
    maxObjectDepth: 123,
    maxStackFrames: 123,
    maxStackTraceSize: 123,
    maxStringLength: 123,
  },

  // the properties below are optional
  captureArguments: ['captureArguments'],
  captureLocals: ['captureLocals'],
  captureReturn: false,
  captureStackTrace: false,
};
```

## Properties

- `captureArguments`: string[] — The function arguments to capture.

- `captureLimits`: [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) | [CfnInstrumentationConfig.CaptureLimitsConfigProperty](/cdk/api/v2/docs/aws-cdk-lib.aws_applicationsignals.CfnInstrumentationConfig.CaptureLimitsConfigProperty.html) (required) — Safety limits that bound what is captured.

- `captureLocals`: string[] — The local variables to capture by name.

- `captureReturn`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether to capture the return value.

  Defaults to false.

- `captureStackTrace`: boolean | [IResolvable](/cdk/api/v2/docs/aws-cdk-lib.IResolvable.html) — Whether to capture a stack trace.

  Defaults to true.
