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 metric endpoint and Opentelemetry stats #172

Merged
merged 16 commits into from
Jun 18, 2020

Conversation

manute
Copy link
Contributor

@manute manute commented Jun 16, 2020

Issue #171

Description of changes:

  • Adds the possibility of running one http server, with a /metrics handler for prometheus, behind a configuration flag.
  • Leverage this PR to add Opentelemetry stats , useful for later add distrubuted tracing or export the metrics to other provider.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@manute manute changed the title Prometheus server Prometheus metric endpoint and Opentelemetry stats Jun 16, 2020
@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2020

Codecov Report

Merging #172 into master will decrease coverage by 0.06%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #172      +/-   ##
==========================================
- Coverage   81.37%   81.30%   -0.07%     
==========================================
  Files           8        8              
  Lines         757      765       +8     
==========================================
+ Hits          616      622       +6     
- Misses        126      128       +2     
  Partials       15       15              
Impacted Files Coverage Δ
pkg/node/node.go 59.68% <0.00%> (-0.39%) ⬇️
pkg/config/config.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3012867...8d8e37b. Read the comment docs.

@manute manute mentioned this pull request Jun 16, 2020
Copy link
Contributor

@bwagner5 bwagner5 left a comment

Choose a reason for hiding this comment

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

Great work on this! I just had a few comments in-line.

config/helm/aws-node-termination-handler/README.md Outdated Show resolved Hide resolved
pkg/config/config.go Outdated Show resolved Hide resolved
test/e2e/prometheus-metrics-test Show resolved Hide resolved
@@ -3,7 +3,11 @@ module github.com/aws/aws-node-termination-handler
go 1.14
Copy link
Contributor

Choose a reason for hiding this comment

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

NOTE: Reviewed licenses 👍

TODO: add to to thirdparty licenses file.

✅ github.com/modern-go/concurrent                      Apache License 2.0
✅ golang.org/x/oauth2                                  BSD 3-Clause "New" or "Revised" License
✅ go.opentelemetry.io/otel/exporters/metric/prometheus Apache License 2.0
✅ google.golang.org/grpc                               Apache License 2.0
✅ k8s.io/apimachinery                                  Apache License 2.0
✅ github.com/googleapis/gnostic                        Apache License 2.0
✅ golang.org/x/time                                    BSD 3-Clause "New" or "Revised" License
✅ go.opentelemetry.io/otel                             Apache License 2.0
✅ github.com/prometheus/common                         Apache License 2.0
✅ github.com/modern-go/reflect2                        Apache License 2.0
✅ github.com/gogo/protobuf                             BSD 3-Clause "New" or "Revised" License
✅ github.com/prometheus/client_golang                  Apache License 2.0
✅ github.com/cespare/xxhash                            MIT License
✅ github.com/beorn7/perks                              MIT License
✅ golang.org/x/crypto                                  BSD 3-Clause "New" or "Revised" License
✅ github.com/google/gofuzz                             Apache License 2.0
✅ github.com/golang/protobuf                           BSD 3-Clause "New" or "Revised" License
✅ go.opentelemetry.io/contrib/instrumentation/runtime  Apache License 2.0
✅ golang.org/x/text                                    BSD 3-Clause "New" or "Revised" License
✅ github.com/prometheus/procfs                         Apache License 2.0
✅ k8s.io/client-go                                     Apache License 2.0
✅ k8s.io/kubectl                                       Apache License 2.0
✅ github.com/json-iterator/go                          MIT License
✅ github.com/prometheus/client_model                   Apache License 2.0
✅ k8s.io/api                                           Apache License 2.0
✅ golang.org/x/sys                                     BSD 3-Clause "New" or "Revised" License
✅ k8s.io/klog                                          Apache License 2.0
✅ github.com/rs/zerolog                                MIT License
✅ golang.org/x/net                                     BSD 3-Clause "New" or "Revised" License
✅ github.com/davecgh/go-spew                           ISC License
✅ gopkg.in/inf.v0                                      BSD 3-Clause "New" or "Revised" License
✅ github.com/DataDog/sketches-go                       Apache License 2.0
✅ k8s.io/utils                                         Apache License 2.0
✅ github.com/matttproud/golang_protobuf_extensions     Apache License 2.0
✅ sigs.k8s.io/yaml                                     MIT License
✅ k8s.io/kube-openapi                                  Apache License 2.0
✅ gopkg.in/yaml.v2                                     Apache License 2.0

@manute
Copy link
Contributor Author

manute commented Jun 18, 2020

@bwagner5 I think I've addressed all of the requested changes.
It would be nice to have some help in the Travis build as I don't understand why it's failing.

@bwagner5
Copy link
Contributor

@manute I've reviewed the changes you made, everything looks good to me. The intermittent failures on the tests is a known issue from a recently merged PR. I'll be looking into the tests to stabilize them soon.

Thanks for this contribution!

Copy link
Contributor

@bwagner5 bwagner5 left a comment

Choose a reason for hiding this comment

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

nice work! thanks!

@bwagner5 bwagner5 merged commit 011a797 into aws:master Jun 18, 2020
@manute manute deleted the prometheus-server branch January 9, 2024 13:29
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.

3 participants