-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Allow for Metric Scraping interval to be defined overall & per-metric via YAML config #473
Allow for Metric Scraping interval to be defined overall & per-metric via YAML config #473
Conversation
…don't push this logic down in to the scrapers
…rgeting different metrics to be scheduled
…as a cron expression instead of System.Timespan
…icDefaults to metrics that don't have values for those properties
…metrics to illustrate cusomizability and new usage of metricDefaults for overall scraping schedule (vs old env variable)
…don't push this logic down in to the scrapers
…as a cron expression instead of System.Timespan
…metrics to illustrate cusomizability and new usage of metricDefaults for overall scraping schedule (vs old env variable)
Docker image for this PR was built and is available on Docker Hub. You can pull it locally via the CLI: docker pull tomkerkhove/promitor-agent-scraper-ci:pr473 Want to verify the new version? Run it locally: docker run -d -p 8999:80 --name promitor-scraper-pr473 \
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env PROMITOR_AUTH_APPKEY='<azure-ad-app-key>' \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
tomkerkhove/promitor-agent-scraper-ci:pr473 |
Docker image for this PR was built and is available on Docker Hub. You can pull it locally via the CLI: docker pull tomkerkhove/promitor-agent-scraper-ci:pr473 Want to verify the new version? Run it locally: docker run -d -p 8999:80 --name promitor-scraper-pr473 \
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env PROMITOR_AUTH_APPKEY='<azure-ad-app-key>' \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
tomkerkhove/promitor-agent-scraper-ci:pr473 |
forgot docs |
Docker image for this PR was built and is available on Docker Hub. You can pull it locally via the CLI: docker pull tomkerkhove/promitor-agent-scraper-ci:pr473 Want to verify the new version? Run it locally: docker run -d -p 8999:80 --name promitor-scraper-pr473 \
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env PROMITOR_AUTH_APPKEY='<azure-ad-app-key>' \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
tomkerkhove/promitor-agent-scraper-ci:pr473 |
anybody know why the cc @tomkerkhove |
3d9aa3d
to
ca0c378
Compare
Docker image for this PR was built and is available on Docker Hub. You can pull it locally via the CLI: docker pull tomkerkhove/promitor-agent-scraper-ci:pr473 Want to verify the new version? Run it locally: docker run -d -p 8999:80 --name promitor-scraper-pr473 \
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env PROMITOR_AUTH_APPKEY='<azure-ad-app-key>' \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
tomkerkhove/promitor-agent-scraper-ci:pr473 |
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.
Please consolidate the optional parameters, move the resourceGroupName
to the same section that you just created
Docker image for this PR was built and is available on Docker Hub. You can pull it locally via the CLI: docker pull tomkerkhove/promitor-agent-scraper-ci:pr473 Want to verify the new version? Run it locally: docker run -d -p 8999:80 --name promitor-scraper-pr473 \
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env PROMITOR_AUTH_APPKEY='<azure-ad-app-key>' \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
tomkerkhove/promitor-agent-scraper-ci:pr473 |
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.
LGTM
@tomkerkhove not sure why but we have 1 approving review and it still won't let us merge the PR. 🤷🏻♂️ |
@jsturtevant could you approve this and see if we can get "Squash & merge" to light up for us? |
Docker image for this PR was built and is available on Docker Hub. You can pull it locally via the CLI: docker pull tomkerkhove/promitor-agent-scraper-ci:pr473 Want to verify the new version? Run it locally: docker run -d -p 8999:80 --name promitor-scraper-pr473 \
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env PROMITOR_AUTH_APPKEY='<azure-ad-app-key>' \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
tomkerkhove/promitor-agent-scraper-ci:pr473 |
Docker image for this PR was built and is available on Docker Hub. You can pull it locally via the CLI: docker pull tomkerkhove/promitor-agent-scraper-ci:pr473 Want to verify the new version? Run it locally: docker run -d -p 8999:80 --name promitor-scraper-pr473 \
--env PROMITOR_AUTH_APPID='<azure-ad-app-id>' \
--env PROMITOR_AUTH_APPKEY='<azure-ad-app-key>' \
--volume C:/Promitor/metrics-declaration.yaml:/config/metrics-declaration.yaml \
tomkerkhove/promitor-agent-scraper-ci:pr473 |
Thanks @brandonh-msft ! |
Fixes #258 & #259
This PR accomplishes the following:
metricDefaults.scraping.schedule
<metric>.scraping.schedule
defined, overriding the value specified inmetricDefaults
metricDefaults.scraping.schedule
as part of validationMetricScrapingJob
instance for every metric defined, with the correct schedule (inherited from default, overriden in metric def). I confirmed they all run in parallel on their correct schedules in my local testing 🎉In addition to these features added, it changes the behavior of the Scraper to no longer require
MetricDefaults
as theMetricDeclarationProvider
now supports anapplyDefaults
parameter on itsGet()
method (false
by default; up for debate IMO) which will, when furnishing individual metrics, apply values inmetricDefaults
to any properties which don't have values in the metric itself. This isolates the scraper from needing to know how/when to do this.