Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 138 additions & 1 deletion docs/modules/n1ql-rest-admin/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -4595,7 +4595,7 @@ endif::[]
[#models]
= Definitions

:count-models: 10
:count-models: 12

:leveloffset: +1

Expand All @@ -4612,6 +4612,8 @@ endif::collapse-models[]
<<Clusters>>
<<Garbage>>
<<Logging_Parameters>>
<<Logging_Parameters_Plan>>
<<Logging_Parameters_Plan_Pairs>>
<<Metrics>>
<<Nodes>>
<<Requests>>
Expand Down Expand Up @@ -5004,6 +5006,40 @@ If specified, all completed queries with this user name are logged.
a| String


a|
*statement* +
_optional_
a|

[markdown]
--
A LIKE search pattern to match against the query text.
If specified, all completed queries where the pattern is found are logged.

--

[%hardbreaks]
*Default:* `pass:c[""]`
*Example:* `pass:c["%FIND USER%"]`
{blank}
a| String


a|
*plan* +
_optional_
a|

Comment thread
rakhi-prathap marked this conversation as resolved.
[markdown]
--
include::index.adoc[tag=desc-Logging_Parameters_Plan, opts=optional]
--

[%hardbreaks]
{blank}
a| <<Logging_Parameters_Plan>>


|===

//end::Logging_Parameters[]
Expand All @@ -5021,6 +5057,107 @@ a| String



// markup not found, no include::{specDir}definitions/Logging_Parameters_Plan/definition-before.adoc[opts=optional]


ifdef::collapse-models[]
[discrete]
endif::collapse-models[]
[#Logging_Parameters_Plan]
= Plan Qualifier

:leveloffset: +1

// markup not found, no include::{specDir}definitions/Logging_Parameters_Plan/definition-begin.adoc[opts=optional]


.icon:bars[fw] Composite Schema
{blank}

One of the following:

* <<Logging_Parameters_Plan_Pairs>>


* <<Logging_Parameters_Plan_Pairs>>
array



// markup not found, no include::{specDir}definitions/Logging_Parameters_Plan/definition-end.adoc[opts=optional]


:leveloffset: -1

// markup not found, no include::{specDir}definitions/Logging_Parameters_Plan/definition-after.adoc[opts=optional]




// markup not found, no include::{specDir}definitions/Logging_Parameters_Plan_Pairs/definition-before.adoc[opts=optional]


ifdef::collapse-models[]
[discrete]
endif::collapse-models[]
[#Logging_Parameters_Plan_Pairs]
= Field:Value Pairs

:leveloffset: +1

// markup not found, no include::{specDir}definitions/Logging_Parameters_Plan_Pairs/definition-begin.adoc[opts=optional]


.icon:brackets-curly[fw] Object
{blank}

//tag::Logging_Parameters_Plan_Pairs[]


[cols="25,55,20"]
|===
| Property | | Schema

a|
_additional +
property_
a|

[markdown]
--
A field:value pair describing a field in the query plan, and the value that the field must have for the request to be logged.
The name of the property is the name of the field in the query plan.
The value may be a string, number, array, or any other JSON value.

Within a single JSON object, if multiple field:value pairs are specified, then all pairs must be matched (using AND).
For example, `{"index": "ix1", "#operator": "IntersectScan"}` specifies that if the query plan has an `index` field with the value `"ix1"` AND has an `IntersectScan` operator, then the request should be logged.

Within an array of JSON objects, each field:value pair must be unique, but fields can be repeated.
For example, `[{"index": "ix1"}, {"index": "ix2"}]` specifies that if the query plan has an `index` field with the value `"ix1"` AND another `index` field with the value `"ix2"`, then the request should be logged.
--

[%hardbreaks]
{blank}
a| Any Type


|===

//end::Logging_Parameters_Plan_Pairs[]




// markup not found, no include::{specDir}definitions/Logging_Parameters_Plan_Pairs/definition-end.adoc[opts=optional]


:leveloffset: -1

// markup not found, no include::{specDir}definitions/Logging_Parameters_Plan_Pairs/definition-after.adoc[opts=optional]




// markup not found, no include::{specDir}definitions/Metrics/definition-before.adoc[opts=optional]


Expand Down
50 changes: 50 additions & 0 deletions src/admin/swagger/admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,18 @@ components:
description: |
A user name, as given in the request credentials.
If specified, all completed queries with this user name are logged.
statement:
type: string
default: ""
example: "%FIND USER%"
x-has-default: true
x-has-example: true
description: |
A LIKE search pattern to match against the query text.
If specified, all completed queries where the pattern is found are logged.
plan:
$ref: "#/components/schemas/Logging_Parameters_Plan"

completed-limit:
type: integer
format: int32
Expand Down Expand Up @@ -2132,6 +2144,44 @@ components:
[queryUseReplica]: #queryUseReplica
[use_replica_req]: #use_replica_req

Logging_Parameters_Plan:
title: Plan Qualifier
description: |-
An object, or an array of objects, containing one or more field:value pairs to match against the query plan.
Each pair describes a field in the query plan and the value it must have.
All completed queries where the specified field:value pairs are found in the plan are logged.
oneOf:
- $ref: '#/components/schemas/Logging_Parameters_Plan_Pairs'
- type: array
title: 'Repeated Field:Value Pairs'
example:
- index: ix1
- index: ix2
x-has-example: true
items:
$ref: '#/components/schemas/Logging_Parameters_Plan_Pairs'

Logging_Parameters_Plan_Pairs:
type: object
title: 'Field:Value Pairs'
default: {}
example:
index: ix1
'#operator': IntersectScan
x-has-default: true
x-has-example: true
additionalProperties:
description: |-
A field:value pair describing a field in the query plan, and the value that the field must have for the request to be logged.
The name of the property is the name of the field in the query plan.
The value may be a string, number, array, or any other JSON value.

Within a single JSON object, if multiple field:value pairs are specified, then all pairs must be matched (using AND).
For example, `{"index": "ix1", "#operator": "IntersectScan"}` specifies that if the query plan has an `index` field with the value `"ix1"` AND has an `IntersectScan` operator, then the request should be logged.

Within an array of JSON objects, each field:value pair must be unique, but fields can be repeated.
For example, `[{"index": "ix1"}, {"index": "ix2"}]` specifies that if the query plan has an `index` field with the value `"ix1"` AND another `index` field with the value `"ix2"`, then the request should be logged.

Garbage:
type: object
title: Garbage Collection
Expand Down