Add C++ Prometheus Exporter Example Program#310
Closed
erichsueh3 wants to merge 6 commits into
Closed
Conversation
Contributor
|
Thank you, Eric. This PR depends on the Prometheus Exporter class, and it should be working after #263 is merged. |
g-easy
reviewed
Sep 1, 2020
added 3 commits
September 2, 2020 10:22
g-easy
reviewed
Sep 3, 2020
| ```shell script | ||
| bazel build //examples/prometheus_exporter:prometheus_exporter_example | ||
| bazel-bin/examples/prometheus_exporter/prometheus_exporter_example | ||
| bazel-bin/examples/prometheus_exporter/prometheus_exporter_example agg |
Contributor
There was a problem hiding this comment.
agg -> counter so people can copy-paste this example.
"agg" is like a usage statement, "counter" is an example, which is what this block is :)
Contributor
Author
There was a problem hiding this comment.
Good catch, changed "agg" to "histogram" instead of "counter" to be more consistent with the example
| ``` | ||
|
|
||
| Run with Bazel: | ||
| ```shell script |
Contributor
There was a problem hiding this comment.
I think you only need ```shell
| int main() | ||
| int main(int argc, char** argv) | ||
| { | ||
| std::string agg(argv[1]); |
Contributor
There was a problem hiding this comment.
Please handle argc < 2 before doing this.
Contributor
Author
There was a problem hiding this comment.
Missed this earlier, but fixed now.
added 2 commits
September 3, 2020 01:05
GerHobbelt
pushed a commit
to GerHobbelt/opentelemetry-cpp
that referenced
this pull request
Jun 17, 2025
…chmark-1.x Update dependency google_benchmark to v1.9.4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements an example program for C++ Prometheus Exporter. All related files are in the examples/prometheus_exporter folder. In order to run this example program, users need to modify the Prometheus configuration yaml file and start a Prometheus instance. There is a README.md included to help users setup and run the example program. At the end, we can view the exported result in Prometheus.
Changes:
Primary contribution for this example was done by @CunjunWang