Skip to content

httpcaddyfile: Implement log sampling config#6682

Merged
mholt merged 2 commits intocaddyserver:masterfrom
nikonhub:feat/sampling-caddyfile
Nov 11, 2024
Merged

httpcaddyfile: Implement log sampling config#6682
mholt merged 2 commits intocaddyserver:masterfrom
nikonhub:feat/sampling-caddyfile

Conversation

@nikonhub
Copy link
Contributor

@nikonhub nikonhub commented Nov 8, 2024

Closes #6680

Support log samplig in Caddyfile

{
	auto_https off
	log {
		sampling {
			interval 100
			first 100
			thereafter 100
		}
	}
}

@CLAassistant
Copy link

CLAassistant commented Nov 8, 2024

CLA assistant check
All committers have signed the CLA.

@francislavoie
Copy link
Member

francislavoie commented Nov 8, 2024

Please also add an adapt tests in https://github.com/caddyserver/caddy/tree/master/caddytest/integration/caddyfile_adapt, both for the log global option and for the log directive (within a site block).

You can ignore the goreleaser-check failure for now. Our fault, it should skip that check on PRs from forks.

@francislavoie francislavoie changed the title Allow log sampling configuration from Caddyfile httpcaddyfile: Implement log sampling config Nov 8, 2024
@nikonhub
Copy link
Contributor Author

nikonhub commented Nov 9, 2024

I've added 2 caddy file test

Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

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

Very cool, thanks for the contribution!

@mholt mholt merged commit b183aec into caddyserver:master Nov 11, 2024
mohammed90 pushed a commit to cedricziel/caddy that referenced this pull request Aug 29, 2025
* Allow log sampling configuration from Caddyfile

* Add log sampling adapt tests
@mohammed90 mohammed90 mentioned this pull request Oct 25, 2025
46 tasks
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.

Log sampling Caddyfile support

4 participants