gocloud.devgocloud.dev/server/xrayserver Index | Files

package xrayserver

import "gocloud.dev/server/xrayserver"

Package xrayserver provides the diagnostic hooks for a server using AWS X-Ray.

Index

Variables

var ServiceSet = wire.NewSet(
	NewXRayClient,
	wire.Bind(new(xrayiface.XRayAPI), new(*xray.XRay)),
)

ServiceSet is a Wire provider set that provides the AWS X-Ray service client given an AWS session.

var Set = wire.NewSet(
	server.Set,
	ServiceSet,
	NewExporter,
	wire.Bind(new(trace.Exporter), new(*exporter.Exporter)),
	NewRequestLogger,
	wire.Bind(new(requestlog.Logger), new(*requestlog.NCSALogger)),
)

Set is a Wire provider set that provides the diagnostic hooks for *server.Server. This set includes ServiceSet.

Functions

func NewExporter

func NewExporter(api xrayiface.XRayAPI) (*exporter.Exporter, func(), error)

NewExporter returns a new X-Ray exporter.

The second return value is a Wire cleanup function that calls Close on the exporter, ignoring the error.

func NewRequestLogger

func NewRequestLogger() *requestlog.NCSALogger

NewRequestLogger returns a request logger that sends entries to stdout.

func NewXRayClient

func NewXRayClient(p client.ConfigProvider) *xray.XRay

NewXRayClient returns a new AWS X-Ray client.

Source Files

server.go

Version
v0.23.0
Published
May 15, 2021
Platform
js/wasm
Imports
10 packages
Last checked
2 hours ago

Tools for package owners.