App Parameters is a helpful feature that monitors important metrics in your application. With App Parameters, you can monitor the:
Let's say a simple web request involves an API call, a database (DB) operation, and a cache hit; a single request can invoke multiple resources, and multiple users can invoke multiple requests at once. In these instances, you can figure out how often the API was called, as well as the number of times the DB operation took place during a particular time interval. This helps you assess if the CPU or memory is being overloaded and how this is affecting your app performance for the given time interval.
With real-world applications, the App Parameters feature comes in handy when monitoring the frequency of hits to DB calls, service calls, or user-defined framework calls. Based on the report in App Parameters, you can troubleshoot performance degradation caused by an overload of hits.
Get started with App Parameters:
Every parameter will be sent with the below metrics to track its frequency:
Parameters | Description |
---|---|
Param Name | The parameter name provided by the user in the application. |
Total Value | The aggregated value for the corresponding parameter during a particular interval. |
Parameters | Description |
---|---|
Param Name | The parameter name provided by the user in the application. |
Total Value | The aggregated value for the corresponding parameter during a particular interval. |
Minimum Value | The minimum value captured in that particular interval. |
Maximum Value | The maximum value captured in that particular interval. |
Total Count | The total number of hits. |
Note: App Parameter APIs are available for .NET, Java, PHP, and Node.js agents.
Sum:
Sum of values passed in a specific interval for a parameter. If the sum is an empty value, it will be incremented by 1.
DotNetAgent.Api.CustomTracker.Increment("keyName");
DotNetAgent.Api.CustomTracker.Increment("keyName", value);
Average:
Average of values passed for a parameter in a specific interval.
DotNetAgent.Api.CustomTracker.Average("keyName", value);
public ActionResult Register()
{
DateTime st = DateTime.Now;
double myKeyValue = Convert.ToDouble(Request.QueryString["mykey"]);
//parameter "register" will be incremented by 1 and sent as SUM
DotNetAgent.Api.CustomTracker.Increment("register");
//parameter "mykey" will be incremented by myKeyValue and sent as SUM
DotNetAgent.Api.CustomTracker.Increment("mykey", myKeyValue);
double myKeyAvgValue = GetAverageValue();
//parameter "myavgkey" will be incremented by value and sent as AVG
DotNetAgent.Api.CustomTracker.Average("myavgkey", myKeyAvgValue);
return View();
}
Sum:
Value for the key will be incremented by 1. Key will be cleared on every agent polling interval.
CustomMetric.increment("key_name")
Value for the key will be increment by the specified value. Key will be cleared on every agent polling interval.
CustomMetric.increment("key_name", value)
Average:
Value for the key will be aggregated and its count will be collected by the agent and pushed to Applications Manager's servers.
CustomMetric.average("key_name", value)
private void generateReport(String type)
{
CustomMetric.increment(type);
// Other app operations
double averageValue = getAverageValue();
CustomMetric.average(type, averageValue);
Sum:
Value for the key will be incremented by 1. Key will be cleared at every agent polling interval.
zpa_app_param_increment("keyName");
Value for the key will be increment by the specified value. The key will be cleared at every agent polling interval.
zpa_app_param_increment("keyName", value);
Average:
Values for the key will be aggregated and its count will be collected by the agent and pushed to Applications Manager's servers.
zpa_app_param_avg("keyName", value);
private void generateReport(String type)
{
zpa_app_param_increment("type");
// Other app operations
double averageValue = getAverageValue();
zpa_app_param_avg("type", averageValue);
To view App Parameters,