Skip to content
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

[Do Not Merge] Metrics Async Pull API #2517

Closed
wants to merge 2 commits into from

Conversation

CodeBlanch
Copy link
Member

Related to #2511

This PR is a demo implementation of two theories people may or may not agree with in order to gather feedback.

  • Pull API should be asynchronous

    For push export, on some timer, with a dedicated thread, synchronous export is desired. But for externally initiated pull, writing to some output stream, I think we should have an asynchronous API. In the case of Prometheus middleware, running in ASP.NET Core, this allows for nice thread sharing when that output stream is waiting on some network IO.

  • We should differentiate between Push & Pull in exporters.

    With a single Export entry point in PrometheusExporter I don't know how we could decide if we need to push or pull, assuming we will eventually also support push. We would have to take a dependency on the PullMetricScope which is internal to SDK, or perhaps ask users to register multiple exporters with different configurations. Since we have IPullMetricExporter, which exporters use to opt-into pull, it seemed simple enough to define a dedicated entry point.

@reyang
Copy link
Member

reyang commented Nov 17, 2021

I guess this is superseded by #2610? @CodeBlanch

@CodeBlanch
Copy link
Member Author

@reyang I'll close. I still think there is value in having clear push vs pull APIs but I didn't get any rocket ships! 🤣

@CodeBlanch CodeBlanch closed this Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants