Initial QSfera import
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// Package internal provides non-public types for the zpages package.
|
||||
package internal // import "go.opentelemetry.io/contrib/zpages/internal"
|
||||
|
||||
import "embed"
|
||||
|
||||
// Templates embeds all the HTML templates used used to serve the tracez
|
||||
// endpoint
|
||||
//
|
||||
//go:embed templates/*
|
||||
var Templates embed.FS
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
</body>
|
||||
</html>
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en"><head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{.Title}}</title>
|
||||
<link rel="shortcut icon" href="https://opentelemetry.io/favicons/favicon.ico"/>
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.3.0/material.indigo-pink.min.css">
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/material-design-lite/1.3.0/material.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h1>{{.Title}}</h1>
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
<table style="border-spacing: 0">
|
||||
<tr>
|
||||
<td colspan=1 align=left><b>Span Name</b></td>
|
||||
<td> | </td><td colspan=1 align="center"><b>Running</b></td>
|
||||
<td> | </td>
|
||||
<td colspan=9 align="center"><b>Latency Samples</b></td>
|
||||
<td> | </td>
|
||||
<td colspan=1 align="center"><b>Error Samples</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan=1></td>
|
||||
<td> | </td>
|
||||
<td colspan=1></td>
|
||||
<td> | </td>
|
||||
{{range .LatencyBucketNames}}<th colspan=1 align="center"><b>[{{.}}]</b></th>{{end}}
|
||||
<td> | </td>
|
||||
<td colspan=1></td>
|
||||
</tr>
|
||||
{{$a := .TracesEndpoint}}
|
||||
{{$links := .Links}}
|
||||
{{range $rowindex, $row := .Rows}}
|
||||
{{- $name := .Name}}
|
||||
{{- if even $rowindex}}<tr style="background: #eee">{{else}}<tr>{{end -}}
|
||||
<td>{{.Name}}</td><td> | </td>
|
||||
{{- if $links -}}
|
||||
<td align="center"><a href="{{$a}}?zspanname={{$name}}&ztype=0">{{.Active}}</a></td>
|
||||
{{- else -}}
|
||||
<td>{{.Active}}</td>
|
||||
{{- end -}}
|
||||
<td> | </td>
|
||||
{{- if $links -}}
|
||||
{{range $index, $value := .Latency}}<td align="center"><a href="{{$a}}?zspanname={{$name}}&ztype=1&zlatencybucket={{$index}}">{{$value}}</a></td>{{end}}
|
||||
{{- else -}}
|
||||
{{range .Latency}}<td>{{.}}</td>{{end}}
|
||||
{{- end -}}
|
||||
<td> | </td>
|
||||
{{- if $links -}}
|
||||
<td align="center"><a href="{{$a}}?zspanname={{$name}}&ztype=2&zlatencybucket=0">{{.Errors}}</td>
|
||||
{{- else -}}
|
||||
<td>{{.Errors}}</td>
|
||||
{{- end -}}
|
||||
</tr>
|
||||
{{end}}</table>
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
<p><b>Span Name: {{.Name}} </b></p>
|
||||
<p>{{.Num}} Requests</p>
|
||||
<pre>
|
||||
When Elapsed (sec)
|
||||
----------------------------------------
|
||||
{{range .Rows}}{{printf "%26s" (index .Fields 0)}} {{printf "%12s" (index .Fields 1)}} {{index .Fields 2}}{{.|spanRow}}
|
||||
{{end}}</pre>
|
||||
<br>
|
||||
<p><b style="color:blue;">TraceId</b> means sampled request.
|
||||
<b style="color:black;">TraceId</b> means not sampled request.</p>
|
||||
Reference in New Issue
Block a user