Datadog syntax: Difference between revisions

From wikinotes
Line 10: Line 10:
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Entering Queries -->
</blockquote><!-- Entering Queries -->
= Datatypes =
<blockquote>
Metrics are assigned datatypes
<syntaxhighlight lang="promql">
</syntaxhighlight>
</blockquote><!-- Datatypes -->
= Joins =
<blockquote>
<syntaxhighlight lang="promql">
AND
OR
-
</syntaxhighlight>
</blockquote><!-- Joins -->


= Syntax =
= Syntax =
Line 15: Line 33:
<syntaxhighlight lang="promql">
<syntaxhighlight lang="promql">
sum:my_metric{*}.as_count()  # sum counts per-sample of `my_metric`
sum:my_metric{*}.as_count()  # sum counts per-sample of `my_metric`
sum:my_metric{env:prod}      # `my_metric`, where tag `env=prod`
</syntaxhighlight>
<syntaxhighlight lang="promql">
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Syntax -->
</blockquote><!-- Syntax -->

Revision as of 21:41, 5 May 2022

Entering Queries

There is both a JSON query (all-text), and a UI-aided query.

Notebooks:
  - New Notebook:
    - </>  # on the far right of the query, this toggles interactive "json-syntax" queries

Datatypes

Metrics are assigned datatypes

Joins

AND
OR
-

Syntax

sum:my_metric{*}.as_count()  # sum counts per-sample of `my_metric`
sum:my_metric{env:prod}      # `my_metric`, where tag `env=prod`