xray

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package xray provides the client and types for making API requests to AWS X-Ray.

AWS X-Ray provides APIs for managing debug traces and retrieving service maps and other data created by processing those traces.

See https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12 for more information on this service.

See xray package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/xray/

Using the Client

To AWS X-Ray with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the AWS X-Ray client XRay for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/xray/#New

Index

Constants

View Source
const (

	// ErrCodeInvalidRequestException for service response error code
	// "InvalidRequestException".
	//
	// The request is missing required parameters or has invalid parameters.
	ErrCodeInvalidRequestException = "InvalidRequestException"

	// ErrCodeThrottledException for service response error code
	// "ThrottledException".
	//
	// The request exceeds the maximum number of requests per second.
	ErrCodeThrottledException = "ThrottledException"
)
View Source
const (
	ServiceName = "xray"      // Service endpoint prefix API calls made to.
	EndpointsID = ServiceName // Service ID for Regions and Endpoints metadata.
)

Service information constants

Variables

This section is empty.

Functions

This section is empty.

Types

type Alias

type Alias struct {

	// The canonical name of the alias.
	Name *string `type:"string"`

	// A list of names for the alias, including the canonical name.
	Names []string `type:"list"`

	// The type of the alias.
	Type *string `type:"string"`
	// contains filtered or unexported fields
}

An alias for an edge. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Alias

func (Alias) GoString

func (s Alias) GoString() string

GoString returns the string representation

func (Alias) MarshalFields added in v0.3.0

func (s Alias) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Alias) String

func (s Alias) String() string

String returns the string representation

type AnnotationValue

type AnnotationValue struct {

	// Value for a Boolean annotation.
	BooleanValue *bool `type:"boolean"`

	// Value for a Number annotation.
	NumberValue *float64 `type:"double"`

	// Value for a String annotation.
	StringValue *string `type:"string"`
	// contains filtered or unexported fields
}

Value of a segment annotation. Has one of three value types: Number, Boolean or String. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/AnnotationValue

func (AnnotationValue) GoString

func (s AnnotationValue) GoString() string

GoString returns the string representation

func (AnnotationValue) MarshalFields added in v0.3.0

func (s AnnotationValue) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (AnnotationValue) String

func (s AnnotationValue) String() string

String returns the string representation

type BackendConnectionErrors

