-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add GraphQL and MongoDB Prometheus metrics #544
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
Conversation
Co-authored-by: neSpecc <[email protected]>
Co-authored-by: neSpecc <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot ci failed, |
Co-authored-by: neSpecc <[email protected]>
... Fixed in commit e510da1. Added proper TypeScript type annotations ( Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot seems like your changes for getting collection name leads error in some resolvers: Jest tests are failed: |
Co-authored-by: neSpecc <[email protected]>
Fixed in commit 67b84a3. Added null check for Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #544 +/- ##
==========================================
- Coverage 66.66% 62.41% -4.26%
==========================================
Files 11 14 +3
Lines 174 290 +116
Branches 24 44 +20
==========================================
+ Hits 116 181 +65
- Misses 54 104 +50
- Partials 4 5 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* Initial plan * feat: add GraphQL and MongoDB metrics * Bump version up to 1.1.43 * fix: correctly extract collection name from MongoDB command events * fix: add proper type annotations to GraphQL metrics plugin * fix: add null check for event.command to prevent undefined access * Update mongodb.ts * lint * reduce cardinality for mongo metrics * decrease buckets number, handle getMore case * Update package.json * Delete metrics.test.ts --------- Co-authored-by: Copilot <[email protected]> Co-authored-by: neSpecc <[email protected]> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Peter Savchenko <[email protected]>
Implementation Complete: GraphQL and MongoDB Metrics
Summary
Successfully added comprehensive metrics for GraphQL and MongoDB operations to Hawk API.
Metrics Implemented
GraphQL Metrics (3 metrics)
MongoDB Metrics (2 metrics)
Recent Fixes
event.commandto prevent undefined access errors in some MongoDB operationsFiles Modified
src/metrics/index.ts- Updated to register new metricssrc/metrics/graphql.ts- New file with GraphQL metrics and Apollo Server plugin (with proper types)src/metrics/mongodb.ts- New file with MongoDB metrics and monitoring setup (with safe null checks)src/mongo.ts- Updated to enable MongoDB command monitoringsrc/index.ts- Updated to add GraphQL metrics plugin to Apollo Servertest/integration/cases/metrics.test.ts- Added tests for new metricsdocs/METRICS.md- Updated documentation with new metrics detailsTechnical Details
hawk_prefix/metricsendpointOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.