import "golang.org/x/tools/internal/event/export/ocagent/wire"
common.go core.go metrics.go trace.go
type Annotation struct { Description *TruncatableString `json:"description,omitempty"` Attributes *Attributes `json:"attributes,omitempty"` }
type Attribute interface {
// contains filtered or unexported methods
}
type Attributes struct { AttributeMap map[string]Attribute `json:"attributeMap,omitempty"` DroppedAttributesCount int32 `json:"dropped_attributes_count,omitempty"` }
type Bucket struct { Count int64 `json:"count,omitempty"` Exemplar *Exemplar `json:"exemplar,omitempty"` }
type BucketOptions interface {
// contains filtered or unexported methods
}
func (be *BucketOptionsExplicit) MarshalJSON() ([]byte, error)
MarshalJSON creates JSON formatted the same way as jsonpb so that the OpenCensus service can correctly determine the underlying value type. This custom MarshalJSON exists because, by default BucketOptionsExplicit is JSON marshalled as:
{"bounds":[1,2,3]}
but it should be marshalled as:
{"explicit":{"bounds":[1,2,3]}}
type DistributionValue struct { Count int64 `json:"count,omitempty"` Sum float64 `json:"sum,omitempty"` SumOfSquaredDeviation float64 `json:"sum_of_squared_deviation,omitempty"` BucketOptions BucketOptions `json:"bucket_options,omitempty"` Buckets []*Bucket `json:"buckets,omitempty"` }
type Exemplar struct { Value float64 `json:"value,omitempty"` Timestamp *Timestamp `json:"timestamp,omitempty"` Attachments map[string]string `json:"attachments,omitempty"` }
type ExportMetricsServiceRequest struct { Node *Node `json:"node,omitempty"` Metrics []*Metric `json:"metrics,omitempty"` Resource *Resource `json:"resource,omitempty"` }
type ExportTraceServiceRequest struct { Node *Node `json:"node,omitempty"` Spans []*Span `json:"spans,omitempty"` Resource *Resource `json:"resource,omitempty"` }
type LabelKey struct { Key string `json:"key,omitempty"` Description string `json:"description,omitempty"` }
type LabelValue struct { Value string `json:"value,omitempty"` HasValue bool `json:"has_value,omitempty"` }
type LibraryInfo struct { Language Language `json:"language,omitempty"` ExporterVersion string `json:"exporter_version,omitempty"` CoreLibraryVersion string `json:"core_library_version,omitempty"` }
type Link struct { TraceID []byte `json:"trace_id,omitempty"` SpanID []byte `json:"span_id,omitempty"` Type LinkType `json:"type,omitempty"` Attributes *Attributes `json:"attributes,omitempty"` TraceState *TraceState `json:"tracestate,omitempty"` }
type Links struct { Link []*Link `json:"link,omitempty"` DroppedLinksCount int32 `json:"dropped_links_count,omitempty"` }
type MessageEvent struct { Type MessageEventType `json:"type,omitempty"` ID uint64 `json:"id,omitempty"` UncompressedSize uint64 `json:"uncompressed_size,omitempty"` CompressedSize uint64 `json:"compressed_size,omitempty"` }
const ( UnspecifiedMessageEvent MessageEventType = iota SentMessageEvent ReceivedMessageEvent )
type Metric struct { MetricDescriptor *MetricDescriptor `json:"metric_descriptor,omitempty"` Timeseries []*TimeSeries `json:"timeseries,omitempty"` Resource *Resource `json:"resource,omitempty"` }
type MetricDescriptor struct { Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Unit string `json:"unit,omitempty"` Type MetricDescriptor_Type `json:"type,omitempty"` LabelKeys []*LabelKey `json:"label_keys,omitempty"` }
const ( MetricDescriptor_UNSPECIFIED MetricDescriptor_Type = 0 MetricDescriptor_GAUGE_INT64 MetricDescriptor_Type = 1 MetricDescriptor_GAUGE_DOUBLE MetricDescriptor_Type = 2 MetricDescriptor_GAUGE_DISTRIBUTION MetricDescriptor_Type = 3 MetricDescriptor_CUMULATIVE_INT64 MetricDescriptor_Type = 4 MetricDescriptor_CUMULATIVE_DOUBLE MetricDescriptor_Type = 5 MetricDescriptor_CUMULATIVE_DISTRIBUTION MetricDescriptor_Type = 6 MetricDescriptor_SUMMARY MetricDescriptor_Type = 7 )
type Module struct { Module *TruncatableString `json:"module,omitempty"` BuildID *TruncatableString `json:"build_id,omitempty"` }
type Node struct { Identifier *ProcessIdentifier `json:"identifier,omitempty"` LibraryInfo *LibraryInfo `json:"library_info,omitempty"` ServiceInfo *ServiceInfo `json:"service_info,omitempty"` Attributes map[string]string `json:"attributes,omitempty"` }
type Point struct { Timestamp *Timestamp `json:"timestamp,omitempty"` Value PointValue `json:"value,omitempty"` }
MarshalJSON creates JSON formatted the same way as jsonpb so that the OpenCensus service can correctly determine the underlying value type. This custom MarshalJSON exists because, by default *Point is JSON marshalled as:
{"value": {"int64Value": 1}}
but it should be marshalled as:
{"int64Value": 1}
type PointDistributionValue struct { DistributionValue *DistributionValue `json:"distributionValue,omitempty"` }
type PointSummaryValue struct { SummaryValue *SummaryValue `json:"summaryValue,omitempty"` }
type PointValue interface {
// contains filtered or unexported methods
}
type ProcessIdentifier struct { HostName string `json:"host_name,omitempty"` Pid uint32 `json:"pid,omitempty"` StartTimestamp Timestamp `json:"start_timestamp,omitempty"` }
type Resource struct { Type string `json:"type,omitempty"` Labels map[string]string `json:"labels,omitempty"` }
type Snapshot struct { Count *Int64Value `json:"count,omitempty"` Sum *DoubleValue `json:"sum,omitempty"` PercentileValues []*SnapshotValueAtPercentile `json:"percentile_values,omitempty"` }
type SnapshotValueAtPercentile struct { Percentile float64 `json:"percentile,omitempty"` Value float64 `json:"value,omitempty"` }
type Span struct { TraceID []byte `json:"trace_id,omitempty"` SpanID []byte `json:"span_id,omitempty"` TraceState *TraceState `json:"tracestate,omitempty"` ParentSpanID []byte `json:"parent_span_id,omitempty"` Name *TruncatableString `json:"name,omitempty"` Kind SpanKind `json:"kind,omitempty"` StartTime Timestamp `json:"start_time,omitempty"` EndTime Timestamp `json:"end_time,omitempty"` Attributes *Attributes `json:"attributes,omitempty"` StackTrace *StackTrace `json:"stack_trace,omitempty"` TimeEvents *TimeEvents `json:"time_events,omitempty"` Links *Links `json:"links,omitempty"` Status *Status `json:"status,omitempty"` Resource *Resource `json:"resource,omitempty"` SameProcessAsParentSpan bool `json:"same_process_as_parent_span,omitempty"` ChildSpanCount bool `json:"child_span_count,omitempty"` }
type StackFrame struct { FunctionName *TruncatableString `json:"function_name,omitempty"` OriginalFunctionName *TruncatableString `json:"original_function_name,omitempty"` FileName *TruncatableString `json:"file_name,omitempty"` LineNumber int64 `json:"line_number,omitempty"` ColumnNumber int64 `json:"column_number,omitempty"` LoadModule *Module `json:"load_module,omitempty"` SourceVersion *TruncatableString `json:"source_version,omitempty"` }
type StackFrames struct { Frame []*StackFrame `json:"frame,omitempty"` DroppedFramesCount int32 `json:"dropped_frames_count,omitempty"` }
type StackTrace struct { StackFrames *StackFrames `json:"stack_frames,omitempty"` StackTraceHashID uint64 `json:"stack_trace_hash_id,omitempty"` }
type Status struct { Code int32 `json:"code,omitempty"` Message string `json:"message,omitempty"` }
type StringAttribute struct { StringValue *TruncatableString `json:"stringValue,omitempty"` }
type SummaryValue struct { Count *Int64Value `json:"count,omitempty"` Sum *DoubleValue `json:"sum,omitempty"` Snapshot *Snapshot `json:"snapshot,omitempty"` }
type TimeEvent struct { Time Timestamp `json:"time,omitempty"` MessageEvent *MessageEvent `json:"messageEvent,omitempty"` Annotation *Annotation `json:"annotation,omitempty"` }
type TimeEventValue interface {
// contains filtered or unexported methods
}
type TimeEvents struct { TimeEvent []TimeEvent `json:"timeEvent,omitempty"` DroppedAnnotationsCount int32 `json:"dropped_annotations_count,omitempty"` DroppedMessageEventsCount int32 `json:"dropped_message_events_count,omitempty"` }
type TimeSeries struct { StartTimestamp *Timestamp `json:"start_timestamp,omitempty"` LabelValues []*LabelValue `json:"label_values,omitempty"` Points []*Point `json:"points,omitempty"` }
type TraceState struct { Entries []*TraceStateEntry `json:"entries,omitempty"` }
type TraceStateEntry struct { Key string `json:"key,omitempty"` Value string `json:"value,omitempty"` }
type TruncatableString struct { Value string `json:"value,omitempty"` TruncatedByteCount int32 `json:"truncated_byte_count,omitempty"` }
Package wire imports 2 packages (graph) and is imported by 2 packages. Updated 2021-01-15. Refresh now. Tools for package owners.