Please share the list of available Hints that can be used in Broadcom APIs.
search cancel

Please share the list of available Hints that can be used in Broadcom APIs.

book

Article ID: 374692

calendar_today

Updated On:

Products

DX APM SaaS

Issue/Introduction

Note: because you are using long range in the query, it may not return all sources in the range.
To have a complete result, use a query hint to force a range search. It will ensure that all sources in the range are in the response. If it cannot be guaranteed (missing index for the particular filter), the query returns an error. It will work for the regex used in the case description. 

 

{     "specifier": {         "op":"REGEX",         "pattern":"SuperDomain.*<domain>.*",         "ignoreCase": true         },     "time": 0,     "range": <range>,     "includeLive": true,     "hints": [         {             "hint": "ForceRange"         }     ] }

Please share the list of available Hints that can be used in Broadcom APIs.

Resolution

Hints was implemented as a fix for a specific dashboard calculation. It is not intended for general use, because it disables some query planner optimizations and depends on an internal index implementation. It may change its behavior in future versions and may return an error for queries that currently guarantee the result.

To clarify the hint: If query with a "hint": ForceRange" returns a result, it is guaranteed that no data is omitted. If it cannot be guaranteed, it returns an error. A query without the hint will return the result, but the user will never know if all historic metrics are included (a known metadata limitation).

What is available today:
Force all results in range query
{"hint": "ForceRange"}
This hint instruct the planner that it must use indexes for query evaluation. Therefore all metric will be returned for requested range. This is not guaranteed by default, metrics that started and ended inside the range may not be returned is some cases. With ForceRange hint the call will throw an error when the specifier cannot be evaluated using indexes.