Skip to content

Conversation

@chris-wood-mo
Copy link

@chris-wood-mo chris-wood-mo commented Nov 28, 2025

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

What changes did you make? (Give an overview)

  • Ensure Prometheus /metrics endpoint streams correctly with clean EOF

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary): Tested locally with docker-compose and within a Kubernetes cluster which included a service monitor which was able to scrape the metrics into Prometheus.
    As you can see from the evidence attached, this now works locally and returns the format expected by Prometheus.
curl -I http://localhost:8080/metrics
HTTP/1.1 200 OK
transfer-encoding: chunked
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS
Access-Control-Max-Age: 3600
Access-Control-Allow-Headers: Content-Type
Content-Type: text/plain; version=0.0.4
Screenshot 2025-11-28 at 15 29 44 - [x] Unit checks - [x] Integration checks - [x] Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)
cute_dog

@chris-wood-mo chris-wood-mo requested review from a team as code owners November 28, 2025 15:34
@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Nov 28, 2025
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi chris-wood-mo! 👋

Welcome, and thank you for opening your first PR in the repo!

Please wait for triaging by our maintainers.

Please take a look at our contributing guide.

… and updated response of exposeClusterMetrics and exposeAllMetrics to be string
@chris-wood-mo
Copy link
Author

chris-wood-mo commented Nov 28, 2025

Hi @germanosin,

Thanks for your comments! I have reviewed them and updated the code. I have also made sure to test the changes again and make sure they work both locally and from a Kubernetes cluster using a service monitor to scrape the metrics into Prometheus. Both have worked with the changes made.

The screenshot below shows this working locally:
Screenshot 2025-11-28 at 21 26 49

Thanks,

Chris

Copy link
Member

@germanosin germanosin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chris-wood-mo
Copy link
Author

@germanosin The previous change did not return an openmetrics format, but you make a really good point of the location of the change! I have made the amendment you have suggested. Again I have made sure to check that this works both locally and from a Kubernetes cluster. I can also confirm that is returning the correct content type too:

Content Type:

curl -I http://localhost:8080/metrics
HTTP/1.1 200 OK
...
content-type: text/plain; version=0.0.4; charset=utf-8
...

The screenshot below shows this working locally:
Screenshot 2025-12-01 at 16 10 25

Thanks Chris

@germanosin
Copy link
Member

@chris-wood-mo thanks for contribution, It is in the main branch with test now, was fixed with another issue.

@germanosin germanosin closed this Dec 1, 2025
@chris-wood-mo
Copy link
Author

Hey @germanosin, Thanks for including that, I really appreciate that change being added to the main branch so quickly! Thanks for all the hard work you're doing on this project!

@chris-wood-mo chris-wood-mo deleted the issues/1506 branch December 1, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/triage/completed Automatic triage completed status/triage/manual Manual triage in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants