Custom HTTP Tags
FeaturedCustom HTTP tags are used to include HTTP session attributes (such as current user name) and remote client IP addresses in captured business transactions and IntelliSense traces.
Configuration
Go to IntelliTrace -> Configure Dynamic Instrumentation and select the HTTP Custom Tags tab.
Enter a name for the tag in the Label field and provide an Expression to retrieve the value from HTTServletRequest object. Expressions are basically methods on the Java HttpServletRequest class and you can use any method exposed by the class to build expressions. And you can chain method calls to build complex expressions as shown in the examples.
Label | Expression | Notes |
---|---|---|
Username | getSession().getAttribute('accountBean').getUsername() | Get the object stored in session under accountBean key and call the getUsername method of that object to fetch the value |
http_method | getMethod() | Record the HTTP method used for the request (GET or POST) and save it under the label http_method |
remote_host | getRemoteHost() |
Save the host name or IP of the client who made the request under the key remote_host |
Viewing Captured Data
After enabling IntelliSense or Business Transaction monitoring with Transaction Tracing enabled, all configured Custom HTTP Tags will be evaluated at the time of saving a trace. If the expression will be saved under the defined label if a value is found - not null on evaluation of the expression.
Captured values for each transaction will be displayed in the trace windows of Business Transaction Analyzer and in IntelliSense along with other HTTP request parameters
Please sign in to leave a comment.
Comments
0 comments