Add Prometheus Exporter: Step 0 - Update MetricsExporter Interface#240
Conversation
…hutdown() function not in Metrics specification
|
To align our Metrics Exporter Interface with the previously existing Metrics Exporter Interface, we have removed record_code.h and added those codes to ExportResult in the previously existing exporter.h. Additionally, since there is no Shutdown function in the Metrics specification, we have removed that from our interface and aligned it with the existing interface. |
|
@erichsueh3 please rebase and resolve the conflicts. Thanks. |
pyohannes
left a comment
There was a problem hiding this comment.
I have one comment, but this looks good overall.
| /** | ||
| * In the Metrics specification, there is no Shutdown function required for exporters | ||
| * The Shutdown function can be implemented within exporters that wish to have one, | ||
| * but will not be enforced through this header | ||
| */ |
There was a problem hiding this comment.
This doesn't make sense and we should remove it.
The MetricsExporter is passed on to the Controller as a std::unique_ptr (see here). With that design, the user doesn't have the possibility to call any Shutdown method on the MetricsExporter, only the Controller could do so (but cannot if the interface doesn't have a Shutdown method).
I recommend removing this comment for now. We can extend the exporter interface by an optional shutdown function later on.
There was a problem hiding this comment.
This comment is originally included within the current exporter.h file, but I agree; will remove this comment for now.
Codecov Report
@@ Coverage Diff @@
## master #240 +/- ##
=======================================
Coverage 93.94% 93.94%
=======================================
Files 146 146
Lines 6538 6538
=======================================
Hits 6142 6142
Misses 396 396
|
54a63e0 to
93a8f3f
Compare
@reyang rebased and resolved the conflicts, looks like all the checks are passing as well. |
[CI] disable bzip2 in conan builds (open-telemetry#3352)
This PR implements headers in the sdk/metrics folder that lays out the groundwork for the Prometheus Exporter project. The Metrics interface, exporter.h, is the interface which the PrometheusExporter class is derived from. The ReturnCode class, return_code.h, lays out the possible return values returned when calling Export() from the PrometheusExporter class.
This PR is the first in a series of PRs that aims to add a full implementation of a Prometheus Exporter within the OpenTelemetry C++ Repository.
Note to reviewers: Please keep in mind that there are other PRs (yet to be filed) related to this one so codecov tests may not fully pass.