Administration Commands

The following is a detailed list of the administration commands that can be used to correctly configure the Request Tracing Service.

set-requesttracing-configuration

Usage

asadmin> set-requesttracing-configuration

Aim

This command can be used to set all configuration of the request tracing service at once. It effectively wraps the requesttracing-configure and requesttracing-configure-notifier commands in one.

Command Options

Option Type Description Default Mandatory

--enabled

Boolean

Enables or disables the service

false

Yes

--dynamic

Boolean

When set to true, applies the changes without a restart. Otherwise a restart is required.

false

No

--thresholdValue

Integer

Sets the number of time units which trigger the tracing of a request

30

No

--thresholdUnit

TimeUnit

Sets the time unit to use for the threshold

SECONDS

No

--notifierEnabled

Boolean

Enables or disables notifications

false

Yes

--notifierDynamic

Boolean

When set to true, applies the changes without a restart. Otherwise a restart is required.

false

No

--historicaltraceenabled

Boolean

When present, enables the storage of the slowest historical request traces.

false

No

--historicaltracestoresize

Integer

Sets how many request traces will be stored.

20

No

--historicaltracestoretimeout

String

Sets how long before Request Tracing messages are removed. This field is specified in the format "%d %h %m %s" where % is an integer. Any of the units can also be omitted.

N/A

No

Starting from release 4.1.1.171, the --notifierEnabled and --notifierDynamic arguments are used to enable or disable the Log Notifier, which is considered the default notifier. Use the requesttracing-configure-notifier command to enable or disable other available notifiers.

Example

asadmin> set-requesttracing-configuration
    --enabled=true
    --thresholdValue=10
    --thresholdUnit="SECONDS"
    --dynamic=true
    --notifierEnabled=true
    --notifierDynamic=true
    --historicaltraceenabled
    --historicaltracestoresize=20
    --historicaltracestoretimeout=1d 2h 3m 30s

requesttracing-configure

Usage

asadmin> requesttracing-configure --enabled=true --thresholdValue=10 --thresholdUnit="SECONDS" --dynamic=true --historicaltraceenabled --historicaltracestoresize=20

Aim

Enables or disables the service and provides ways to configure threshold time by specifying a value and a unit, and can store a given number of the slowest historical request traces.

Command Options

Option Type Description Default Mandatory

--enabled

Boolean

Enables or disables the service

false

Yes

--thresholdValue

Integer

Sets the number of time units which trigger the tracing of a request

30

No

--thresholdUnit

TimeUnit

Sets the time unit to use for the threshold

SECONDS

No

--dynamic

Boolean

When set to true, applies the changes without a server/instance restart. Otherwise a restart is required.

false

No

--historicaltraceenabled

Boolean

When present, enables the storage of the slowest historical request traces.

false

No

--historicaltracestoresize

Integer

Sets how many request traces will be stored.

20

No

--historicaltracestoretimeout

String

Sets how long before Request Tracing messages are removed. This field is specified in the format "%d %h %m %s" where % is an integer. Any of the units can also be omitted.

N/A

No

Example

asadmin> requesttracing-configure
    --enabled=true
    --thresholdValue=10
    --thresholdUnit="SECONDS"
    --dynamic=true
    --historicaltraceenabled
    --historicaltracestoresize=20
    --historicaltracestoretimeout=1d 2h 3m 30s

requesttracing-configure-notifier

Usage

asadmin> requesttracing-configure-notifier --notifierName="service-log" --notifierEnabled=true --dynamic=true

Aim

Enables or disables a notifier from which to relay tracing events.

Command Options

Option Type Description Default Mandatory

--dynamic

Boolean

When set to true, applies the changes without a server/instance restart.

false

No

--notifierName

String

The name of the notifier to configure

service-log

Yes

--notifierEnabled

Boolean

Enables or disables the notifier

false

Yes

Example

In order to configure the notifier for request tracing, the asadmin command to list available notifiers should be run first:

asadmin> notifier-list-services

Which will give an output similar to the following:

Available Notifier Services:
	service-jms
	service-hipchat
	service-snmp
	service-cdieventbus
	service-eventbus
	service-email
	service-datadog
	service-newrelic
	service-slack
	service-xmpp
	service-log

