-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper logging support #109
Comments
Boolean-search
Heatmap
Lineplot
PlotRequests being made:
Treeview
|
Link to action list documentation. The list of requests which need defination for schema_table and action are as follows: 1. Line Plot (link to working page):a. Main request:
2. Plot App:As discussed in slack messages, a. Specific to Violin Plot:
b. For all other plots(bar,pie..):
As discussed, incorporation of the stack attribute is not done as a part of this issue |
Created issue #115 to track the remaining tasks from this issue (task 5 above). The actions for plot app are defined in the action list document and will be handled in that issue. Tasks 1-4 are complete and merged into master. |
Looking at the current implementation of deriva webapps, some of them are not properly utilizing the logging mechanism that we have in Chaise. The following are the required changes to achieve this:
1. Make sure wid, pid, cid are set
These three attribute are the bare minimum for logging. And their values should be set on page load and all the requests after it should use the same values.
chaise.config
module handles this.cid
,pid
,wid
.ERMrest.resolve
. This function will "introspect" the model. It will also create an internal "server" object which will be used for any subsequent request sent using the Reference API. So you would have to make sure the general attributes (cid
,pid
,wid
) are passed with resolve. You can see an example of it here and here.2. (previously 4) Consume
pcid
andppid
that might be in the urlAs you can see in the logging document,
ppid
andpcid
are logged alongside the "main request" of each app. We should do the same thing here. Which is,pcid
andppid
query parameter values. You can use theUriUtils. getQueryParams
function for that purpose. You can see how the singular version of this function is used here in plot app.pcid
andppid
.3. Provide other attributes depending on the request
Each request to server must send proper log attributes (context header),
.read
calls, the second parameter is log object. You have to make sure at least the following are defined in there:action
: A string explaining what the request is about. @jrchudy you or Devanshi should list the requests that apps are sending and we can go over what should we use for action string. This can be done by just going through the code and finding theread
or.get
requests.schema_table
: The schema and table names in "schema:table" format.catalog
: The catalog number.stack
: You can ignore this for now. This requires more thought!headers
object with proper key name is passed. It should have the same attributes that I explained in the previous bullet. You can find an example of it here4. Add pcid query parameter to links to Chaise
In each app, there might be links to other deriva-webapps or chaise apps. We should make sure all these links include
pcid
andppid
query parameters. You can find an example of this in boolean-search. Forpcid
you should use theappName
constant that is defined for each app. If it's not defined (since it's not an AngularJS app), you can just hard code it. I think that's how treeview is doing it.Josh: For treeview, the values are being set at the beginning of the app and reused each time
getHeader
is called. When creating links for treeview app to navigate to chaise pages,pcid
should use this definedcid
from above.5. Add actions and properly logging to Plot app
In Plot app, for the violin plot type, we currently create 2 different references for fetching data for the selectors and then there's an http.get request to fetch the data for the plot. These 3 data requests need to have actions defined for them since they currently don't have a defined action. The 2 selector requests do use the
contextHeaderParams
, but need to be checked for accuracy.For all of the other plot types, there is a single http.get request being sent to fetch the data with no context headers defined. This case needs context headers and a defined action.
The text was updated successfully, but these errors were encountered: