Skip to content

CodeLocation

Source code in docs_src/capo_application_signals/types/code_location.py
class CodeLocation(TypedDict, closed=True):
    language: "capo_application_signals.types.programming_language.ProgrammingLanguage"
    """<p>The programming language for this instrumentation point, such as Java, Python, or JavaScript.</p>"""
    code_unit: NotRequired["str"]
    """<p>The package, module, or namespace that contains the target code, for example <code>com.amazon.payment</code> or <code>payment_service</code>.</p>"""
    class_name: NotRequired["str"]
    """<p>The class or type name that contains the method. This is required for Java and optional for Python module-level functions.</p>"""
    method_name: NotRequired["str"]
    """<p>The method or function name to instrument, such as <code>validateCreditCard</code> or <code>__init__</code>.</p>"""
    file_path: "str"
    """<p>The source file path relative to the project or source root, such as <code>src/payment/PaymentProcessor.java</code> or <code>src/payment/PaymentProcessor.py</code>.</p>"""
    line_number: NotRequired["int"]
    """<p>The line number to instrument. Provide this to disambiguate overloaded methods and to target a specific line when needed.</p>"""

class_name instance-attribute

class_name: NotRequired[str]

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

code_unit instance-attribute

code_unit: NotRequired[str]

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

file_path instance-attribute

file_path: str

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

language instance-attribute

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

line_number instance-attribute

line_number: NotRequired[int]

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

method_name instance-attribute

method_name: NotRequired[str]

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