Command notifier-list-services executed successfully.

With the following command, then we can enable the log-notifier for the request tracing service:

asadmin> requesttracing-configure-notifier
    --notifierName="service-log" \
    --notifierEnabled=true \
    --dynamic=true

requesttracing-[NOTIFIER_NAME]-notifier-configure

Usage

asadmin> requesttracing-[NOTIFIER_NAME]-notifier-configure --enabled=true --dynamic=true

Aim

This command can be used to enable or disable the notifier represented by the [NOTIFIER_NAME] placeholder.

Command Options

Option Type Description Default Mandatory

--enable

Boolean

Enables or disables the notifier

false

Yes

--dynamic

Boolean

When set to true, applies the changes without a server/instance restart.

false

No

These series of commands (one for each available notifier), work as aliases to the requesttracing-configure-notifier command.

Examples

  1. To enable the log notifier for the Request Tracing Service without having to restart the server, use the following command:

    asadmin> requesttracing-log-notifier-configure
        --enabled=true
        --dynamic=true
  2. To disable the Slack notifier without having to restart the server, use the following command:

    asadmin> requesttracing-slack-notifier-configure
        --enabled=false
        --dynamic=true

get-requesttracing-configuration

Usage

asadmin> get-requesttracing-configuration

Aim

This command can be used to list the configuration settings of the Request Tracing Service.

Command Options

There are no available options for this command.

Example

asadmin> get-requesttracing-configuration

Will give an output similar to the following:

Request Tracing Service enabled?: true
Historical Tracing Enabled?: true
Historical Tracing Store Size: 3
Historical Tracing Store Timeout in Seconds: 30s
Below are the configuration details of each notifier listed by its name.

Notifier Name        Notifier Enabled
service-jms          false
service-hipchat      false
service-snmp         false
service-cdieventbus  false
service-eventbus     false
service-email        false
service-datadog      false
service-newrelic     false
service-slack        false
service-xmpp         false
service-log          true
Command get-requesttracing-configuration executed successfully.

list-historic-requesttraces

Usage

asadmin> list-historic-requesttraces

Aim

This command can be used to list a number of previous request trace messages from the Request Tracing Service.

Command Options

Option Type Description Default Mandatory

--first

Integer

A limit for the number of Request Tracing messages to return

false

No

Example

asadmin> get-requesttracing-configuration

Will give an output similar to the following:

Occurring Time  Elapsed Time  Traced Message
1504514022439   13            {"RequestTrace": {"startTime":"1014016643025","elapsedTime":"13",
"TraceEvent": {"eventType": "TRACE_START","eventName":"StartTrace","id=":"8a953268-d90e-401d-a375-6aa7f7009c62","conversationId=":"8a953268-d90e-401d-a375-6aa7f7009c62","timestamp=":"1014016643025","Server": "server","Domain": "payaradomain","traceTime=":"0"},
"TraceEvent": {"eventType": "TRACE_END","eventName":"TraceEnd","id=":"ee261145-c93c-4d2d-bad7-501f49b54910","conversationId=":"8a953268-d90e-401d-a375-6aa7f7009c62","timestamp=":"1014030367041","traceTime=":"13724016"}}}

The request tracing messages are in JSON format, so can be parsed by log parsing tools as if it were in the following format:

{
   "RequestTrace":{
      "startTime":"1014016643025",
      "elapsedTime":"13",
      "TraceEvent":{
         "eventType":"TRACE_START",
         "eventName":"StartTrace",
         "id=":"8a953268-d90e-401d-a375-6aa7f7009c62",
         "conversationId=":"8a953268-d90e-401d-a375-6aa7f7009c62",
         "timestamp=":"1014016643025",
         "Server":"server",
         "Domain":"payaradomain",
         "traceTime=":"0"
      },
      "TraceEvent":{
         "eventType":"TRACE_END",
         "eventName":"TraceEnd",
         "id=":"ee261145-c93c-4d2d-bad7-501f49b54910",
         "conversationId=":"8a953268-d90e-401d-a375-6aa7f7009c62",
         "timestamp=":"1014030367041",
         "traceTime=":"13724016"
      }
   }
}

results matching ""

    No results matching ""