Try it free

DPL Universally Unique Identifiers

  • Latest Dynatrace
  • Reference

UUIDSTRING

Matches valid Universally Unique Identifiers (UUIDs) in the standard 8-4-4-4-12 hexadecimal format, for example b79cb3ba-745e-5d9a-8903-4a02327a7e09.

Use the following expression to parse UUID values:

UUIDSTRING:result

For example, parsing UUID values:

Descriptioninput (string)result (string)

Plain UUID

b79cb3ba-745e-5d9a-8903-4a02327a7e09

b79cb3ba-745e-5d9a-8903-4a02327a7e09

Uppercase UUID

B79CB3BA-745E-5D9A-8903-4A02327A7E09

B79CB3BA-745E-5D9A-8903-4A02327A7E09

Uppercase no-separator form

B79CB3BA745E5D9A89034A02327A7E09

null

Lowercase no-separator form

b79cb3ba745e5d9a89034a02327a7e09

null

Nil UUID

00000000-0000-0000-0000-000000000000

00000000-0000-0000-0000-000000000000

16-digit hex value

000000000000007b

null

No UUID

status=ok user=johndoe

null

Whitespace

␣

null

See how to use in DQL
data record(input = "b79cb3ba-745e-5d9a-8903-4a02327a7e09"),
record(input = "B79CB3BA-745E-5D9A-8903-4A02327A7E09"),
record(input = "B79CB3BA745E5D9A89034A02327A7E09"),
record(input = "b79cb3ba745e5d9a89034a02327a7e09"),
record(input = "00000000-0000-0000-0000-000000000000"),
record(input = "000000000000007b"),
record(input = "status=ok user=johndoe"),
record(input = " ")
| parse input, "UUIDSTRING:result"

Returns

The data type of the extracted value is string.

To use the extracted value in comparisons against native uid type columns, convert it with toUid(result). See DQL conversion functions.

Practical examples

Example 1: Parse trace and span IDs

Given the following input:

traceId=b79cb3ba-745e-5d9a-8903-4a02327a7e09 spanId=f47ac10b-58cc-4372-a567-0e02b2c3d479

Use the following expression to extract the trace and span IDs:

'traceId=' UUIDSTRING:traceId DATA 'spanId=' UUIDSTRING:spanId
traceId (string)spanId (string)

b79cb3ba-745e-5d9a-8903-4a02327a7e09

f47ac10b-58cc-4372-a567-0e02b2c3d479

See how to use in DQL
data record(input = "traceId=b79cb3ba-745e-5d9a-8903-4a02327a7e09 spanId=f47ac10b-58cc-4372-a567-0e02b2c3d479")
| parse input, "'traceId=' UUIDSTRING:traceId DATA 'spanId=' UUIDSTRING:spanId"
Example 2: Parse a request ID from a log record

Given the following input:

2024-03-12T10:15:32Z INFO [auth-service] User login succeeded requestId=b79cb3ba-745e-5d9a-8903-4a02327a7e09

Use the following expression to extract the request ID:

DATA 'requestId=' UUIDSTRING:requestId
requestId (string)

b79cb3ba-745e-5d9a-8903-4a02327a7e09

See how to use in DQL
data record(input = "2024-03-12T10:15:32Z INFO [auth-service] User login succeeded requestId=b79cb3ba-745e-5d9a-8903-4a02327a7e09")
| parse input, "DATA 'requestId=' UUIDSTRING:requestId"
Related tags
Dynatrace Platform