question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing CollectAll() / ScrapeHandler.ProcessScrapeRequest equivalent

See original GitHub issue

We have been using the CollectAll() to manually process and expose the metrics through our own endpoint.

In 3.0 we are unable to do so. Would it be possible to expose

                                using (var serializer = new TextSerializer(delegate
                                    {
                                        response.ContentType = PrometheusConstants.ExporterContentType;
                                        response.StatusCode = 200;
                                        return response.OutputStream;
                                    }, leaveOpen: false))
                                {
                                    _registry.CollectAndSerialize(serializer);
                                }

as a public helper method?

We are not going to ever use MetricServer and all related methods are internal at this point.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
sandersaarescommented, Mar 22, 2019

I have added CollectorRegistry.CollectAndExportAsText(Stream) to support metric data export via arbitrary custom endpoints.

You can parse the text document and perform any custom manipulation you wish, for extra custom scenarios, before export.

I will publish this as preview version later today, after going through other open issues, and a stable version next week. If you have any more feedback for me on this point, please feel free to share.

0reactions
connor4312commented, Aug 2, 2019

Awesome thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found