Movatterモバイル変換


[0]ホーム

URL:


Alert GO-2024-3228: Coder vulnerable to post-auth URL redirection to untrusted site ('Open Redirect') in github.com/coder/coder
Notice  The highest tagged major version isv2.

tracing

package
v0.27.3Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2023 License:AGPL-3.0Imports:30Imported by:0

Details

Repository

github.com/coder/coder

Links

Documentation

Index

Constants

View Source
const TracerName = "coderd"

Variables

Functions

funcCoderExporteradded inv0.9.0

func CoderExporter(ctxcontext.Context) (*otlptrace.Exporter,error)

funcDefaultExporteradded inv0.9.0

func DefaultExporter(ctxcontext.Context) (*otlptrace.Exporter,error)

funcEndHTTPSpanadded inv0.8.7

func EndHTTPSpan(r *http.Request, statusint, spantrace.Span)

EndHTTPSpan captures request and response data after the handler is done.

funcFuncNameadded inv0.9.0

func FuncName()string

funcFuncNameSkipadded inv0.9.0

func FuncNameSkip(skipint)string

funcGetTracerNameadded inv0.12.6

func GetTracerName(ctxcontext.Context)string

GetTracerName returns the tracer name from the context, or TracerName if noneis set.

funcHoneycombExporteradded inv0.12.0

func HoneycombExporter(ctxcontext.Context, apiKeystring) (*otlptrace.Exporter,error)

funcMetadataFromContextadded inv0.23.2

func MetadataFromContext(ctxcontext.Context) map[string]string

funcMetadataToContextadded inv0.23.2

func MetadataToContext(ctxcontext.Context, metadata map[string]string)context.Context

funcMiddlewareadded inv0.9.0

func Middleware(tracerProvidertrace.TracerProvider) func(http.Handler)http.Handler

Middleware adds tracing to http routes.

funcPostgresDriver

func PostgresDriver(tptrace.TracerProvider, servicestring) (string,error)

Postgres driver will register a new tracing sql driver and return the driver name.

funcRunWithoutSpanadded inv0.13.0

func RunWithoutSpan(ctxcontext.Context, fn func(ctxcontext.Context))

RunWithoutSpan runs the given function with the span stripped from thecontext and replaced with a no-op span. This is useful for avoiding logsbeing added to span (to save money).

funcSetTracerNameadded inv0.12.6

func SetTracerName(ctxcontext.Context, tracerNamestring)context.Context

SetTracerName sets the tracer name that will be used by all spans createdfrom the context.

funcStartSpanadded inv0.9.0

StartSpan calls StartSpanWithName with the name set to the caller's functionname.

funcStartSpanWithNameadded inv0.12.6

func StartSpanWithName(ctxcontext.Context, namestring, opts ...trace.SpanStartOption) (context.Context,trace.Span)

StartSpanWithName starts a new span with the given name from the context. Ifa tracer name was set on the context (or one of its parents), it will be usedas the tracer name instead of the default TracerName.

funcStatusWriterMiddlewareadded inv0.13.0

func StatusWriterMiddleware(nexthttp.Handler)http.Handler

funcTracerProvider

func TracerProvider(ctxcontext.Context, servicestring, optsTracerOpts) (*sdktrace.TracerProvider, func(context.Context)error,error)

TracerProvider creates a grpc otlp exporter and configures a trace provider.Caller is responsible for calling TracerProvider.Shutdown to ensure all data is flushed.

Types

typeDRPCConnadded inv0.23.2

type DRPCConn struct {drpc.Conn}

func (*DRPCConn)Invokeadded inv0.23.2

func (c *DRPCConn) Invoke(ctxcontext.Context, rpcstring, encdrpc.Encoding, indrpc.Message, outdrpc.Message) (errerror)

Invoke implements drpc.Conn's Invoke method with tracing information injected into the context.

func (*DRPCConn)NewStreamadded inv0.23.2

func (c *DRPCConn) NewStream(ctxcontext.Context, rpcstring, encdrpc.Encoding) (_drpc.Stream, errerror)

NewStream implements drpc.Conn's NewStream method with tracing information injected into the context.

typeDRPCHandleradded inv0.23.2

type DRPCHandler struct {Handlerdrpc.Handler}

func (*DRPCHandler)HandleRPCadded inv0.23.2

func (t *DRPCHandler) HandleRPC(streamdrpc.Stream, rpcstring)error

typeSlogSinkadded inv0.12.6

type SlogSink struct{}

func (SlogSink)LogEntryadded inv0.12.6

func (SlogSink) LogEntry(ctxcontext.Context, eslog.SinkEntry)

LogEntry implements slog.Sink. All entries are added as events to the spanin the context. If no span is present, the entry is dropped.

func (SlogSink)Syncadded inv0.12.6

func (SlogSink) Sync()

Sync implements slog.Sink. No-op as syncing is handled externally by otel.

typeStatusWriteradded inv0.9.0

type StatusWriter struct {http.ResponseWriterStatusintHijackedbool// contains filtered or unexported fields}

StatusWriter intercepts the status of the request and the response body upto maxBodySize if Status >= 400. It is guaranteed to be the ResponseWriterdirectly downstream from Middleware.

func (*StatusWriter)Flushadded inv0.9.0

func (w *StatusWriter) Flush()

func (*StatusWriter)Hijackadded inv0.9.0

func (w *StatusWriter) Hijack() (net.Conn, *bufio.ReadWriter,error)

func (*StatusWriter)ResponseBodyadded inv0.9.0

func (w *StatusWriter) ResponseBody() []byte

func (*StatusWriter)Writeadded inv0.9.0

func (w *StatusWriter) Write(b []byte) (int,error)

func (*StatusWriter)WriteHeaderadded inv0.9.0

func (w *StatusWriter) WriteHeader(statusint)

typeTracerOptsadded inv0.9.0

type TracerOpts struct {// Default exports to a backend configured by environment variables. See://https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.mdDefaultbool// Coder exports traces to Coder's public tracing ingest service and is used// to improve the product. It is disabled when opting out of telemetry.Coderbool// Exports traces to Honeycomb.io with the provided API key.Honeycombstring}

TracerOpts specifies which telemetry exporters should be configured.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp