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

Prometheus integration #36

Open
wants to merge 4 commits into
base: development
Choose a base branch
from

Conversation

SalmaElsoly
Copy link

Description:

Used Prometheus to collect some metrics:

  • HTTPRequestsReceived : counts of requests received with labels method and path
  • HTTPRequestLatency : records request processing time with labels method and path
  • MongoDBOperationLatency: records time taken to fulfill an operation on collection with labels operation and repo
  • IdenfyResponseTime: records time taken till a response is received from a request to idenfy with labels operation
  • SubstrateResponseTime: records time taken till a response is received from a request to substrate with labels operation
  • ServiceUpTime: tracks the total duration in seconds that the KYC has been operating
  • InternalServerErrorRate: records the numbers of failed request due to internal service errors with label method and path
  • MongoDBOperationsError : records the numbers of failed operations from db with labels operation and repo

Related Issue:

#16 (comment)

Changes:

  • internal/clients/idenfy/idenfy.go
  • internal/clients/substrate/substrate.go
  • internal/handlers/handlers.go
  • internal/metrics/metrics.go
  • internal/server/server.go
  • internal/repository/verification_repository.go
  • internal/repository/token_repository.go
  • internal/middleware/middleware_test.go

@SalmaElsoly SalmaElsoly marked this pull request as draft February 12, 2025 12:34
@SalmaElsoly SalmaElsoly marked this pull request as ready for review February 13, 2025 06:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant