Comments (3)
this does in fact seem to be a nice written representation of what we spoke about.
- add time window to exporters (only accept data with timestamp as value that is higher than exporter instance creation, but it not more than a threshold) (except committime exporter, because it only collects commit after a deployment)
- explain this new behavior in the docs to user
I don't recall discussing these two, but seems like the right move to me.
- remove deploy active metric
- add clean up to metrics endpoint and increase scrapping time interval (no need to be every 15s)
from pelorus.
- remove deploy active metric
- This is resolved by #943
- OPTIONAL Test if it is possible to deploytime metric do not use exactly timestamp (prometheus would use timestamp it received (because of ~3horus receive problem) and use exactly timestamp as value)
- agree, additional tests:
- check scenario where we deploy test application let's call it TestApp
- deploy TestApp it 10 times every 30min (can be a simple shell script with sleep)
- wait 2h before going into grafana
- After that test number of deploymets over the following periods:
- last 2 hours, should give 0
- previous 2h (so 4h ago -> 2h ago) should give 4 deployments;
- last week - should give 10 deployments.
- check scenario where we create 10 deployments using webhook exporter and then restart webhook exporter (just delete running webhook instance).
- wait 10 min
- check how many deployments happened in the last week
- check how many deployments happened in the last 5 minutes
- check scenario where we deploy test application let's call it TestApp
- add clean up to deploytime, committime and failure exporter
- This I think is't really required as the scrape always get the new Gauge object, so we could have this for free. Just need to check if the caching in committime requires some cleanup.
- add clean up to webhook exporter (seems harder than on the old exporters)
- Agree. There should be a lifetime of metric after which it is removed. The way I see it:
- Collect metrics not older than X (as implemented in #943)
- Add function to check if the time of event where it happened is not greater then Y and remove it if it's true.
- add time window to exporters (except committime exporter)
- As @weshayutin reworded above.
- explain this new behavior in the docs to user
- Agree.
from pelorus.
RE: cleanup functionality
I think we should create a new class for the metrics that inherits from GaugeMetricFamily
, let's call it PelorusGaugeMetricFamily
.
This class should have at least three additional methods:
def clear_all_metrics(self) -> int:
"""
Clears out all the in memory metrics from the GaugeMetricFamily.
Returns:
- number of metrics removed
"""
def clear_metrics(self, threshold_sec: int) -> int:
"""
Clears out the in memory metrics from the GaugeMetricFamily, which are
above certain threshold
Arg:
- threshold_sec (int): The time threshold in seconds. All metrics that occurred `threshold_sec` seconds ago or earlier will be removed.
Returns:
- number of metrics removed.
"""
def remove_metric(self, labels: Sequence[str]) -> int:
"""
Remove particular metric from the GaugeMetricFamily.
Reverse function to GaugeMetricFamily.add_metric().
Arg:
- labels Sequence[str]: The labels representing metric to be removed.
Returns:
- number of metrics removed.
"""
from pelorus.
Related Issues (20)
- Install fixed versions of tools with `make dev-env`
- Add option to authenticate against image repository
- Lead Time for Change doesn't show the graph under long interval
- Release of Pelorus Operator version 0.0.8
- mkdocs serve fails to import libcairo on certain mac setups HOT 1
- Simplify command of creating operator test images
- Prow CI should only run against PRs that touch Pelorus code
- sdp:lead_time_for_change:by_commit should include the image sha that it was matched with as a label
- commit_timestamp should include source repo URLs so that users can audit/understand/validate measure calculation
- deploy_timestamp should include image registry URL so that users can verify the source of the deployment information
- requirements.txt files should be automatically generated in CI if the PR is from dependabot HOT 1
- committime exporter not connecting to internal gitea repo HOT 10
- Open a GitHub Issue does not reflect the date in Change Failure Rate dashboard HOT 6
- Grafana doesn't show multiple cluster Pelorus metrics HOT 1
- Lead Time to Change does not reflect on grafana with two type of committime-exporter enabled HOT 1
- Custom Certificate for Jira
- Mean Time to Restore prometheus rules can miss tickets in calculation
- Pelorus images are getting old, crusty and full of vulnerabilities. We should rebuild and update them more often. HOT 1
- Release of Pelorus Operator version 0.0.9
- set minKubeVersion in operator csv spec
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pelorus.