Presentation is loading. Please wait.

Presentation is loading. Please wait.

Performance Log REST Endpoint

Similar presentations


Presentation on theme: "Performance Log REST Endpoint"— Presentation transcript:

1 Performance Log REST Endpoint
REST API’s Performance Log REST Endpoint Nolan Bock Customer Success Manager

2 Another Log … what value does this add?
CPQ Cloud offers several tools to monitor and track transactional data. This REST API helps us understand what’s happening on the server directly Determine how long it takes actions to process on the server Investigate server activity between dates Record the number of times a library is referenced Determine how many users are logged in during a time period Monitor specific user activity across transactions

3 What information is included in the Logs?
The Performance REST endpoint returns many valuable pieces of information: Component This is the specific instance of an event, such as the action variable name, integration variable name etc. Event The is the event that occurred like action, login, logout, integration, invocation, query etc. referenceObject The object upon which the action was performed. This is a configuration hierarchy or a commerce process and document. Server Time Time elapsed in milliseconds for the event.

4 Example: Converted Output tracking Action Processing Time
2 2 1

5 At the end of this session you should be able to..
Generate a performance log Extract performance logs, from a site, to Microsoft Excel Create a Pivot Table and Pivot Chart that help to illustrate the data from performance logs Call as many logs within performance logging as you need Create performance logs on specific data (e.g. specific users/actions)

6 Agenda 1 Learning the Basics Deep Dives Continued Learning 2 3

7 Performance Logging in 2016 R1
1. Selecting “Performance Logs” on a site with 2016 R1 will take you to an abbreviated version of the performance logs.

8 Performance Logging in 2016 R1
1. You will be taken to the performance log page. Select the “View” tab. 2. Select “Query By Example.” This will allow you to search by any of the headers, which can be selected under the “Columns” dropdown menu.

9 Performance Logging in 2016 R1
1. Now, the boxes above each column allow you to filter that column by content. 2. Here, I have filtered by the user “nbock” and all of his actions are listed here.

10 Performance Logging in 2016 R1
Need more info? Check My Oracle Support! Doc ID

11 Query-by-example is useful, but what if you want specifics?
Averages? Maximum value? Minimum value? Sum? Count? Export logs to Excel! But how?

12 Pre-Requisites (Recommended)
Generating performance logs will be much easier with two applications: JSON View for Firefox and the website, These are NOT Oracle applications and, therefore, can not be guaranteed by Oracle 1. Make sure to select the JSON to CSV converter, ` which will create an Excel output. ` 2. JSONView, an application for Firefox, will make the performance log screen more manageable. 3. This process is best done in Mozilla Firefox, although it can be recreated in Chrome. 1 2

13 Beginning from your CPQ site of choice, add /rest/v1/performanceLogs to the end of the bigmachines.com URL—this format will be Select all and copy the items on this page—there will be a fair amount, use the shortcut “control + A” to select all.

14 Paste the items into the “input” box on convertcsv.com
Click “JSON to Excel” at the bottom of the page. Open with Microsoft Excel 1 2 3

15 Output

16 Output –Server Time 1 1. Notice the value serverTime, this value is not recorded in seconds, but milliseconds.

17 Output – The Seconds Column
2. Create a column for seconds and assign the value as serverTime/1000, this is the conversion from milliseconds to seconds. 3. Fill down for all items, most values will be on the order of 0.001! 2

18 Output – Creating a Pivot Table
2 1 1. On the “Insert” tab, select “Pivot Table.” 2. The table range should be the entire set of data.

19 Output – Creating a Pivot Table
2 3 1 1. First, select the fields—in this case, the rows are “component” and the values are “seconds.” 2. Notice the seconds variable is organized as a sum, not useful in this case—we want averages. 3. Click on the dropdown menu next to “sum of seconds” 2 3

20 Output – Creating a Pivot Table
1. Select the “average” under “summarize value field by” and click ok. 2 3

21 Output – Creating a Pivot Table
1. Each actions average seconds taken to complete is recorded here. 2. Clicking the filter button will allow you to choose which actions to include in your report. 2 2 1

22 Output – Creating a Chart
2 1. Click the insert tab. 2. Click the recommended chart or PivotChart icons to display your data in a chart. 2 1

23 Output – The Basics, Complete!
2 2 1

24 Agenda 1 Learning the Basics Deep Dives Continued Learning 2 3

25 Deep Dives – Calling more than 1000 log items
2 1 1. Using a URL as shown (e.g. will show the total number of logs at the bottom of the page—notice that “items” is collapsed. 2. There are 3500 logs, but only 1000 items listed on each page, so what is the next step to seeing all the logs?

26 Deep Dives – Calling more than 1000 log items
1. Entering the URL as will show the items starting from the 1001st recorded. This will allow you to incrementally access all the performance logs. 2. The variable hasMore is true when there are more logs to be collected, in this case, there are about 3500. 3. You can check the offset here. 2 1 2 3

27 Deep Dives – Calling more than 1000 log items
1. Now the offset in the URL is set to 3001. 2. There are about 3500 logs in total and 1000 can be displayed at a time, so the variable hasMore equals “false” because all the logs are shown. The count variable shows how many items are listed on this page. 1 2 2

28 Deep Dives – Narrow Queries
You can use narrow queries to collect performance logs on specific information, such as activity between dates for a user (1) or specific event on a date (2). The process for extracting this data is the same as a regular performance log, but this records a much more specific type of data. Objects in red need to be changed to meet your specific needs (i.e. USER changed to an actual user). 1. [{eventDate:{$gte: ' '}}, {eventDate:{$lte: ' '}}, {login:{$eq: 'TESTUSER'}}]}&orderby=eventDate:desc 2. [{event:{$eq: 'EVENTNAME'}}, {modifiedDate:{$eq: ' '}}, {login:{$eq: 'USER'}}]}&orderby=eventDate:desc 1 2

29 Deep Dives – Log Time Troubleshooting
Imagine that, after generating performance logs, you notice that one action is taking a significant amount of time. For this example, let’s say the action “Get Standard Approval History” is taking 40 seconds, on average. Obviously, there is an issue, but it could be in several places given that this action is called multiple times in multiple processes. You can now use log time troubleshooting to identify which specific call of Get Standard Approval History is causing the problem. 1 2

30 2. Open the quote list by clicking the + to expand the section
1. First, use the process quick links button to navigate to library functions. 2. Open the quote list by clicking the + to expand the section 3. Open the library functions and select the Get standard Approval History Data function. 1 2 1 2 3

31 Deep Dives – Log Time Troubleshooting
1 2 1 1. Define a variable, like lib_start, to record the time in milliseconds when the process begins.

32 Deep Dives – Log Time Troubleshooting
3 2 1 2 2. At the end of the function, add a variable (lib_end) to record the time after the function processes. 3. lib_processingtime, records the amount of time the process takes by finding the difference between the end of the process and beginning.

33 Deep Dives – Log Time Troubleshooting
2 1 3 1. Now, your performance logs will record “Library-SetStandardApprovalAttributes” and its processing time. 2. Notice the serverTime is 124, this is the processing time.

34 Agenda 1 Learning the Basics Deep Dives Continued Learning 2 3

35 MOS Knowledge Articles and More!
Performance Log Rest Endpoints Rest APIs for Transactional Objects (Doc ID ) What is the Logtime Function in BML? (Doc ID ) MondoDB Syntax Query By Example (Doc ID )

36


Download ppt "Performance Log REST Endpoint"

Similar presentations


Ads by Google