Skip to content
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

[MI-3650] Added the metric for MS Graph client method time #371

Merged
merged 38 commits into from
Oct 25, 2023
Merged

Conversation

manojmalik20
Copy link
Collaborator

Summary

  • Created a new package called clientmodels and moved all the structs to that
  • Made necessary changes across the project related to the new package
  • Created a new timer layer over the client package using a timer_layer.go.tmpl
  • Added go generate commands to generate the timer layer over the client package
  • Modified the OnActivate hook and GetClient methods to use the timerlayer wrapper over the original client
  • Added new histogram metric for measuring the time taken by a client method
  • Fixed some of the failing unit tests

Ticket Link

None

ayusht2810 and others added 20 commits October 18, 2023 16:11
Modified the client struct to include metricsService and did required changes in all the files
Added a go generate comment for Metrics interface
Created a middleware for MS Graph to measure the time taken by the MS Graph API
Changed the way of creating the app based and token based clients for MS Graph
Created a new package called clientmodels and moved all the structs to that
Made necessary changes across the project related to the new package
Created a new timer layer over the client package using a timer_layer.go.tmpl
Added go generate commands to generate the timer layer over the client package
Modified the OnActivate hook and GetClient methods to use the timerlayer wrapper over the original client
Added new histogram metric for measuring the time taken by a client method
Fixed some of the failing unit tests
server/message_hooks_test.go Outdated Show resolved Hide resolved
server/message_hooks_test.go Outdated Show resolved Hide resolved
server/message_hooks_test.go Outdated Show resolved Hide resolved
server/metrics/metrics.go Show resolved Hide resolved
server/msteams/layer_generators/main.go Outdated Show resolved Hide resolved
server/msteams/layer_generators/main.go Outdated Show resolved Hide resolved
server/msteams/layer_generators/main.go Show resolved Hide resolved
server/msteams/layer_generators/main.go Outdated Show resolved Hide resolved
@manojmalik20 manojmalik20 added Difficulty/3:Hard Hard ticket Test Cases Includes unit test cases changes labels Oct 24, 2023
server/metrics/metrics.go Show resolved Hide resolved
Copy link
Member

@lieut-data lieut-data left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @manojmalik20!

Copy link
Member

@jespino jespino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@manojmalik20 manojmalik20 changed the base branch from MI-3646 to main October 25, 2023 08:06
@manojmalik20 manojmalik20 merged commit 083bbfd into main Oct 25, 2023
1 check passed
@manojmalik20 manojmalik20 deleted the MI-3650 branch October 25, 2023 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty/3:Hard Hard ticket Test Cases Includes unit test cases changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants