1 // Copyright 2019 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 // This file holds common ocagent types
10 Identifier *ProcessIdentifier `json:"identifier,omitempty"`
11 LibraryInfo *LibraryInfo `json:"library_info,omitempty"`
12 ServiceInfo *ServiceInfo `json:"service_info,omitempty"`
13 Attributes map[string]string `json:"attributes,omitempty"`
16 type Resource struct {
17 Type string `json:"type,omitempty"`
18 Labels map[string]string `json:"labels,omitempty"`
21 type TruncatableString struct {
22 Value string `json:"value,omitempty"`
23 TruncatedByteCount int32 `json:"truncated_byte_count,omitempty"`
26 type Attributes struct {
27 AttributeMap map[string]Attribute `json:"attributeMap,omitempty"`
28 DroppedAttributesCount int32 `json:"dropped_attributes_count,omitempty"`
31 type StringAttribute struct {
32 StringValue *TruncatableString `json:"stringValue,omitempty"`
35 type IntAttribute struct {
36 IntValue int64 `json:"intValue,omitempty"`
39 type BoolAttribute struct {
40 BoolValue bool `json:"boolValue,omitempty"`
43 type DoubleAttribute struct {
44 DoubleValue float64 `json:"doubleValue,omitempty"`
47 type Attribute interface {
51 func (StringAttribute) labelAttribute() {}
52 func (IntAttribute) labelAttribute() {}
53 func (BoolAttribute) labelAttribute() {}
54 func (DoubleAttribute) labelAttribute() {}
56 type StackTrace struct {
57 StackFrames *StackFrames `json:"stack_frames,omitempty"`
58 StackTraceHashID uint64 `json:"stack_trace_hash_id,omitempty"`
61 type StackFrames struct {
62 Frame []*StackFrame `json:"frame,omitempty"`
63 DroppedFramesCount int32 `json:"dropped_frames_count,omitempty"`
66 type StackFrame struct {
67 FunctionName *TruncatableString `json:"function_name,omitempty"`
68 OriginalFunctionName *TruncatableString `json:"original_function_name,omitempty"`
69 FileName *TruncatableString `json:"file_name,omitempty"`
70 LineNumber int64 `json:"line_number,omitempty"`
71 ColumnNumber int64 `json:"column_number,omitempty"`
72 LoadModule *Module `json:"load_module,omitempty"`
73 SourceVersion *TruncatableString `json:"source_version,omitempty"`
77 Module *TruncatableString `json:"module,omitempty"`
78 BuildID *TruncatableString `json:"build_id,omitempty"`
81 type ProcessIdentifier struct {
82 HostName string `json:"host_name,omitempty"`
83 Pid uint32 `json:"pid,omitempty"`
84 StartTimestamp Timestamp `json:"start_timestamp,omitempty"`
87 type LibraryInfo struct {
88 Language Language `json:"language,omitempty"`
89 ExporterVersion string `json:"exporter_version,omitempty"`
90 CoreLibraryVersion string `json:"core_library_version,omitempty"`
96 LanguageGo Language = 4
99 type ServiceInfo struct {
100 Name string `json:"name,omitempty"`