Implementing Jaeger Tracing¶
0. Adding Service Name¶
1 | |
Api.py, jaegerTracing.py, registrator.py
1. Importing Libraries¶
1.0 Flask API Tracing¶
1.0.0 Automated Traces All Routes¶
1 2 3 4 5 | |
1.0.1 Import Libraries via Regrx¶
Regex Pattern
1 | |
1 2 3 4 5 6 7 | |
1.1 Batch Editing in Client files¶
1.1.0 Import Libraries without Regex¶
1 2 3 4 5 | |
1.1.1 Import Libraries via Regrx¶
Regex Pattern
1 | |
1 2 3 4 5 6 7 | |
2. Injecting Spans¶
2.0 Methods with try-except (Without Class)¶
Caution
When you put the following opentracing implementaion the code mush below should reindent towards right by 4 space (1 Tab).
Hint
Add jaeger imports -- to the files with no class
Regex Pattern
1 2 | |
1 2 3 4 5 | |
2.1 Methods without try-except¶
Regex Pattern
1 | |
1 2 3 4 | |
2.2 Methods with try-except¶
Regex Pattern
1 2 | |
1 2 3 4 5 | |
2.3 Methods without try-except¶
Regex Pattern
1 | |
1 2 3 4 | |
Caution
Indentation of the file reduces the starting spaces upto 4 spaces with cause except to deviate from consective try. You should have to replace the spaces accouding to the starting try block.
2.4 Handling Exception¶
Regex Pattern
1 | |
1 2 | |
2.5 Handling Return Statuses¶
Tip
Make sure regex button is pressed in vscode search field.
01 - Return Variable Names¶
Regex Pattern
1 | |
Regex Pattern
1 | |
02 - Return Strings¶
JSON String
Regex Pattern
1 | |
1 | |
Simple String
Regex Pattern
1 | |
1 | |
03 - Return Json Data¶
Regex Pattern
1 | |
1 | |
04 - Return Graph Database Collections Query¶
Regex Pattern
1 | |
1 | |
Hint
add the following snippet
1 | |
05 - Return response.json()¶
Regex Pattern
1 | |
1 2 | |
06 - Return True/False¶
Regex Pattern
1 | |
1 2 | |
Regex Pattern
1 | |
1 2 | |
07 - Adding Print logging to jaeger¶
Regex Pattern
1 | |
1 | |
3. Keywords Used in All APIS¶
args
response
query
log
4. RPC Inject/Extract Calls Regex¶
4.0 Injecting Spans Replacement¶
Hint
Do not include url with KONG calling
Regex Pattern
1 | |
1 2 3 4 5 6 7 | |
Regex Pattern
1 | |
1 | |
4.1 Extracting Spans Replacement¶
Hint
This portion is already implemented while injecting spans
Regex Pattern
1 | |
1 2 | |
Regex Pattern
1 | |
1 | |
Hint
Please reindent all the files where you have done changes -- feel free to use the following snippet to searching out the files will require reindentation.
Tip
After applying regex, methods were reindented from their actual location, you have to manually indent the methods. Ctrl+]
Regex Pattern
1 | |
5. Branches Created for Tracing¶
5.1 Names of Branches¶
1 | |
-
✔Tracing--RemaingAPIs-4✔
- Organizational Data (revamp)
-
✔Tracing--RemaingAPIs-3✔
- Publisher_Bridge
- Schedular
- system_configuration_api
- system_configuration_set_jobpost_to_expire_routine
- top_data_api
- URL_meta_data_api
-
✔Tracing--RemaingAPIs-2✔
- Social
- company_activity_api
- company_activity_apis
- connection
- follow_company
- follow_user
- job_post
- news_feed
- suggested_friends
- url_post
- user_comment_on_post_web_notifications
- user_like_post_web_notifications
- user_notifications
- user_share_post_web_notifications
- Social
-
✔Tracing--RemaingAPIs-1✔
- profile_and_job_post_comparison_ratio_api
- post_seen_api
- Jobs_RelatedTo_Skills_Experience
- profile_seen_api
-
✔Tracing-GDB_APIs✔
- GDB_APIs
- Activity
- EmailLogs
- NewsFeed
- GDB_APIs
-
✔tracing_chat_api,-default-hiring--timeslot,-emailapi✔
- ChatAPI
- default_hiring_procedure_for_company
- default_time_slot_for_company
- email_api
-
✔Tracing-GDB_Consumers✔
- company_bookmarks_candidate
- company_created
- company_created_job_post
- company_created_url_post
- company_data_stor
- company_seen_user_profile
- company_shared_url
- employee_associated_with_company
- GDB_Newsfeed
- job_application_state_chagne_notice
- job_application_state_email_store_to_gdb
- social_connect_users
- social_disconnect_users
- user_bookmarks_job_post
- user_created
- user_created_url_post
- user_follow_company
- user_job_post_like
- user_job_post_unlike
- user_seen_job_post
- user_seen_user_profile
- user_shared_job_post
- user_shared_url_post
- user_url_post_like
- user_url_post_unlike
-
✔Tracing_skill_social✔
- Skill_Social/endorse_skill_api
- Skill_Social/rate_skill_api
- Skill_Social/skill_comment_api
-
Tracing_jobAPIs(all)
- ✔ job_application_state_change_notice ✔
- ✔ job_application_state_change_save ✔
- ✔ job_application_state_change_web_notification ✔
- ✔ job_application_state_email_log_to_mdb ✔
- ✔ job_application_state_management_api ✔
- ✔ job_comments_api ✔
- Tracing-bkmrk-candid,-candid-job-app-mgmt-api,-bkmrk-job-api
- ✔bookmark_candidates_api✔
- ✔candidate_job_application_management_api✔
- ✔bookmark_job_api✔
- Tracing-JobPost-API
- revamp_laravel_to_python_apis
- ✔jobpost_python_apisjobpost_python_apis✔
- revamp_laravel_to_python_apis
- shortlistedCandidate_tracing_with_Jaeger
- ✔scheduler_api✔
- ✔ shortlist_candidates_api ✔
- revamp_laravel_to_python_apis
- ✔ admin_operation_python_apis ✔
- ✔ Consumer_UserName_Image_Storage ✔
- ✔ profile_python_apis ✔
- ✔ registeration_python_service_apis
- jeager_implementation_organizationalDataAPI (obsolete)
- organizational_data (deprecated)