type BackendConnectionErrors struct {
	ConnectionRefusedCount *int64 `type:"integer"`

	HTTPCode4XXCount *int64 `type:"integer"`

	HTTPCode5XXCount *int64 `type:"integer"`

	OtherCount *int64 `type:"integer"`

	TimeoutCount *int64 `type:"integer"`

	UnknownHostCount *int64 `type:"integer"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/BackendConnectionErrors

func (BackendConnectionErrors) GoString

func (s BackendConnectionErrors) GoString() string

GoString returns the string representation

func (BackendConnectionErrors) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (BackendConnectionErrors) String

func (s BackendConnectionErrors) String() string

String returns the string representation

type BatchGetTracesInput

type BatchGetTracesInput struct {

	// Pagination token. Not used.
	NextToken *string `type:"string"`

	// Specify the trace IDs of requests for which to retrieve segments.
	//
	// TraceIds is a required field
	TraceIds []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/BatchGetTracesRequest

func (BatchGetTracesInput) GoString

func (s BatchGetTracesInput) GoString() string

GoString returns the string representation

func (BatchGetTracesInput) MarshalFields added in v0.3.0

func (s BatchGetTracesInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (BatchGetTracesInput) String

func (s BatchGetTracesInput) String() string

String returns the string representation

func (*BatchGetTracesInput) Validate

func (s *BatchGetTracesInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type BatchGetTracesOutput

type BatchGetTracesOutput struct {

	// Pagination token. Not used.
	NextToken *string `type:"string"`

	// Full traces for the specified requests.
	Traces []Trace `type:"list"`

	// Trace IDs of requests that haven't been processed.
	UnprocessedTraceIds []string `type:"list"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/BatchGetTracesResult

func (BatchGetTracesOutput) GoString

func (s BatchGetTracesOutput) GoString() string

GoString returns the string representation

func (BatchGetTracesOutput) MarshalFields added in v0.3.0

func (s BatchGetTracesOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (BatchGetTracesOutput) SDKResponseMetadata

func (s BatchGetTracesOutput) SDKResponseMetadata() aws.Response

SDKResponseMetdata return sthe response metadata for the API.

func (BatchGetTracesOutput) String

func (s BatchGetTracesOutput) String() string

String returns the string representation

type BatchGetTracesPager added in v0.3.0

type BatchGetTracesPager struct {
	aws.Pager
}

BatchGetTracesPager is used to paginate the request. This can be done by calling Next and CurrentPage.

func (*BatchGetTracesPager) CurrentPage added in v0.3.0

func (p *BatchGetTracesPager) CurrentPage() *BatchGetTracesOutput

type BatchGetTracesRequest

type BatchGetTracesRequest struct {
	*aws.Request
	Input *BatchGetTracesInput
	Copy  func(*BatchGetTracesInput) BatchGetTracesRequest
}

BatchGetTracesRequest is a API request type for the BatchGetTraces API operation.

func (*BatchGetTracesRequest) Paginate added in v0.3.0

func (p *BatchGetTracesRequest) Paginate(opts ...aws.Option) BatchGetTracesPager

Paginate pages iterates over the pages of a BatchGetTracesRequest operation, calling the Next method for each page. Using the paginators Next method will depict whether or not there are more pages.

Note: This operation can generate multiple requests to a service.

   // Example iterating over at most 3 pages of a BatchGetTraces operation.
		req := client.BatchGetTracesRequest(input)
		p := req.Paginate()
		for p.Next() {
			page := p.CurrentPage()
		}

		if err := p.Err(); err != nil {
			return err
		}

func (BatchGetTracesRequest) Send

Send marshals and sends the BatchGetTraces API request.

type Edge

type Edge struct {

	// Aliases for the edge.
	Aliases []Alias `type:"list"`

	// The end time of the last segment on the edge.
	EndTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// Identifier of the edge. Unique within a service map.
	ReferenceId *int64 `type:"integer"`

	// A histogram that maps the spread of client response times on an edge.
	ResponseTimeHistogram []HistogramEntry `type:"list"`

	// The start time of the first segment on the edge.
	StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// Response statistics for segments on the edge.
	SummaryStatistics *EdgeStatistics `type:"structure"`
	// contains filtered or unexported fields
}

Information about a connection between two services. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Edge

func (Edge) GoString

func (s Edge) GoString() string

GoString returns the string representation

func (Edge) MarshalFields added in v0.3.0

func (s Edge) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Edge) String

func (s Edge) String() string

String returns the string representation

type EdgeStatistics

type EdgeStatistics struct {

	// Information about requests that failed with a 4xx Client Error status code.
	ErrorStatistics *ErrorStatistics `type:"structure"`

	// Information about requests that failed with a 5xx Server Error status code.
	FaultStatistics *FaultStatistics `type:"structure"`

	// The number of requests that completed with a 2xx Success status code.
	OkCount *int64 `type:"long"`

	// The total number of completed requests.
	TotalCount *int64 `type:"long"`

	// The aggregate response time of completed requests.
	TotalResponseTime *float64 `type:"double"`
	// contains filtered or unexported fields
}

Response statistics for an edge. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/EdgeStatistics

func (EdgeStatistics) GoString

func (s EdgeStatistics) GoString() string

GoString returns the string representation

func (EdgeStatistics) MarshalFields added in v0.3.0

func (s EdgeStatistics) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (EdgeStatistics) String

func (s EdgeStatistics) String() string

String returns the string representation

type ErrorStatistics

type ErrorStatistics struct {

	// The number of requests that failed with untracked 4xx Client Error status
	// codes.
	OtherCount *int64 `type:"long"`

	// The number of requests that failed with a 419 throttling status code.
	ThrottleCount *int64 `type:"long"`

	// The total number of requests that failed with a 4xx Client Error status code.
	TotalCount *int64 `type:"long"`
	// contains filtered or unexported fields
}

Information about requests that failed with a 4xx Client Error status code. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/ErrorStatistics

func (ErrorStatistics) GoString

func (s ErrorStatistics) GoString() string

GoString returns the string representation

func (ErrorStatistics) MarshalFields added in v0.3.0

func (s ErrorStatistics) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ErrorStatistics) String

func (s ErrorStatistics) String() string

String returns the string representation

type FaultStatistics

type FaultStatistics struct {

	// The number of requests that failed with untracked 5xx Server Error status
	// codes.
	OtherCount *int64 `type:"long"`

	// The total number of requests that failed with a 5xx Server Error status code.
	TotalCount *int64 `type:"long"`
	// contains filtered or unexported fields
}

Information about requests that failed with a 5xx Server Error status code. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/FaultStatistics

func (FaultStatistics) GoString

func (s FaultStatistics) GoString() string

GoString returns the string representation

func (FaultStatistics) MarshalFields added in v0.3.0

func (s FaultStatistics) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (FaultStatistics) String

func (s FaultStatistics) String() string

String returns the string representation

type GetServiceGraphInput

