After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 787833 - Provide more context when logging the SPARQL queries
Provide more context when logging the SPARQL queries
Status: RESOLVED FIXED
Product: gnome-photos
Classification: Applications
Component: general
unspecified
Other All
: Normal enhancement
: ---
Assigned To: GNOME photos maintainer(s)
GNOME photos maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-09-18 12:39 UTC by Debarshi Ray
Modified: 2017-09-18 15:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
query: Support human-readable annotations for debugging (1.57 KB, patch)
2017-09-18 12:48 UTC, Debarshi Ray
committed Details | Review
query: Loosen the requirement to provide a SearchContextState (1.48 KB, patch)
2017-09-18 12:48 UTC, Debarshi Ray
committed Details | Review
Use Query objects instead of raw strings in the TrackerQueue API (17.43 KB, patch)
2017-09-18 12:48 UTC, Debarshi Ray
committed Details | Review
tracker-queue: Log each Query's source and tag fields (5.01 KB, patch)
2017-09-18 12:48 UTC, Debarshi Ray
committed Details | Review
offset-controller: Tag the Query (1.49 KB, patch)
2017-09-18 12:48 UTC, Debarshi Ray
committed Details | Review
tracker-controller: Tag the Query (1.79 KB, patch)
2017-09-18 12:49 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2017-09-18 12:39:12 UTC
It is possible to log the SPARQL queries being sent to Tracker using:
$ G_MESSAGES_DEBUG=gnome-photos GNOME_PHOTOS_DEBUG=tracker /path/to/gnome-photos

However, this only logs the raw SPARQL strings without any context. While that gives a general idea about what the application is doing, it is not not so useful when debugging more subtle issues. eg., why a certain query is being sent twice, or which view/mode is responsible for sending a query, and so on.

It will be nice to annotate the logs with some contextual information.
Comment 1 Debarshi Ray 2017-09-18 12:48:04 UTC
Created attachment 359970 [details] [review]
query: Support human-readable annotations for debugging
Comment 2 Debarshi Ray 2017-09-18 12:48:17 UTC
Created attachment 359971 [details] [review]
query: Loosen the requirement to provide a SearchContextState
Comment 3 Debarshi Ray 2017-09-18 12:48:30 UTC
Created attachment 359972 [details] [review]
Use Query objects instead of raw strings in the TrackerQueue API
Comment 4 Debarshi Ray 2017-09-18 12:48:43 UTC
Created attachment 359973 [details] [review]
tracker-queue: Log each Query's source and tag fields
Comment 5 Debarshi Ray 2017-09-18 12:48:56 UTC
Created attachment 359974 [details] [review]
offset-controller: Tag the Query
Comment 6 Debarshi Ray 2017-09-18 12:49:09 UTC
Created attachment 359975 [details] [review]
tracker-controller: Tag the Query
Comment 7 Umang Jain 2017-09-18 14:28:37 UTC
Review of attachment 359970 [details] [review]:

++
Comment 8 Umang Jain 2017-09-18 14:29:02 UTC
Review of attachment 359971 [details] [review]:

++
Comment 9 Umang Jain 2017-09-18 15:04:06 UTC
Review of attachment 359972 [details] [review]:

++
Comment 10 Umang Jain 2017-09-18 15:04:08 UTC
Review of attachment 359972 [details] [review]:

++
Comment 11 Umang Jain 2017-09-18 15:11:54 UTC
Review of attachment 359973 [details] [review]:

++
Comment 12 Umang Jain 2017-09-18 15:12:50 UTC
Review of attachment 359974 [details] [review]:

++
Comment 13 Umang Jain 2017-09-18 15:13:23 UTC
Review of attachment 359975 [details] [review]:

++
Comment 14 Debarshi Ray 2017-09-18 15:16:05 UTC
Thanks for the reviews, Umang! Pushed to master.