Skip to content

feat: Support SigV4 for analytics Prometheus storage#5388

Merged
markphelps merged 4 commits into
v2from
feat/sigv4-prometheus-analytics
Feb 17, 2026
Merged

feat: Support SigV4 for analytics Prometheus storage#5388
markphelps merged 4 commits into
v2from
feat/sigv4-prometheus-analytics

Conversation

@markphelps

@markphelps markphelps commented Feb 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds SigV4 authentication support for Flipt's analytics Prometheus storage backend (issue #5387).

Changes

  • Added PrometheusSigV4Config struct with AWS SigV4 configuration fields
  • Implemented SigV4 round tripper for Prometheus HTTP client
  • Added configuration options for region, credentials, role ARN, etc.
  • Added tests for SigV4 configuration and signing headers

Configuration Example

analytics:
  storage:
    prometheus:
      enabled: true
      url: "https://aps-workspaces.us-east-1.amazonaws.com/workspaces/ws-xxx/api/v1"
      sigv4:
        enabled: true
        region: "us-east-1"
        service_name: "aps"

Testing

All existing tests pass. Added new tests for SigV4 configuration and signing.

closes #5387

Add AWS SigV4 signing support for the Prometheus analytics storage backend,
enabling Flipt to work with AWS Managed Prometheus (AMP) for analytics.

Changes:
- Add PrometheusSigV4Config with fields for region, access key, secret key,
  profile, role ARN, external ID, FIPS STS endpoint, and service name
- Integrate prometheus/sigv4 RoundTripper into the Prometheus client
- Add configuration and client tests for SigV4 support

Closes #5387
@markphelps
markphelps requested a review from a team as a code owner February 13, 2026 04:09
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 Hi @markphelps! Thanks for your contribution to this project.

It looks like one or more of your commits are missing a DCO (Developer Certificate of Origin) sign-off. The DCO is a simple way for you to certify that you have the right to submit this code under the project's license.

How to fix this:

# For future commits, use the -s flag
git commit -s -m "Your commit message"

# To sign off on existing commits in this PR
git rebase HEAD~$(git rev-list --count origin/v2..HEAD) --signoff
git push --force-with-lease

The -s flag adds this line to your commit message:
Signed-off-by: Your Name <[email protected]>

📋 View the failing DCO check for more details

For more information about the DCO, visit: https://developercertificate.org/

@dosubot

dosubot Bot commented Feb 13, 2026

Copy link
Copy Markdown

Related Documentation

Checked 4 published document(s) in 1 knowledge base(s). No updates required.

How did I do? Any feedback?  Join Discord

@codecov

codecov Bot commented Feb 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.62%. Comparing base (65ab2d5) to head (7b13eb7).
⚠️ Report is 1 commits behind head on v2.

Files with missing lines Patch % Lines
internal/server/analytics/prometheus/client.go 90.47% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               v2    #5388      +/-   ##
==========================================
+ Coverage   60.54%   60.62%   +0.07%     
==========================================
  Files         138      138              
  Lines       13672    13689      +17     
==========================================
+ Hits         8278     8299      +21     
+ Misses       4690     4686       -4     
  Partials      704      704              
Flag Coverage Δ
integrationtests 34.29% <0.00%> (+0.12%) ⬆️
unittests 52.10% <90.47%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@markphelps
markphelps merged commit 6b4811e into v2 Feb 17, 2026
29 checks passed
@markphelps
markphelps deleted the feat/sigv4-prometheus-analytics branch February 17, 2026 02:44
@markphelps markphelps added the needs docs Requires documentation updates label Feb 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs docs Requires documentation updates size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feat: Support SigV4 for analytics prometheus storage

2 participants