-
Notifications
You must be signed in to change notification settings - Fork 90
POC: EDP Prometheus metrics #919
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?
Conversation
🔍 Code Analysis ResultsThis PR introduces support for A significant portion of this PR consists of newly added documentation files related to MongoDB and a log file ( Files Changed Analysis
Architecture & Impact AssessmentWhat this PR accomplishesThis PR enhances the Prometheus pump to allow segmenting API metrics by the originating developer portal application and organization. This provides deeper visibility into API usage patterns for multi-tenant deployments using the Tyk Developer Portal. Key technical changes introduced
Affected system componentsThe changes are confined to the Prometheus pump within Tyk Pump. This is an additive change and will not affect existing Prometheus configurations unless the new labels are explicitly used. The functionality is dependent on the Tyk Gateway sending analytics records that contain the appropriate tags. Component Interaction Diagramgraph TD
A[Tyk Gateway] --sends--> B(AnalyticsRecord w/ Tags);
B --processed by--> C[Tyk Pump];
C --forwards to--> D{Prometheus Pump};
subgraph D
E[GetLabelsValues function]
end
B --'portal-app-*', 'portal-org-*' tags--> E;
E --calls--> F[PortalAppTag / PortalOrgTag helpers];
F --extract tag value--> E;
E --adds to label set--> G[Prometheus Metric];
G --exported to--> H[Prometheus Server];
Scope Discovery & Context ExpansionThe change is localized to the Prometheus pump's data processing logic. The broader context relies on an end-to-end data flow where the Tyk Gateway (the data producer) correctly tags analytics records. The Metadata
Powered by Visor from Probelabs Last updated: 2025-11-11T08:18:36.500Z | Triggered by: synchronize | Commit: df94fd1 💡 TIP: You can chat with Visor using |
🔍 Code Analysis Results✅ Security Check PassedNo security issues found – changes LGTM. ✅ Architecture Check PassedNo architecture issues found – changes LGTM. ✅ Performance Check PassedNo performance issues found – changes LGTM. ✅ Quality Check PassedNo quality issues found – changes LGTM. Powered by Visor from Probelabs Last updated: 2025-11-14T09:39:21.452Z | Triggered by: synchronize | Commit: 95b3e23 💡 TIP: You can chat with Visor using |
🚨 Jira Linter FailedCommit: The Jira linter failed to validate your PR. Please check the error details below: 🔍 Click to view error detailsNext Steps
This comment will be automatically deleted once the linter passes. |
|



Description
Summary:
Adds support for portal_app and portal_org labels in Prometheus metrics by extracting them from analytics record tags.
Changes:
Use Case:
Enables tracking and filtering of Prometheus metrics by portal application and organization, allowing better observability and analytics segmentation for multi-tenant deployments.
Related Issue
Motivation and Context
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
fork, don't request your
master!masterbranch (left side). Also, you should startyour branch off our latest
master.go mod tidy && go mod vendorgo fmt -sgo vet