Skip to main content

HTTPC, API Call

The following explains how to set options for the Java agent to collect and analyze the data related to HTTP outbound calls and API calls. It provides various options for detailed monitoring, such as SLOW_HTTPC error handling, CPU and memory usage tracing, stack trace records upon calls, and URL normalization. This allows developers to efficiently manage external dependencies for applications and identify performance issues.

  • profile_error_httpc_time_max Int

    Default 10000

    If the HTTPC execution time exceeds the specified value, it is handled as the SLOW_HTTPC error. If set to 0, it is not treated as an error.

  • profile_httpc_resource_enabled Boolean

    Default false

    When collecting HTTP call steps from the transaction trace, the CPU and memory usages in the step is traced.

  • profile_position_httpc Boolean

    Default false

    It records the stack traces at the execution time of HTTPC.

  • trace_httpc_normalize_enabled Boolean

    Default true

    It enables the function to parse and normalize HTTPC URLs for transactions.

  • trace_httpc_normalize_urls String

    Set the HTTPC URL patterns to normalize. It deletes the path parameter after parsing the call URL patterns.

    Note

    For example, if declared as /a/{v}/b, a/123/b is replaced by a/{v}/b. For multiple values, use comma (,) as the delimiter. A complement is required after arranging substitution patterns.

  • hook_httpc_patterns String

    Set the full package class name.method for HTTP outbound calls. Register and use the full path of the method that performs HTTP calls. After registration, you need to redefine the class or restart the agent.

    whatap.conf
    hook_httpc_patterns=io.home.test.baseapp.app.post.service.HookHttpcService.*
    Note
    • To register multiple classes, use comma (,) as the delimiter.

    • Only asterisk (*) can be used as the wildcard, regular expressions cannot be used.