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

Add cache observer #766

Merged
merged 5 commits into from
Apr 6, 2021
Merged

Add cache observer #766

merged 5 commits into from
Apr 6, 2021

Conversation

gdey
Copy link
Member

@gdey gdey commented Mar 30, 2021

Add Observability metrics for Cache Providers.

This will work for all providers.
Includes support for push.

fixes #756

@gdey gdey requested review from ARolek and ear7h March 30, 2021 07:57
@gdey
Copy link
Member Author

gdey commented Mar 30, 2021

I have not had a chance to test the push on this. So, this is not quite ready.

@coveralls
Copy link

coveralls commented Mar 30, 2021

Pull Request Test Coverage Report for Build d74533b06-PR-766

  • 9 of 69 (13.04%) changed or added relevant lines in 11 files are covered.
  • 4 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.2%) to 45.444%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/tegola/cmd/cache/cache.go 0 1 0.0%
cmd/tegola/cmd/version.go 0 1 0.0%
cmd/tegola/cmd/root.go 0 3 0.0%
maths/maths.go 0 3 0.0%
cmd/tegola/cmd/server.go 0 5 0.0%
cmd/tegola/cmd/cache/seed_purge.go 0 6 0.0%
server/server.go 5 13 38.46%
atlas/atlas.go 0 33 0.0%
Files with Coverage Reduction New Missed Lines %
maths/maths.go 1 30.87%
atlas/atlas.go 3 3.88%
Totals Coverage Status
Change from base Build 671145575: -0.2%
Covered Lines: 5416
Relevant Lines: 11918

💛 - Coveralls

Copy link
Member

@ARolek ARolek left a comment

Choose a reason for hiding this comment

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

A few comments inline. This is looking great!

Per the discussion today we need a way for push to periodically send metric updates.

observability/observability.go Outdated Show resolved Hide resolved
observability/prometheus/cache.go Outdated Show resolved Hide resolved
observability/prometheus/cache.go Outdated Show resolved Hide resolved
observability/prometheus/cache.go Outdated Show resolved Hide resolved
@gdey gdey force-pushed the add_cache_observer branch 3 times, most recently from 78596f7 to 867cd29 Compare March 31, 2021 15:20
@gdey gdey changed the base branch from v0.14.x to add_http_end_point_observer April 5, 2021 23:03
@gdey gdey changed the base branch from add_http_end_point_observer to v0.14.x April 5, 2021 23:05
gdey added 3 commits April 5, 2021 20:04
Split out the Observability interface so that API route and viewer route are dealt with separately.

Moved Null Observer to an internal package, treating nil as a Null Observer.
Prometheus observer can be configured to indicate which API vars should be filled in. Default variables
are :map_name, :layer_name and :z.
Moved build information into an internal package to make it simpler to set and share
that information across various packages.
Includes support for pushing, and the pushing will happen at an interval which defaults to 10 seconds.

*  Added cleanup for Observability
@gdey gdey merged commit 6f75699 into v0.14.x Apr 6, 2021
@gdey gdey deleted the add_cache_observer branch April 6, 2021 03:17
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.

Add Prometheus support for Cache Providers
3 participants