View a markdown version of this page

CodeLocation - Application Signals

CodeLocation

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

Contents

FilePath

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1024.

Required: Yes

Language

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

Type: String

Valid Values: Java | Python | Javascript

Required: Yes

ClassName

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: No

CodeUnit

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Required: No

LineNumber

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

Type: Integer

Valid Range: Minimum value of 1.

Required: No

MethodName

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

Type: String

Length Constraints: Minimum length of 1. Maximum length of 80.

Required: No

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: