This repository has been archived by the owner on Nov 22, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 79
Multi-valued arguments #121
Comments
This was referenced May 16, 2016
Closed
I like the opts option which provides max flex. |
The more I think about this the more I think an improved expression editor is a pre-req |
+1 for this problem being solved. As a beginner I did: As a beginner I tried
|
+1 Please add it. Thanks for your great job. |
+1 |
This would be hugely appreciated by us. +1. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Currently support for multi-valued arguments to functions are handled independently by the receiving function. This requires users to pass a specially formatted string, for which there is currently a basic convention:
.es(metric="cardinality:user")
This works well enough for simple key-value situations. But it falls apart for more complex cases. For example, the
cardinality
metric above can take aprecision_threshold
parameter. How do we handle that?It would be easy to add a 3rd parameter, eg
cardinality:user:200
, but this won't be shared metric aggs, and all of the arguments will be positional. Gross.I could add an alternate form allows for an
opts
function that generates an object to be passed into complex arguments.es(metric=.opts(type=cardinality, field=user, precision_threshold=200))
Pros
.es(metric=.opts(type=percentiles, field=bytes per=1, per=10, per=50, per=90))
Cons
.opts()
is essentially a datasource, but it only does anything if passed as an argument somewhere that makes sense, and there's nothing you'd chain to it to..opts()
would need to be excluded from autocomplete. This is the easy way to handle it. In reality, better context support in the autocompletion would be ideal..opts()
will be really hardI think the key here is that this would really need to be optional, as it creates some really long arguments
The text was updated successfully, but these errors were encountered: