Custom HTTP tags can be used to add HTTP session attributes (such as the current user name), remote client IP, and other details to captured business transaction 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 specify an Expression to get the value from HTTServletRequest object. Expressions are basically methods on the Java�s 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() | Save 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 / IP of the client who made the request under the key remote_host |
Viewing Captured Data
If you have enabled IntelliSense or Business Transaction monitoring with Transaction Tracing, all configured Custom HTTP Tags will be evaluated when a trace is saved. If a value is found (i.e. not dull) after evaluating the expression, it will be saved under the specified label.
Captured values for each transaction will be displayed in the trace windows of the Business Transaction Analyzer and IntelliSense, alongside other HTTP request parameters.
Comments
0 comments
Please sign in to leave a comment.