transaction.end() function is used to end a transaction. This will be used along with "startTransaction".

Add dependency before starting with the api.

pom.xml

<dependency>
    <groupId>com.atatus.apm</groupId>
    <artifactId>atatus-agent-api</artifactId>
    <version>2.0.0</version>
</dependency>

Compatibility

Compatible with all Java agent versions.

Syntax

copy
icon/buttons/copy
transaction.end();

Example

copy
icon/buttons/copy
import com.atatus.apm.api.Atatus;
import com.atatus.apm.api.Transaction;

public class ViewController {

    public String process() {

        Transaction transaction = Atatus.startTransaction();
        transaction.setName("add/data/view");

        // code here

        transaction.end();
    }

}

See also