go.opencensus.iogo.opencensus.io/zpages Index | Files

package zpages

import "go.opencensus.io/zpages"

Package zpages implements a collection of HTML pages that display RPC stats and trace data, and also functions to write that same data in plain text to an io.Writer.

Users can also embed the HTML for stats and traces in custom status pages.

To add the handlers to the default HTTP request multiplexer with the patterns /rpcz and /tracez, call:

zpages.AddDefaultHTTPHandlers()

If your program does not already start an HTTP server, you can use:

go func() { log.Fatal(http.ListenAndServe(":8080", nil)) }()

Index

Constants

const (
	OK code = iota
	CANCELLED
	UNKNOWN
	INVALID_ARGUMENT
	DEADLINE_EXCEEDED
	NOT_FOUND
	ALREADY_EXISTS
	PERMISSION_DENIED
	RESOURCE_EXHAUSTED
	FAILED_PRECONDITION
	ABORTED
	OUT_OF_RANGE
	UNIMPLEMENTED
	INTERNAL
	UNAVAILABLE
	DATA_LOSS
	UNAUTHENTICATED
)

Functions

func AddDefaultHTTPHandlers

func AddDefaultHTTPHandlers()

AddDefaultHTTPHandlers adds handlers for /rpcz and /tracez to the default HTTP request multiplexer.

func RpczHandler

func RpczHandler(w http.ResponseWriter, r *http.Request)

RpczHandler is a handler for /rpcz.

func TracezHandler

func TracezHandler(w http.ResponseWriter, r *http.Request)

TracezHandler is a handler for /tracez.

func WriteHTMLRpczPage

func WriteHTMLRpczPage(w io.Writer)

WriteHTMLRpczPage writes an HTML document to w containing per-method RPC stats.

func WriteHTMLRpczSummary

func WriteHTMLRpczSummary(w io.Writer)

WriteHTMLRpczSummary writes HTML to w containing per-method RPC stats.

It includes neither a header nor footer, so you can embed this data in other pages.

func WriteHTMLTracezPage

func WriteHTMLTracezPage(w io.Writer, spanName string, spanType, spanSubtype int)

WriteHTMLTracezPage writes an HTML document to w containing locally-sampled trace spans.

func WriteHTMLTracezSpans

func WriteHTMLTracezSpans(w io.Writer, spanName string, spanType, spanSubtype int)

WriteHTMLTracezSpans writes HTML to w containing locally-sampled trace spans.

It includes neither a header nor footer, so you can embed this data in other pages.

func WriteHTMLTracezSummary

func WriteHTMLTracezSummary(w io.Writer)

WriteHTMLTracezSummary writes HTML to w containing a summary of locally-sampled trace spans.

It includes neither a header nor footer, so you can embed this data in other pages.

func WriteTextRpczPage

func WriteTextRpczPage(w io.Writer)

WriteTextRpczPage writes formatted text to w containing per-method RPC stats.

func WriteTextTracezSpans

func WriteTextTracezSpans(w io.Writer, spanName string, spanType, spanSubtype int)

WriteTextTracezSpans writes formatted text to w containing locally-sampled trace spans.

func WriteTextTracezSummary

func WriteTextTracezSummary(w io.Writer)

WriteTextTracezSummary writes formatted text to w containing a summary of locally-sampled trace spans.

Source Files

code_string.go codes.go rpcz.go templates.go tracez.go zpages.go

Version
v0.2.0
Published
Jan 30, 2018
Platform
js/wasm
Imports
15 packages
Last checked
1 hour ago

Tools for package owners.