type GetServiceGraphInput struct {

	// The end of the time frame for which to generate a graph.
	//
	// EndTime is a required field
	EndTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`

	// Pagination token. Not used.
	NextToken *string `type:"string"`

	// The start of the time frame for which to generate a graph.
	//
	// StartTime is a required field
	StartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetServiceGraphRequest

func (GetServiceGraphInput) GoString

func (s GetServiceGraphInput) GoString() string

GoString returns the string representation

func (GetServiceGraphInput) MarshalFields added in v0.3.0

func (s GetServiceGraphInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (GetServiceGraphInput) String

func (s GetServiceGraphInput) String() string

String returns the string representation

func (*GetServiceGraphInput) Validate

func (s *GetServiceGraphInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetServiceGraphOutput

type GetServiceGraphOutput struct {

	// The end of the time frame for which the graph was generated.
	EndTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// Pagination token. Not used.
	NextToken *string `type:"string"`

	// The services that have processed a traced request during the specified time
	// frame.
	Services []Service `type:"list"`

	// The start of the time frame for which the graph was generated.
	StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetServiceGraphResult

func (GetServiceGraphOutput) GoString

func (s GetServiceGraphOutput) GoString() string

GoString returns the string representation

func (GetServiceGraphOutput) MarshalFields added in v0.3.0

func (s GetServiceGraphOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (GetServiceGraphOutput) SDKResponseMetadata

func (s GetServiceGraphOutput) SDKResponseMetadata() aws.Response

SDKResponseMetdata return sthe response metadata for the API.

func (GetServiceGraphOutput) String

func (s GetServiceGraphOutput) String() string

String returns the string representation

type GetServiceGraphPager added in v0.3.0

type GetServiceGraphPager struct {
	aws.Pager
}

GetServiceGraphPager is used to paginate the request. This can be done by calling Next and CurrentPage.

func (*GetServiceGraphPager) CurrentPage added in v0.3.0

func (p *GetServiceGraphPager) CurrentPage() *GetServiceGraphOutput

type GetServiceGraphRequest

type GetServiceGraphRequest struct {
	*aws.Request
	Input *GetServiceGraphInput
	Copy  func(*GetServiceGraphInput) GetServiceGraphRequest
}

GetServiceGraphRequest is a API request type for the GetServiceGraph API operation.

func (*GetServiceGraphRequest) Paginate added in v0.3.0

Paginate pages iterates over the pages of a GetServiceGraphRequest operation, calling the Next method for each page. Using the paginators Next method will depict whether or not there are more pages.

Note: This operation can generate multiple requests to a service.

   // Example iterating over at most 3 pages of a GetServiceGraph operation.
		req := client.GetServiceGraphRequest(input)
		p := req.Paginate()
		for p.Next() {
			page := p.CurrentPage()
		}

		if err := p.Err(); err != nil {
			return err
		}

func (GetServiceGraphRequest) Send

Send marshals and sends the GetServiceGraph API request.

type GetTraceGraphInput

type GetTraceGraphInput struct {

	// Pagination token. Not used.
	NextToken *string `type:"string"`

	// Trace IDs of requests for which to generate a service graph.
	//
	// TraceIds is a required field
	TraceIds []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceGraphRequest

func (GetTraceGraphInput) GoString

func (s GetTraceGraphInput) GoString() string

GoString returns the string representation

func (GetTraceGraphInput) MarshalFields added in v0.3.0

func (s GetTraceGraphInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (GetTraceGraphInput) String

func (s GetTraceGraphInput) String() string

String returns the string representation

func (*GetTraceGraphInput) Validate

func (s *GetTraceGraphInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetTraceGraphOutput

type GetTraceGraphOutput struct {

	// Pagination token. Not used.
	NextToken *string `type:"string"`

	// The services that have processed one of the specified requests.
	Services []Service `type:"list"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceGraphResult

func (GetTraceGraphOutput) GoString

func (s GetTraceGraphOutput) GoString() string

GoString returns the string representation

func (GetTraceGraphOutput) MarshalFields added in v0.3.0

func (s GetTraceGraphOutput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (GetTraceGraphOutput) SDKResponseMetadata

func (s GetTraceGraphOutput) SDKResponseMetadata() aws.Response

SDKResponseMetdata return sthe response metadata for the API.

func (GetTraceGraphOutput) String

func (s GetTraceGraphOutput) String() string

String returns the string representation

type GetTraceGraphPager added in v0.3.0

type GetTraceGraphPager struct {
	aws.Pager
}

GetTraceGraphPager is used to paginate the request. This can be done by calling Next and CurrentPage.

func (*GetTraceGraphPager) CurrentPage added in v0.3.0

func (p *GetTraceGraphPager) CurrentPage() *GetTraceGraphOutput

type GetTraceGraphRequest

type GetTraceGraphRequest struct {
	*aws.Request
	Input *GetTraceGraphInput
	Copy  func(*GetTraceGraphInput) GetTraceGraphRequest
}

GetTraceGraphRequest is a API request type for the GetTraceGraph API operation.

func (*GetTraceGraphRequest) Paginate added in v0.3.0

func (p *GetTraceGraphRequest) Paginate(opts ...aws.Option) GetTraceGraphPager

Paginate pages iterates over the pages of a GetTraceGraphRequest operation, calling the Next method for each page. Using the paginators Next method will depict whether or not there are more pages.

Note: This operation can generate multiple requests to a service.

   // Example iterating over at most 3 pages of a GetTraceGraph operation.
		req := client.GetTraceGraphRequest(input)
		p := req.Paginate()
		for p.Next() {
			page := p.CurrentPage()
		}

		if err := p.Err(); err != nil {
			return err
		}

func (GetTraceGraphRequest) Send

Send marshals and sends the GetTraceGraph API request.

type GetTraceSummariesInput

type GetTraceSummariesInput struct {

	// The end of the time frame for which to retrieve traces.
	//
	// EndTime is a required field
	EndTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`

	// Specify a filter expression to retrieve trace summaries for services or requests
	// that meet certain requirements.
	FilterExpression *string `min:"1" type:"string"`

	// Specify the pagination token returned by a previous request to retrieve the
	// next page of results.
	NextToken *string `type:"string"`

	// Set to true to get summaries for only a subset of available traces.
	Sampling *bool `type:"boolean"`

	// The start of the time frame for which to retrieve traces.
	//
	// StartTime is a required field
	StartTime *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceSummariesRequest

func (GetTraceSummariesInput) GoString

func (s GetTraceSummariesInput) GoString() string

GoString returns the string representation

func (GetTraceSummariesInput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (GetTraceSummariesInput) String

func (s GetTraceSummariesInput) String() string

String returns the string representation

func (*GetTraceSummariesInput) Validate

func (s *GetTraceSummariesInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetTraceSummariesOutput

type GetTraceSummariesOutput struct {

	// The start time of this page of results.
	ApproximateTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// If the requested time frame contained more than one page of results, you
	// can use this token to retrieve the next page. The first page contains the
	// most most recent results, closest to the end of the time frame.
	NextToken *string `type:"string"`

	// Trace IDs and metadata for traces that were found in the specified time frame.
	TraceSummaries []TraceSummary `type:"list"`

	// The number of traces that were processed to get this set of summaries.
	TracesProcessedCount *int64 `type:"long"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceSummariesResult

func (GetTraceSummariesOutput) GoString

func (s GetTraceSummariesOutput) GoString() string

GoString returns the string representation

func (GetTraceSummariesOutput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (GetTraceSummariesOutput) SDKResponseMetadata

func (s GetTraceSummariesOutput) SDKResponseMetadata() aws.Response

SDKResponseMetdata return sthe response metadata for the API.

func (GetTraceSummariesOutput) String

func (s GetTraceSummariesOutput) String() string

String returns the string representation

type GetTraceSummariesPager added in v0.3.0

type GetTraceSummariesPager struct {
	aws.Pager
}

GetTraceSummariesPager is used to paginate the request. This can be done by calling Next and CurrentPage.

func (*GetTraceSummariesPager) CurrentPage added in v0.3.0

type GetTraceSummariesRequest

type GetTraceSummariesRequest struct {
	*aws.Request
	Input *GetTraceSummariesInput
	Copy  func(*GetTraceSummariesInput) GetTraceSummariesRequest
}

GetTraceSummariesRequest is a API request type for the GetTraceSummaries API operation.

func (*GetTraceSummariesRequest) Paginate added in v0.3.0

Paginate pages iterates over the pages of a GetTraceSummariesRequest operation, calling the Next method for each page. Using the paginators Next method will depict whether or not there are more pages.

Note: This operation can generate multiple requests to a service.

   // Example iterating over at most 3 pages of a GetTraceSummaries operation.
		req := client.GetTraceSummariesRequest(input)
		p := req.Paginate()
		for p.Next() {
			page := p.CurrentPage()
		}

		if err := p.Err(); err != nil {
			return err
		}

func (GetTraceSummariesRequest) Send

Send marshals and sends the GetTraceSummaries API request.

type HistogramEntry

type HistogramEntry struct {

	// The prevalence of the entry.
	Count *int64 `type:"integer"`

	// The value of the entry.
	Value *float64 `type:"double"`
	// contains filtered or unexported fields
}

An entry in a histogram for a statistic. A histogram maps the range of observed values on the X axis, and the prevalence of each value on the Y axis. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/HistogramEntry

func (HistogramEntry) GoString

func (s HistogramEntry) GoString() string

GoString returns the string representation

func (HistogramEntry) MarshalFields added in v0.3.0

func (s HistogramEntry) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (HistogramEntry) String

func (s HistogramEntry) String() string

String returns the string representation

type Http

type Http struct {

	// The IP address of the requestor.
	ClientIp *string `type:"string"`

	// The request method.
	HttpMethod *string `type:"string"`

	// The response status.
	HttpStatus *int64 `type:"integer"`

	// The request URL.
	HttpURL *string `type:"string"`

	// The request's user agent string.
	UserAgent *string `type:"string"`
	// contains filtered or unexported fields
}

Information about an HTTP request. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Http

func (Http) GoString

func (s Http) GoString() string

GoString returns the string representation

func (Http) MarshalFields added in v0.3.0

func (s Http) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Http) String

func (s Http) String() string

String returns the string representation

type PutTelemetryRecordsInput

type PutTelemetryRecordsInput struct {
	EC2InstanceId *string `type:"string"`

	Hostname *string `type:"string"`

	ResourceARN *string `type:"string"`

	// TelemetryRecords is a required field
	TelemetryRecords []TelemetryRecord `type:"list" required:"true"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTelemetryRecordsRequest

func (PutTelemetryRecordsInput) GoString

func (s PutTelemetryRecordsInput) GoString() string

GoString returns the string representation

func (PutTelemetryRecordsInput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (PutTelemetryRecordsInput) String

func (s PutTelemetryRecordsInput) String() string

String returns the string representation

func (*PutTelemetryRecordsInput) Validate

func (s *PutTelemetryRecordsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutTelemetryRecordsOutput

type PutTelemetryRecordsOutput struct {
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTelemetryRecordsResult

func (PutTelemetryRecordsOutput) GoString

func (s PutTelemetryRecordsOutput) GoString() string

GoString returns the string representation

func (PutTelemetryRecordsOutput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (PutTelemetryRecordsOutput) SDKResponseMetadata

func (s PutTelemetryRecordsOutput) SDKResponseMetadata() aws.Response

SDKResponseMetdata return sthe response metadata for the API.

func (PutTelemetryRecordsOutput) String

func (s PutTelemetryRecordsOutput) String() string

String returns the string representation

type PutTelemetryRecordsRequest

type PutTelemetryRecordsRequest struct {
	*aws.Request
	Input *PutTelemetryRecordsInput
	Copy  func(*PutTelemetryRecordsInput) PutTelemetryRecordsRequest
}

PutTelemetryRecordsRequest is a API request type for the PutTelemetryRecords API operation.

func (PutTelemetryRecordsRequest) Send

Send marshals and sends the PutTelemetryRecords API request.

type PutTraceSegmentsInput

type PutTraceSegmentsInput struct {

	// A string containing a JSON document defining one or more segments or subsegments.
	//
	// TraceSegmentDocuments is a required field
	TraceSegmentDocuments []string `type:"list" required:"true"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTraceSegmentsRequest

func (PutTraceSegmentsInput) GoString

func (s PutTraceSegmentsInput) GoString() string

GoString returns the string representation

func (PutTraceSegmentsInput) MarshalFields added in v0.3.0

func (s PutTraceSegmentsInput) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (PutTraceSegmentsInput) String

func (s PutTraceSegmentsInput) String() string

String returns the string representation

func (*PutTraceSegmentsInput) Validate

func (s *PutTraceSegmentsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type PutTraceSegmentsOutput

type PutTraceSegmentsOutput struct {

	// Segments that failed processing.
	UnprocessedTraceSegments []UnprocessedTraceSegment `type:"list"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTraceSegmentsResult

func (PutTraceSegmentsOutput) GoString

func (s PutTraceSegmentsOutput) GoString() string

GoString returns the string representation

func (PutTraceSegmentsOutput) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (PutTraceSegmentsOutput) SDKResponseMetadata

func (s PutTraceSegmentsOutput) SDKResponseMetadata() aws.Response

SDKResponseMetdata return sthe response metadata for the API.

func (PutTraceSegmentsOutput) String

func (s PutTraceSegmentsOutput) String() string

String returns the string representation

type PutTraceSegmentsRequest

type PutTraceSegmentsRequest struct {
	*aws.Request
	Input *PutTraceSegmentsInput
	Copy  func(*PutTraceSegmentsInput) PutTraceSegmentsRequest
}

PutTraceSegmentsRequest is a API request type for the PutTraceSegments API operation.

func (PutTraceSegmentsRequest) Send

Send marshals and sends the PutTraceSegments API request.

type Segment

type Segment struct {

	// The segment document
	Document *string `min:"1" type:"string"`

	// The segment's ID.
	Id *string `type:"string"`
	// contains filtered or unexported fields
}

A segment from a trace that has been ingested by the X-Ray service. The segment can be compiled from documents uploaded with PutTraceSegments, or an inferred segment for a downstream service, generated from a subsegment sent by the service that called it. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Segment

func (Segment) GoString

func (s Segment) GoString() string

GoString returns the string representation

func (Segment) MarshalFields added in v0.3.0

func (s Segment) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Segment) String

func (s Segment) String() string

String returns the string representation

type Service

type Service struct {

	// Identifier of the AWS account in which the service runs.
	AccountId *string `type:"string"`

	// A histogram that maps the spread of service durations.
	DurationHistogram []HistogramEntry `type:"list"`

	// Connections to downstream services.
	Edges []Edge `type:"list"`

	// The end time of the last segment that the service generated.
	EndTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// The canonical name of the service.
	Name *string `type:"string"`

	// A list of names for the service, including the canonical name.
	Names []string `type:"list"`

	// Identifier for the service. Unique within the service map.
	ReferenceId *int64 `type:"integer"`

	// A histogram that maps the spread of service response times.
	ResponseTimeHistogram []HistogramEntry `type:"list"`

	// Indicates that the service was the first service to process a request.
	Root *bool `type:"boolean"`

	// The start time of the first segment that the service generated.
	StartTime *time.Time `type:"timestamp" timestampFormat:"unix"`

	// The service's state.
	State *string `type:"string"`

	// Aggregated statistics for the service.
	SummaryStatistics *ServiceStatistics `type:"structure"`

	// The type of service.
	//
	//    * AWS Resource - The type of an AWS resource. For example, AWS::EC2::Instance
	//    for a application running on Amazon EC2 or AWS::DynamoDB::Table for an
	//    Amazon DynamoDB table that the application used.
	//
	//    * AWS Service - The type of an AWS service. For example, AWS::DynamoDB
	//    for downstream calls to Amazon DynamoDB that didn't target a specific
	//    table.
	//
	//    * client - Represents the clients that sent requests to a root service.
	//
	//    * remote - A downstream service of indeterminate type.
	Type *string `type:"string"`
	// contains filtered or unexported fields
}

Information about an application that processed requests, users that made requests, or downstream services, resources and applications that an application used. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Service

func (Service) GoString

func (s Service) GoString() string

GoString returns the string representation

func (Service) MarshalFields added in v0.3.0

func (s Service) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Service) String

func (s Service) String() string

String returns the string representation

type ServiceId

type ServiceId struct {
	AccountId *string `type:"string"`

	Name *string `type:"string"`

	Names []string `type:"list"`

	Type *string `type:"string"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/ServiceId

func (ServiceId) GoString

func (s ServiceId) GoString() string

GoString returns the string representation

func (ServiceId) MarshalFields added in v0.3.0

func (s ServiceId) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ServiceId) String

func (s ServiceId) String() string

String returns the string representation

type ServiceStatistics

type ServiceStatistics struct {

	// Information about requests that failed with a 4xx Client Error status code.
	ErrorStatistics *ErrorStatistics `type:"structure"`

	// Information about requests that failed with a 5xx Server Error status code.
	FaultStatistics *FaultStatistics `type:"structure"`

	// The number of requests that completed with a 2xx Success status code.
	OkCount *int64 `type:"long"`

	// The total number of completed requests.
	TotalCount *int64 `type:"long"`

	// The aggregate response time of completed requests.
	TotalResponseTime *float64 `type:"double"`
	// contains filtered or unexported fields
}

Response statistics for a service. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/ServiceStatistics

func (ServiceStatistics) GoString

func (s ServiceStatistics) GoString() string

GoString returns the string representation

func (ServiceStatistics) MarshalFields added in v0.3.0

func (s ServiceStatistics) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ServiceStatistics) String

func (s ServiceStatistics) String() string

String returns the string representation

type TelemetryRecord

type TelemetryRecord struct {
	BackendConnectionErrors *BackendConnectionErrors `type:"structure"`

	SegmentsReceivedCount *int64 `type:"integer"`

	SegmentsRejectedCount *int64 `type:"integer"`

	SegmentsSentCount *int64 `type:"integer"`

	SegmentsSpilloverCount *int64 `type:"integer"`

	// Timestamp is a required field
	Timestamp *time.Time `type:"timestamp" timestampFormat:"unix" required:"true"`
	// contains filtered or unexported fields
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/TelemetryRecord

func (TelemetryRecord) GoString

func (s TelemetryRecord) GoString() string

GoString returns the string representation

func (TelemetryRecord) MarshalFields added in v0.3.0

func (s TelemetryRecord) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (TelemetryRecord) String

func (s TelemetryRecord) String() string

String returns the string representation

func (*TelemetryRecord) Validate added in v0.2.0

func (s *TelemetryRecord) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type Trace

type Trace struct {

	// The length of time in seconds between the start time of the root segment
	// and the end time of the last segment that completed.
	Duration *float64 `type:"double"`

	// The unique identifier for the request that generated the trace's segments
	// and subsegments.
	Id *string `min:"1" type:"string"`

	// Segment documents for the segments and subsegments that comprise the trace.
	Segments []Segment `type:"list"`
	// contains filtered or unexported fields
}

A collection of segment documents with matching trace IDs. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/Trace

func (Trace) GoString

func (s Trace) GoString() string

GoString returns the string representation

func (Trace) MarshalFields added in v0.3.0

func (s Trace) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (Trace) String

func (s Trace) String() string

String returns the string representation

type TraceSummary

type TraceSummary struct {

	// Annotations from the trace's segment documents.
	Annotations map[string][]ValueWithServiceIds `type:"map"`

	// The length of time in seconds between the start time of the root segment
	// and the end time of the last segment that completed.
	Duration *float64 `type:"double"`

	// One or more of the segment documents has a 400 series error.
	HasError *bool `type:"boolean"`

	// One or more of the segment documents has a 500 series error.
	HasFault *bool `type:"boolean"`

	// One or more of the segment documents has a 429 throttling error.
	HasThrottle *bool `type:"boolean"`

	// Information about the HTTP request served by the trace.
	Http *Http `type:"structure"`

	// The unique identifier for the request that generated the trace's segments
	// and subsegments.
	Id *string `min:"1" type:"string"`

	// One or more of the segment documents is in progress.
	IsPartial *bool `type:"boolean"`

	// The length of time in seconds between the start and end times of the root
	// segment. If the service performs work asynchronously, the response time measures
	// the time before the response is sent to the user, while the duration measures
	// the amount of time before the last traced activity completes.
	ResponseTime *float64 `type:"double"`

	// Service IDs from the trace's segment documents.
	ServiceIds []ServiceId `type:"list"`

	// Users from the trace's segment documents.
	Users []TraceUser `type:"list"`
	// contains filtered or unexported fields
}

Metadata generated from the segment documents in a trace. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/TraceSummary

func (TraceSummary) GoString

func (s TraceSummary) GoString() string

GoString returns the string representation

func (TraceSummary) MarshalFields added in v0.3.0

func (s TraceSummary) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (TraceSummary) String

func (s TraceSummary) String() string

String returns the string representation

type TraceUser

type TraceUser struct {

	// Services that the user's request hit.
	ServiceIds []ServiceId `type:"list"`

	// The user's name.
	UserName *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a user recorded in segment documents. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/TraceUser

func (TraceUser) GoString

func (s TraceUser) GoString() string

GoString returns the string representation

func (TraceUser) MarshalFields added in v0.3.0

func (s TraceUser) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (TraceUser) String

func (s TraceUser) String() string

String returns the string representation

type UnprocessedTraceSegment

type UnprocessedTraceSegment struct {

	// The error that caused processing to fail.
	ErrorCode *string `type:"string"`

	// The segment's ID.
	Id *string `type:"string"`

	// The error message.
	Message *string `type:"string"`
	// contains filtered or unexported fields
}

Information about a segment that failed processing. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/UnprocessedTraceSegment

func (UnprocessedTraceSegment) GoString

func (s UnprocessedTraceSegment) GoString() string

GoString returns the string representation

func (UnprocessedTraceSegment) MarshalFields added in v0.3.0

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (UnprocessedTraceSegment) String

func (s UnprocessedTraceSegment) String() string

String returns the string representation

type ValueWithServiceIds

type ValueWithServiceIds struct {

	// Values of the annotation.
	AnnotationValue *AnnotationValue `type:"structure"`

	// Services to which the annotation applies.
	ServiceIds []ServiceId `type:"list"`
	// contains filtered or unexported fields
}

Information about a segment annotation. Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/ValueWithServiceIds

func (ValueWithServiceIds) GoString

func (s ValueWithServiceIds) GoString() string

GoString returns the string representation

func (ValueWithServiceIds) MarshalFields added in v0.3.0

func (s ValueWithServiceIds) MarshalFields(e protocol.FieldEncoder) error

MarshalFields encodes the AWS API shape using the passed in protocol encoder.

func (ValueWithServiceIds) String

func (s ValueWithServiceIds) String() string

String returns the string representation

type XRay

type XRay struct {
	*aws.Client
}

XRay provides the API operation methods for making requests to AWS X-Ray. See this package's package overview docs for details on the service.

XRay methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New

func New(config aws.Config) *XRay

New creates a new instance of the XRay client with a config.

Example:

// Create a XRay client from just a config.
svc := xray.New(myConfig)

func (*XRay) BatchGetTracesRequest

func (c *XRay) BatchGetTracesRequest(input *BatchGetTracesInput) BatchGetTracesRequest

BatchGetTracesRequest returns a request value for making API operation for AWS X-Ray.

Retrieves a list of traces specified by ID. Each trace is a collection of segment documents that originates from a single request. Use GetTraceSummaries to get a list of trace IDs.

// Example sending a request using the BatchGetTracesRequest method.
req := client.BatchGetTracesRequest(params)
resp, err := req.Send()
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/BatchGetTraces

func (*XRay) GetServiceGraphRequest

func (c *XRay) GetServiceGraphRequest(input *GetServiceGraphInput) GetServiceGraphRequest

GetServiceGraphRequest returns a request value for making API operation for AWS X-Ray.

Retrieves a document that describes services that process incoming requests, and downstream services that they call as a result. Root services process incoming requests and make calls to downstream services. Root services are applications that use the AWS X-Ray SDK. Downstream services can be other applications, AWS resources, HTTP web APIs, or SQL databases.

// Example sending a request using the GetServiceGraphRequest method.
req := client.GetServiceGraphRequest(params)
resp, err := req.Send()
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetServiceGraph

func (*XRay) GetTraceGraphRequest

func (c *XRay) GetTraceGraphRequest(input *GetTraceGraphInput) GetTraceGraphRequest

GetTraceGraphRequest returns a request value for making API operation for AWS X-Ray.

Retrieves a service graph for one or more specific trace IDs.

// Example sending a request using the GetTraceGraphRequest method.
req := client.GetTraceGraphRequest(params)
resp, err := req.Send()
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceGraph

func (*XRay) GetTraceSummariesRequest

func (c *XRay) GetTraceSummariesRequest(input *GetTraceSummariesInput) GetTraceSummariesRequest

GetTraceSummariesRequest returns a request value for making API operation for AWS X-Ray.

Retrieves IDs and metadata for traces available for a specified time frame using an optional filter. To get the full traces, pass the trace IDs to BatchGetTraces.

A filter expression can target traced requests that hit specific service nodes or edges, have errors, or come from a known user. For example, the following filter expression targets traces that pass through api.example.com:

service("api.example.com")

This filter expression finds traces that have an annotation named account with the value 12345:

annotation.account = "12345"

For a full list of indexed fields and keywords that you can use in filter expressions, see Using Filter Expressions (http://docs.aws.amazon.com/xray/latest/devguide/xray-console-filters.html) in the AWS X-Ray Developer Guide.

// Example sending a request using the GetTraceSummariesRequest method.
req := client.GetTraceSummariesRequest(params)
resp, err := req.Send()
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/GetTraceSummaries

func (*XRay) PutTelemetryRecordsRequest

func (c *XRay) PutTelemetryRecordsRequest(input *PutTelemetryRecordsInput) PutTelemetryRecordsRequest

PutTelemetryRecordsRequest returns a request value for making API operation for AWS X-Ray.

Used by the AWS X-Ray daemon to upload telemetry.

// Example sending a request using the PutTelemetryRecordsRequest method.
req := client.PutTelemetryRecordsRequest(params)
resp, err := req.Send()
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTelemetryRecords

func (*XRay) PutTraceSegmentsRequest

func (c *XRay) PutTraceSegmentsRequest(input *PutTraceSegmentsInput) PutTraceSegmentsRequest

PutTraceSegmentsRequest returns a request value for making API operation for AWS X-Ray.

Uploads segment documents to AWS X-Ray. The X-Ray SDK generates segment documents and sends them to the X-Ray daemon, which uploads them in batches. A segment document can be a completed segment, an in-progress segment, or an array of subsegments.

Segments must include the following fields. For the full segment document schema, see AWS X-Ray Segment Documents (http://docs.aws.amazon.com/xray/latest/devguide/xray-api-segmentdocuments.html) in the AWS X-Ray Developer Guide.

Required Segment Document Fields

  • name - The name of the service that handled the request.

  • id - A 64-bit identifier for the segment, unique among segments in the same trace, in 16 hexadecimal digits.

  • trace_id - A unique identifier that connects all segments and subsegments originating from a single client request.

  • start_time - Time the segment or subsegment was created, in floating point seconds in epoch time, accurate to milliseconds. For example, 1480615200.010 or 1.480615200010E9.

  • end_time - Time the segment or subsegment was closed. For example, 1480615200.090 or 1.480615200090E9. Specify either an end_time or in_progress.

  • in_progress - Set to true instead of specifying an end_time to record that a segment has been started, but is not complete. Send an in progress segment when your application receives a request that will take a long time to serve, to trace the fact that the request was received. When the response is sent, send the complete segment to overwrite the in-progress segment.

A trace_id consists of three numbers separated by hyphens. For example, 1-58406520-a006649127e371903a2de979. This includes:

Trace ID Format

  • The version number, i.e. 1.

  • The time of the original request, in Unix epoch time, in 8 hexadecimal digits. For example, 10:00AM December 2nd, 2016 PST in epoch time is 1480615200 seconds, or 58406520 in hexadecimal.

  • A 96-bit identifier for the trace, globally unique, in 24 hexadecimal digits.

    // Example sending a request using the PutTraceSegmentsRequest method. req := client.PutTraceSegmentsRequest(params) resp, err := req.Send() if err == nil { fmt.Println(resp) }

Please also see https://docs.aws.amazon.com/goto/WebAPI/xray-2016-04-12/PutTraceSegments

Directories

Path Synopsis
Package xrayiface provides an interface to enable mocking the AWS X-Ray service client for testing your code.
Package xrayiface provides an interface to enable mocking the AWS X-Ray service client for testing your code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL