-
Notifications
You must be signed in to change notification settings - Fork 423
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
Add Prometheus Exporter #1031
Add Prometheus Exporter #1031
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1031 +/- ##
=======================================
Coverage 94.85% 94.85%
=======================================
Files 151 151
Lines 5971 5971
=======================================
Hits 5663 5663
Misses 308 308 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good in general.
*/ | ||
|
||
OPENTELEMETRY_BEGIN_NAMESPACE | ||
namespace sdkmetrics = opentelemetry::sdk::metrics; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: not recommended to use the namespace alias in the header file, as it becomes part of public API. It's been used all over the code right now and #1008 should be fixing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
CHANGELOG.md
Outdated
@@ -19,6 +19,7 @@ Increment the: | |||
|
|||
## [1.0.1] 2021-10-21 | |||
|
|||
* [EXPORTER] Prometheus Exporter ([#1031](https://github.com/open-telemetry/opentelemetry-cpp/pull/1031)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be put into the above section for "Unreleased".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ci/do_ci.sh
Outdated
@@ -85,6 +84,7 @@ elif [[ "$1" == "cmake.c++20.stl.test" ]]; then | |||
make test | |||
exit 0 | |||
elif [[ "$1" == "cmake.legacy.test" ]]; then | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: remove this empty line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
ci/do_ci.sh
Outdated
@@ -93,6 +93,7 @@ elif [[ "$1" == "cmake.legacy.test" ]]; then | |||
cmake -DCMAKE_BUILD_TYPE=Debug \ | |||
-DCMAKE_CXX_FLAGS="-Werror" \ | |||
-DCMAKE_CXX_STANDARD=11 \ | |||
-DCMAKE_EXE_LINKER_FLAGS="-lpthread" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was not needed. cleaned
@@ -15,16 +15,13 @@ | |||
include_directories(include) | |||
find_package(prometheus-cpp CONFIG REQUIRED) | |||
|
|||
add_library(prometheus_exporter_deprecated src/prometheus_collector.cc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The target is removed here, but I didn't see it is added back in other places but it is referenced below in target_include_directories
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
@@ -0,0 +1,111 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Simplify the copyright header as below?
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
This PR attempts to finish #263
Changes
Please provide a brief description of the changes here.
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes