veneur: Index | Files

package xray

import ""


Package Files



const XRayTagNameClientIP = "xray_client_ip"

type XRaySegment Uses

type XRaySegment struct {
    // The 3-tuple (name, segment type, account ID) uniquely defines
    // an X-Ray service. The Veneur X-Ray sink uses the default type (segment)
    // for all segments, so for a deployment that only uses a single AWS account ID,
    // the name field will uniquely define the service (and be used as the service name)
    Name        string            `json:"name"`
    ID          string            `json:"id"`
    TraceID     string            `json:"trace_id"`
    ParentID    string            `json:"parent_id,omitempty"`
    StartTime   float64           `json:"start_time"`
    EndTime     float64           `json:"end_time"`
    Namespace   string            `json:"namespace"`
    Error       bool              `json:"error"`
    Annotations map[string]string `json:"annotations,omitempty"`
    Metadata    map[string]string `json:"metadata,omitempty"`
    HTTP        XRaySegmentHTTP   `json:"http,omitempty"`

XRaySegment is a trace segment for X-Ray as defined by:

type XRaySegmentHTTP Uses

type XRaySegmentHTTP struct {
    Request  XRaySegmentHTTPRequest  `json:"request,omitempty"`
    Response XRaySegmentHTTPResponse `json:"response,omitempty"`

type XRaySegmentHTTPRequest Uses

type XRaySegmentHTTPRequest struct {
    Method        string `json:"method,omitempty"`
    ClientIP      string `json:"client_ip,omitempty"`
    URL           string `json:"url,omitempty"`
    UserAgent     string `json:"user_agent,omitempty"`
    XForwardedFor string `json:"x_forwarded_for,omitempty"`

type XRaySegmentHTTPResponse Uses

type XRaySegmentHTTPResponse struct {
    Status int `json:"status,omitempty"`

type XRaySpanSink Uses

type XRaySpanSink struct {
    // contains filtered or unexported fields

XRaySpanSink is a sink for spans to be sent to AWS X-Ray.

func NewXRaySpanSink Uses

func NewXRaySpanSink(daemonAddr string, sampleRatePercentage int, commonTags map[string]string, annotationTags []string, log *logrus.Logger) (*XRaySpanSink, error)

NewXRaySpanSink creates a new instance of a XRaySpanSink.

func (*XRaySpanSink) Flush Uses

func (x *XRaySpanSink) Flush()

Flush doesn't need to do anything, so we emit metrics instead.

func (*XRaySpanSink) Ingest Uses

func (x *XRaySpanSink) Ingest(ssfSpan *ssf.SSFSpan) error

Ingest takes in a span and passed it along to the X-Ray client after some sanity checks and improvements are made.

func (*XRaySpanSink) Name Uses

func (x *XRaySpanSink) Name() string

Name returns this sink's name.

func (*XRaySpanSink) Start Uses

func (x *XRaySpanSink) Start(cl *trace.Client) error

Start the sink

Package xray imports 15 packages (graph) and is imported by 1 packages. Updated 2019-07-02. Refresh now. Tools for package owners.