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

Prometheus Exporter #203

Merged

Conversation

attilakreiner
Copy link
Contributor

No description provided.

@attilakreiner attilakreiner force-pushed the exporter-prometheus branch 5 times, most recently from d547634 to ec13f37 Compare April 18, 2023 07:05
@attilakreiner attilakreiner marked this pull request as ready for review April 18, 2023 18:51
@attilakreiner attilakreiner requested a review from jfallows April 18, 2023 18:51
}

private String histogramFormatter(
String[] s,
Copy link
Contributor

Choose a reason for hiding this comment

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

Need a better parameter name, or split into namespace and binding.

Copy link
Contributor Author

@attilakreiner attilakreiner Apr 19, 2023

Choose a reason for hiding this comment

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

So, I expanded String[] s to String metric, String namespace, String binding, and for consistency I did the same for private String counterGaugeFormatter. Now I ended up having to create some funky named typed interfaces 😎 QuintFunction and Object3LongFunction. Pls check.

metrics.print(out);
try
{
output = os.toString("UTF8");
Copy link
Contributor

Choose a reason for hiding this comment

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

This is triggering plenty of object allocation, so we'll take another pass on that after these changes.

@attilakreiner attilakreiner requested a review from jfallows April 19, 2023 18:11
Copy link
Contributor

@jfallows jfallows left a comment

Choose a reason for hiding this comment

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

Let's revisit the new functional interfaces after addressing the object creation optimization feedback. I suspect that by inverting the polarity of how we generate the output, some of these functional interfaces may no longer be required.

},
"additionalProperties": false
},
"maxItems": 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove this, and spin up multiple HttpServer instances, one per endpoint.
In practice folks may only use one anyway, but this will keep the door open in case they have some requirement for http and https or something, plus less confusing when we attempt to document.

Btw, for https to work, we need to make sure the server certificate chain and key is configured, probably via vault.

@jfallows jfallows merged commit 7d49765 into aklivity:feature/telemetry-metrics Apr 21, 2023
@jfallows jfallows linked an issue Apr 21, 2023 that may be closed by this pull request
jfallows added a commit that referenced this pull request May 12, 2023
* Add stream metrics spec and impl projects

* Add http metrics spec and impl projects

* Add metrics modules to incubator docker image

* Metrics schema, extensibility, storage and command line support (#173)

* Create incubator projects for exporter-prometheus.spec and exporter-prometheus

* Engine support to exporters (#202)

* Fix metrics command, find layout files in the engine dir (#204)

* Prometheus Exporter (#203)

* Minimize performance overhead for metric collection (#217)

* Remove zilla load command (#223)

* Introducing Stream Direction to Optimize Metric Collection (#224)

* Add http.active.requests and http.duration metrics (#227)

---------

Co-authored-by: Attila Kreiner <[email protected]>
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.

Integrate Prometheus by exporting local metrics over HTTP
2 participants