-
Notifications
You must be signed in to change notification settings - Fork 32
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
[93] fix: Connected Grafana Api to the response-time-interceptor #150
Open
DarrenDsouza7273
wants to merge
24
commits into
SamagraX-Stencil:dev
Choose a base branch
from
DarrenDsouza7273:Response-time-grafana
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f4ec971
feat(wip): move response time interceptor to use grafana api
techsavvyash 125e67d
feat(wip): interceptor changes w api
techsavvyash 3b0e08e
fix: connected grafana api with response-time-interceptor
DarrenDsouza7273 3fa0a9c
Added Monitoring
DarrenDsouza7273 9154a6d
fix: fixed dashboard generation to row level generation
Savio629 eae1619
Merge branch 'dev' of https://github.com/DarrenDsouza7273/stencil int…
Savio629 f3bde9c
fix: removed extra repo
Savio629 03b87d2
fix: updated test
Savio629 9d0d4a1
fix: added grafana level test
Savio629 04dbe76
fix: fixed the failing ci
Savio629 b4560f4
fix: updated the naming convection
Savio629 10660ff
fix: updated test
Savio629 9913ebe
fix: updated test and increased the coverage
Savio629 e0f6699
Merge branch 'Response-time-grafana' of https://github.com/DarrenDsou…
Savio629 db9a51d
fix: updated suggested changes
Savio629 4b9e67a
fix: updated test
Savio629 e528e29
fix: updated ci test
Savio629 6e4dc55
fix: fixed ci test
Savio629 0a6a022
fix: updating the failing ci
Savio629 a51767e
fix: updated ci test
Savio629 f472c86
fix: updated test
Savio629 683deb5
fix: updated test
Savio629 0cb6522
fix: failing test
Savio629 abe17ae
fix: updated yarn.lock file
Savio629 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import { Controller, Get, Res } from '@nestjs/common'; | ||
import { FastifyReply } from 'fastify'; | ||
import { register } from 'prom-client'; | ||
|
||
@Controller() | ||
export class PrometheusController { | ||
@Get('metrics') | ||
async metrics(@Res() response: FastifyReply) { | ||
response.headers({ 'Content-Type': register.contentType }); | ||
response.header('Content-Type', register.contentType); | ||
response.send(await register.metrics()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export class Mutex { | ||
private mutex: Promise<void> = Promise.resolve(); | ||
|
||
lock(): PromiseLike<() => void> { | ||
let begin: (unlock: () => void) => void = (unlock) => {}; | ||
|
||
this.mutex = this.mutex.then(() => new Promise(begin)); | ||
|
||
return new Promise((res) => { | ||
begin = res; | ||
}); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static Analysis: Decorators are not valid here.
Decorators are only valid on class declarations, class expressions, and class methods. You can enable parameter decorators by setting the
unsafeParameterDecoratorsEnabled
option totrue
in your configuration file.Committable suggestion
Tools
Biome