Skip to content

Fix for adding api name in logs.

Harsheet Shah requested to merge harsheet-apinamefix into master

All Submissions:

This fix is to add the columns for api method and operation name in logs.

  • [YES/NO] I have added an explanation of what changes in this merge do and why we should include it? Yes
  • [YES/NO] I have updated the documentation accordingly. NA
  • [YES/NO/NA] I have added tests to cover my changes.Yes
  • [YES/NO/NA] All new and existing tests passed. Yes
  • [YES/NO/NA] My code follows the code style of this project. Yes
  • [YES/NO/NA] I ran lint checks locally prior to submission. Yes

What is the issue or story related to the change?

High level design:


Change details: After this change

Example logs: Eg1: 2022-05-10 11:06:14.488 INFO MININT-PH6PVLC --- [nio-8083-exec-2] TxnLogger correlation-id=1ee41a0b-c42e-4f6f-9bb2-6edc837b6031 data-partition-id=opendes api-method=GET operation-name={GET [/_dps/task-handlers/test/{testId}]} user-id=51d2f791-795b-4c8d-9657-cd23b1f9f2a7 app-id=: End Web-API GET /_dps/task-handlers/test/harsheet/ Headers: {correlation-id:1ee41a0b-c42e-4f6f-9bb2-6edc837b6031,content-type:application/json} status=200 time=102 ms {correlation-id=1ee41a0b-c42e-4f6f-9bb2-6edc837b6031, data-partition-id=opendes}

Eg2: 2022-05-10 11:06:43.731 INFO MININT-PH6PVLC --- [nio-8083-exec-3] TxnLogger correlation-id=6dae3b30-3f36-4a36-a597-caae25c51c20 data-partition-id=opendes **api-method=POST operation-name={POST [/_dps/task-handlers/index-worker], consumes [application/json]} user-id=51d2f791-795b-4c8d-9657-cd23b1f9f2a7 **app-id=: Start Web-API POST /_dps/task-handlers/index-worker Headers: {data-partition-id:opendes,content-type:application/json} {correlation-id=6dae3b30-3f36-4a36-a597-caae25c51c20, data-partition-id=opendes}

Test coverage:

Does this introduce a breaking change?

  • [YES/NO] NO

Pending items

MR is about adding api/operation name in logs for azure

Reviewer request

  • Please provide an ETA when you plan to review this MR. Write a comment to decline or provide an ETA.
  • Block the MR if you feel there is less testing or no details in the MR
  • Please cover the following aspects in the MR -- Coding design: <Reviewer1> -- Backward Compatibility: <Reviewer2> -- Feature Logic: <Logic design> -- <Any other context mention here> OR -- <Component 1>: <Reviewer1> -- <CosmosDB>: <Reviewer2> -- <ServiceBus> <Reviewer3> -- <Mention any other component and owner>

Other information

Edited by Harsheet Shah

Merge request reports