Skip to content

Add Prometheus Exporter#1031

Merged
lalitb merged 83 commits intoopen-telemetry:mainfrom
esigo:esigo-prometheus-exporter
Nov 9, 2021
Merged

Add Prometheus Exporter#1031
lalitb merged 83 commits intoopen-telemetry:mainfrom
esigo:esigo-prometheus-exporter

Conversation

@esigo
Copy link
Copy Markdown
Member

@esigo esigo commented Oct 24, 2021

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
  • Unit tests have been added
  • Changes in public API reviewed

erichsueh3 and others added 30 commits August 6, 2020 18:34
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 24, 2021

Codecov Report

Merging #1031 (8ff4d7a) into main (c3f3042) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1031   +/-   ##
=======================================
  Coverage   94.85%   94.85%           
=======================================
  Files         151      151           
  Lines        5971     5971           
=======================================
  Hits         5663     5663           
  Misses        308      308           

@esigo esigo marked this pull request as ready for review October 27, 2021 19:08
@esigo esigo requested a review from a team October 27, 2021 19:08
Copy link
Copy Markdown
Member

@lalitb lalitb left a 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;
Copy link
Copy Markdown
Member

@lalitb lalitb Nov 4, 2021

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Comment thread CHANGELOG.md Outdated

## [1.0.1] 2021-10-21

* [EXPORTER] Prometheus Exporter ([#1031](https://github.com/open-telemetry/opentelemetry-cpp/pull/1031))
Copy link
Copy Markdown
Contributor

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".

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Comment thread ci/do_ci.sh Outdated
make test
exit 0
elif [[ "$1" == "cmake.legacy.test" ]]; then

Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

Comment thread ci/do_ci.sh Outdated
cmake -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_FLAGS="-Werror" \
-DCMAKE_CXX_STANDARD=11 \
-DCMAKE_EXE_LINKER_FLAGS="-lpthread" \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why is this required?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

was not needed. cleaned

@lalitb
Copy link
Copy Markdown
Member

lalitb commented Nov 5, 2021

@esigo - Sorry about this, but realized afterward that the #1053 merge will break this PR. Unfortunately, we need changes in this PR for CI to go through ( I can do it if you want in your branch as my PR was the culprit to break this ).

include_directories(include)
find_package(prometheus-cpp CONFIG REQUIRED)

add_library(prometheus_exporter_deprecated src/prometheus_collector.cc
Copy link
Copy Markdown
Contributor

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

fixed

@esigo
Copy link
Copy Markdown
Member Author

esigo commented Nov 5, 2021

@esigo - Sorry about this, but realized afterward that the #1053 merge will break this PR. Unfortunately, we need changes in this PR for CI to go through ( I can do it if you want in your branch as my PR was the culprit to break this ).
@lalitb No problem. I'll take care of it :)

@@ -0,0 +1,111 @@
/*
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

done

@lalitb lalitb merged commit 994c08a into open-telemetry:main Nov 9, 2021
@esigo esigo deleted the esigo-prometheus-exporter branch November 9, 2021 16:30
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.

4 participants