Skip to content

Commit 44c2274

Browse files
committed
Update docs for link parameter formatting
Signed-off-by: Drew Corlin <[email protected]>
1 parent 67dc2a5 commit 44c2274

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

content/docs/next-release-v2/frontend-ui.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ An example configuration file (see [complete schema here](https://github.com/jae
6666
"key": "uniqueId",
6767
"url": "https://mykibana.com/uniqueId=#{uniqueId}&traceId=#{trace.traceID}",
6868
"text": "Redirect to kibana to view log"
69+
},
70+
{
71+
"type": "traces",
72+
"url": "https://mykibana.com/_dashboards/app/discover#/?_g=(time:(from:'#{startTime | epoch_micros_to_date_iso}',to:'#{endTime | epoch_micros_to_date_iso}'))&_a=(index:filebeat-all,query:(language:kuery,query:'#{traceID}'))",
73+
"text": "Redirect to kibana to view log with formatted dates"
6974
}]
7075
}
7176
```
@@ -146,6 +151,13 @@ For traces, the supported template fields are: `duration`, `endTime`, `startTime
146151

147152
Further, the trace template fields are available for substitution in process/logs/tags type when the trace template fields are prefixed with `trace.`. For example: `trace.traceID`, `trace.startTime`.
148153

154+
#### Formatting
155+
156+
In addition to interpolating fields into links, formatting functions can be used. The syntax is `#{field | function}` (eg `#{endTime | epoch_micros_to_date_iso}'`). The available formatting functions and a description of their behavior are:
157+
| Function | Description | Example |
158+
| -------- | ----------- | ------- |
159+
| `epoch_micros_to_date_iso` | Format a date in microseconds since epoch to an ISO date time | `#{endTime \| epoch_micros_to_date_iso}` |
160+
149161
## Embedded Mode
150162

151163
Starting with version 1.9, Jaeger UI provides an "embedded" layout mode which is intended to support integrating Jaeger UI into other applications. Currently (as of `v0`), the approach taken is to remove various UI elements from the page to make the UI better suited for space-constrained layouts.

content/docs/next-release/frontend-ui.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ An example configuration file (see [complete schema here](https://github.com/jae
6666
"key": "uniqueId",
6767
"url": "https://mykibana.com/uniqueId=#{uniqueId}&traceId=#{trace.traceID}",
6868
"text": "Redirect to kibana to view log"
69+
},
70+
{
71+
"type": "traces",
72+
"url": "https://mykibana.com/_dashboards/app/discover#/?_g=(time:(from:'#{startTime | epoch_micros_to_date_iso}',to:'#{endTime | epoch_micros_to_date_iso}'))&_a=(index:filebeat-all,query:(language:kuery,query:'#{traceID}'))",
73+
"text": "Redirect to kibana to view log with formatted dates"
6974
}]
7075
}
7176
```
@@ -146,6 +151,13 @@ For traces, the supported template fields are: `duration`, `endTime`, `startTime
146151

147152
Further, the trace template fields are available for substitution in process/logs/tags type when the trace template fields are prefixed with `trace.`. For example: `trace.traceID`, `trace.startTime`.
148153

154+
#### Formatting
155+
156+
In addition to interpolating fields into links, formatting functions can be used. The syntax is `#{field | function}` (eg `#{endTime | epoch_micros_to_date_iso}'`). The available formatting functions and a description of their behavior are:
157+
| Function | Description | Example |
158+
| -------- | ----------- | ------- |
159+
| `epoch_micros_to_date_iso` | Format a date in microseconds since epoch to an ISO date time | `#{endTime \| epoch_micros_to_date_iso}` |
160+
149161
## Embedded Mode
150162

151163
Starting with version 1.9, Jaeger UI provides an "embedded" layout mode which is intended to support integrating Jaeger UI into other applications. Currently (as of `v0`), the approach taken is to remove various UI elements from the page to make the UI better suited for space-constrained layouts.

0 commit comments

Comments
 (0)