Description
The recently added logdispatch.exclude-paths property is useful for blocking specific paths such as /health and /actuator/**. However, in many real-world microservices only a specific set of paths should be monitored, and listing every other path to exclude becomes impractical at scale.
An allowlist property (include-only-paths) would be the more ergonomic and maintainable solution for these cases.
Problem Example
A service with 30+ endpoints where only the payment and order APIs need monitoring:
Without allowlist (impractical):
logdispatch:
exclude-paths: "/health,/actuator/**,/metrics/**,/docs/**,/swagger-ui/**,/v3/api-docs/**,..."
With allowlist (clean and maintainable):
logdispatch:
include-only-paths: "/api/v1/payments/**,/api/v1/orders/**"
Acceptance Criteria
Proposed Configuration
logdispatch:
server-url: "https://your-apm-server.com/api/v1/ingest/logs"
api-key: "your-secret-api-key"
include-only-paths: "/api/v1/payments/**,/api/v1/orders/**"
exclude-paths: "/api/v1/payments/ping"
Notes
- This is the natural complement to
exclude-paths and completes the path filtering feature set
- Follows the same allowlist vs denylist pattern used in Spring Security's
requestMatchers
- Non-breaking — users with no
include-only-paths configured see zero behaviour change
Description
The recently added
logdispatch.exclude-pathsproperty is useful for blocking specific paths such as/healthand/actuator/**. However, in many real-world microservices only a specific set of paths should be monitored, and listing every other path to exclude becomes impractical at scale.An allowlist property (
include-only-paths) would be the more ergonomic and maintainable solution for these cases.Problem Example
A service with 30+ endpoints where only the payment and order APIs need monitoring:
Without allowlist (impractical):
With allowlist (clean and maintainable):
Acceptance Criteria
logdispatch.include-only-pathsaccepting a comma-separated list of URI patterns/api/v1/**) using Spring'sAntPathMatcher, consistent withexclude-pathsinclude-only-pathsis set and the request URI does not match any pattern, skip APM dispatch entirelyinclude-only-pathsis not set, behaviour falls back to the current default where all paths are monitored (non-breaking)exclude-pathsandinclude-only-pathsare configured:include-only-pathsis evaluated first. If the path does not match, skip. If it matches, then evaluateexclude-paths.Proposed Configuration
Notes
exclude-pathsand completes the path filtering feature setrequestMatchersinclude-only-pathsconfigured see zero behaviour change