-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[processor/memory_limiter] Update config validation #9059
Merged
bogdandrutu
merged 1 commit into
open-telemetry:main
from
dmitryax:update-memory-limiter-config-validation
Dec 12, 2023
Merged
[processor/memory_limiter] Update config validation #9059
bogdandrutu
merged 1 commit into
open-telemetry:main
from
dmitryax:update-memory-limiter-config-validation
Dec 12, 2023
Conversation
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
Member
dmitryax
commented
Dec 10, 2023
- Fix names of the config fields that are validated in the error messages
- Move the validation from start to the initialization phrase
dmitryax
force-pushed
the
update-memory-limiter-config-validation
branch
from
December 10, 2023 23:43
a35678d
to
1fb41fc
Compare
dmitryax
changed the title
[processor/memory_limiter] Update config validation errors
[processor/memory_limiter] Update config validation
Dec 10, 2023
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9059 +/- ##
==========================================
- Coverage 91.49% 91.42% -0.08%
==========================================
Files 316 316
Lines 17181 17185 +4
==========================================
- Hits 15720 15711 -9
- Misses 1165 1173 +8
- Partials 296 301 +5 ☔ View full report in Codecov by Sentry. |
- Fix names of the config fields that are validated in the error messages - Move the validation from start to the initialization phrase
dmitryax
force-pushed
the
update-memory-limiter-config-validation
branch
from
December 11, 2023 01:16
1fb41fc
to
78ad81b
Compare
TylerHelmuth
approved these changes
Dec 11, 2023
bogdandrutu
approved these changes
Dec 12, 2023
Comment on lines
-38
to
+46
"checkInterval must be greater than zero") | ||
errCheckIntervalOutOfRange = errors.New("check_interval must be greater than zero") | ||
|
||
errLimitOutOfRange = errors.New( | ||
"memAllocLimit or memoryLimitPercentage must be greater than zero") | ||
errLimitOutOfRange = errors.New("limit_mib or limit_percentage must be greater than zero") | ||
|
||
errMemSpikeLimitOutOfRange = errors.New( | ||
"memSpikeLimit must be smaller than memAllocLimit") | ||
errMemSpikeLimitOutOfRange = errors.New("spike_limit_mib must be smaller than limit_mib") | ||
|
||
errMemSpikePercentageLimitOutOfRange = errors.New("spike_limit_percentage must be smaller than limit_percentage") | ||
|
||
errPercentageLimitOutOfRange = errors.New( | ||
"memoryLimitPercentage and memorySpikePercentage must be greater than zero and less than or equal to hundred", | ||
) | ||
"limit_percentage and spike_limit_percentage must be greater than zero and less than or equal to hundred") |
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.
Move them to config.go?
bogdandrutu
pushed a commit
that referenced
this pull request
Dec 13, 2023
sokoide
pushed a commit
to sokoide/opentelemetry-collector
that referenced
this pull request
Dec 18, 2023
sokoide
pushed a commit
to sokoide/opentelemetry-collector
that referenced
this pull request
Dec 18, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.