View a markdown version of this page

AWS::ApplicationSignals::InstrumentationConfig CodeLocation - AWS CloudFormation

This is the new CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.

AWS::ApplicationSignals::InstrumentationConfig CodeLocation

Identifies a code location to instrument, including the programming language, code unit, class, method, file path, and optional line number.

Syntax

To declare this entity in your CloudFormation template, use the following syntax:

JSON

{ "ClassName" : String, "CodeUnit" : String, "FilePath" : String, "Language" : String, "LineNumber" : Integer, "MethodName" : String }

YAML

ClassName: String CodeUnit: String FilePath: String Language: String LineNumber: Integer MethodName: String

Properties

ClassName

The class or type name that contains the method. This is required for Java and optional for Python module-level functions.

Required: No

Type: String

Minimum: 1

Maximum: 128

Update requires: Replacement

CodeUnit

The package, module, or namespace that contains the target code, for example com.amazon.payment or payment_service.

Required: No

Type: String

Minimum: 1

Maximum: 128

Update requires: Replacement

FilePath

The source file path relative to the project or source root, such as src/payment/PaymentProcessor.java or src/payment/PaymentProcessor.py.

Required: Yes

Type: String

Minimum: 1

Maximum: 1024

Update requires: Replacement

Language

The programming language for this instrumentation point, such as Java, Python, or JavaScript.

Required: Yes

Type: String

Allowed values: Java | Python | Javascript

Update requires: Replacement

LineNumber

The line number to instrument. Provide this to disambiguate overloaded methods and to target a specific line when needed.

Required: No

Type: Integer

Minimum: 1

Update requires: Replacement

MethodName

The method or function name to instrument, such as validateCreditCard or __init__.

Required: No

Type: String

Minimum: 1

Maximum: 80

Update requires: Replacement