-
Notifications
You must be signed in to change notification settings - Fork 1.1k
POC: Prometheus metrics #7538
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
base: master
Are you sure you want to change the base?
POC: Prometheus metrics #7538
Conversation
🔍 Code Analysis ResultsThis PR introduces comprehensive, native Prometheus metrics support to Tyk Gateway, enhancing its observability. It adds a new, configurable HTTP endpoint (defaulting to The implementation is self-contained and follows existing instrumentation patterns, running alongside StatsD and NewRelic integrations without interference. It includes detailed documentation on configuration, available metrics, and best practices for cardinality management. Files Changed AnalysisThe changes introduce a significant new feature, reflected in the addition of several key files and modifications to core gateway components:
Architecture & Impact AssessmentThis PR introduces a new observability component to the Tyk Gateway architecture.
The following diagram illustrates how the new Prometheus component interacts with the rest of the gateway: graph TD
subgraph Tyk Gateway
A[Gateway Server] -- initializes --> B(Instrumentation Handlers)
B -- creates --> C[PrometheusMetrics Service]
A -- handles --> D(API Request Handlers)
D -- on completion, records --> C
C -- periodically collects from --> E(System Stats)
C -- periodically collects from --> F(Storage Layer / Redis)
end
subgraph "Metrics Endpoint (:9090)"
H(HTTP Server) -- serves --> I(/metrics)
C -- provides metrics to --> H
end
J[Prometheus Scraper] -- scrapes --> I
Scope Discovery & Context ExpansionThe changes are well-encapsulated, but their impact touches several key areas of the gateway's operation:
Based on the implementation, further areas to investigate would be:
Metadata
Powered by Visor from Probelabs Last updated: 2025-11-13T17:23:24.865Z | Triggered by: opened | Commit: f0e00dd 💡 TIP: You can chat with Visor using |
🔍 Code Analysis ResultsSecurity Issues (2)
Architecture Issues (4)
Performance Issues (3)
Quality Issues (3)
✅ Dependency Check PassedNo dependency issues found – changes LGTM. ✅ Connectivity Check PassedNo connectivity issues found – changes LGTM. Powered by Visor from Probelabs Last updated: 2025-11-13T17:23:25.636Z | Triggered by: opened | Commit: f0e00dd 💡 TIP: You can chat with Visor using |
Description
Related Issue
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist