-
Notifications
You must be signed in to change notification settings - Fork 6
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
Name generator #16
Name generator #16
Conversation
Co-authored-by: Andrii Dembitskyi <andrew.dembitskiy@gmail.com>
Co-authored-by: Andrii Dembitskyi <andrew.dembitskiy@gmail.com>
Co-authored-by: Andrii Dembitskyi <andrew.dembitskiy@gmail.com>
Co-authored-by: Andrii Dembitskyi <andrew.dembitskiy@gmail.com>
Co-authored-by: Andrii Dembitskyi <andrew.dembitskiy@gmail.com>
Co-authored-by: Andrii Dembitskyi <andrew.dembitskiy@gmail.com>
# Conflicts: # src/Name/Generator/CommandNameGenerator.php
@@ -23,8 +23,8 @@ public function generate(): string | |||
{ | |||
$queue = clone $this->queue; | |||
while (false === $queue->isEmpty()) { | |||
if ('' !== ($debugId = $queue->extract()->generate())) { | |||
return $debugId; | |||
if ('' !== ($name = $queue->extract()->generate())) { |
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.
Is it special behavior for name generators - if them return an empty string, then caller may think it is like a 'I cannot generate name, try another one'?
src/Resources/services.yml
Outdated
jaeger.name.generator.chain: | ||
class: Jaeger\Symfony\Name\Generator\NameGeneratorChain | ||
arguments: | ||
- '@spl.priority.queue' | ||
jaeger.name.generator: | ||
alias: 'jaeger.name.generator.chain' | ||
jaeger.name.generator.shorten: |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
if ($config['name_generator']['max_length']) {
$loader->load('shorten.yml');
$container->setParameter('jaeger.name.max_length', $config['name_generator']['max_length']);
}
Added this to the configuration parser + separate shorten.yml
Co-authored-by: Andrii Dembitskyi <andrew.dembitskiy@gmail.com>
Co-authored-by: Andrii Dembitskyi <andrew.dembitskiy@gmail.com>
Co-authored-by: Andrii Dembitskyi <andrew.dembitskiy@gmail.com>
Co-authored-by: Andrii Dembitskyi <andrew.dembitskiy@gmail.com>
Added some suggestions for PR - #17 UPD: fixed link to PR |
…oller only for null value
Name generator suggestions
Name generation is a feature that aims to limit number of operation in case routes are generated dynamically and may result in thousands of different operation names, although are handled by the same
controller::action