Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

feat(agent): support interval and timeout label for agent scrape #577

Conversation

scottzhlin
Copy link
Contributor

Refer to Prometheus and Pyroscope, support dynamic setting of timeout and interval based on service discovery info.

@cyriltovena
Copy link
Collaborator

Thank you @scottzhlin I'll take a look, do note that we're going to deprecate this agent in favor of Grafana Agent and we should add this feature there too !

@scottzhlin
Copy link
Contributor Author

Hi @cyriltovena, could you please help take a look at the content of this PR and see if it meets your design expectations? If it does, I can contribute this PR implementation to Grafana Agent.

Copy link
Collaborator

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM

@cyriltovena cyriltovena merged commit f02f1ca into grafana:main Mar 15, 2023
}

if timeoutDuration > intervalDuration {
return nil, nil, fmt.Errorf("scrape timeout cannot be greater than scrape interval (%q > %q)", timeout, interval)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this check seems to be in conflict with another

if c.ScrapeTimeout <= c.ScrapeInterval {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The PR (#593) maybe can fix it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants