propagation

package
Version: v0.13.8 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2021 License: Apache-2.0 Imports: 8 Imported by: 40

Documentation

Overview

Package propagation implement X-Cloud-Trace-Context header propagation used by Google Cloud products.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HTTPFormat

type HTTPFormat struct{}

HTTPFormat implements propagation.HTTPFormat to propagate traces in HTTP headers for Google Cloud Platform and Stackdriver Trace.

func (*HTTPFormat) SpanContextFromRequest

func (f *HTTPFormat) SpanContextFromRequest(req *http.Request) (sc trace.SpanContext, ok bool)

SpanContextFromRequest extracts a Stackdriver Trace span context from incoming requests.

func (*HTTPFormat) SpanContextToRequest

func (f *HTTPFormat) SpanContextToRequest(sc trace.SpanContext, req *http.Request)

SpanContextToRequest modifies the given request to include a Stackdriver Trace header.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto