• Ruth Linehan's avatar
    (PE-18347) Add metric_id option to http requests in termini · a98f40a4
    Ruth Linehan authored
    Add the `metric_id` option to the http requests in the facts terminus,
    resource terminus, query function, and for command submission. These
    `metric_id`s will be used by the http client Puppet Server uses to create
    metrics in its registry, which can then be queried to determine how long
    requests Puppet Server makes to PuppetDB are taking.
    
    For each element in a `metric_id` array, a metric is created. So, a `metric_id`
    `[:foo :bar :baz]` will result in metrics `foo`, `foo.bar`, and `foo.bar.baz`.
    The elements in the array can be symbols or strings. For more information, see
    the [documentation on metrics in the clj-http-client
    library](https://github.com/puppetlabs/clj-http-client/blob/master/doc/metrics.md).
    
    For the facts `find` action, the `metric_id` is `[:puppetdb :facts :find
    <node-name>]`.
    
    For the facts `search` action, the `metric_id` is `[:puppetdb :facts
    :search]`. The query is not included as part of the `metric_id` because it
    would not create useful metrics to capture - each search query can be pretty
    much anything, and tracking a single search query over time probably won't be
    very useful.
    
    For the resource `search` action, the `metric_id` is `[:puppetdb :resource
    :search <resource type>]`.
    
    For the http call made by the puppetdb query function, the `metric_id` is
    `[:puppetdb :query]`. This metric-id does not include the actual query, since
    there are so many possible queries that tracking metrics on them does not seem
    particularly useful.
    
    For the http requests for submitting commands, `metric_id`s will be
    `[:puppetdb :command <command name> <certname>]`.
    a98f40a4
Name
Last commit
Last update
..
lib/puppet Loading commit data...
spec Loading commit data...