
Label
Labels allow tagging the query for later identification.
Label
- argument:string!
mandatory string argument representing the name of the label
- argument:any!
- mandatory any argument representing the value of the label, any supported type can be used
This label constraint allows a single label name with associated value to be specified in the query header and
propagated to the trace generated for the query. A query can be tagged with multiple labels.
Labels are also recorded with the query in the traffic record and can be
used to look up the query in the traffic inspection or traffic replay. Labels are also attached to JFR events related
to the query.
Each label is a key-value pair appended to the query header, as shown in the following example:
You can also provide labels using HTTP request headers in the form of X-Meta-Label: <label-name>=<label-value>.
You may set multiple labels by providing multiple X-Meta-Label headers in the same request.
There are also automatic labels that are added to the query by the system, such as:
- client-ip: the IP address of the client that sent the query (real client IP address can be propagated using the X-Forwarded-For header)
- client-uri: the URI of the client that sent the query, present only if X-Forwarded-Uri header is present
- client-id: the identification of the client - see clientId
- trace-id: current trace ID if tracing is enabled