forked from elastic/apm-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move rate limiting and service name restrictions out of processor/str…
…eam (elastic#5492) * Move rate-limiting out of processor/stream ... and into beater/api/intake, injected into the stream processor as a batch processor. This paves the way for taking a similar approach for otel. * processor/stream: unexport some things Unexport some things that are no longer needed for tests. * Move allowed service names out of processor/stream ... and into beater/api, injected into the stream processor as a batch processor. This paves the way for taking a similar approach for otel. * beater/api/intake: revise rate-limiting Rate limit after reading but before processing. Simpler and in line with what we will do for OTel. * Remove stale comment * Reinstate initial Allow * beater/api/intake: add missing return
- Loading branch information
1 parent
db22ff0
commit 778d0e9
Showing
12 changed files
with
246 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
beater/api/intake/test_approved/TestRateLimiting/LimiterAllowAll.approved.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"accepted": 19 | ||
} |
8 changes: 8 additions & 0 deletions
8
beater/api/intake/test_approved/TestRateLimiting/LimiterDeny.approved.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"accepted": 10, | ||
"errors": [ | ||
{ | ||
"message": "rate limit exceeded" | ||
} | ||
] | ||
} |
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
...er/api/intake/test_approved/TestRateLimiting/LimiterPartiallyUsedLimitAllow.approved.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"accepted": 19 | ||
} |
8 changes: 8 additions & 0 deletions
8
beater/api/intake/test_approved/TestRateLimiting/LimiterPartiallyUsedLimitDeny.approved.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"accepted": 10, | ||
"errors": [ | ||
{ | ||
"message": "rate limit exceeded" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.