/
sso_model.go
81 lines (74 loc) · 3.36 KB
/
sso_model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0
package opensearchexporter // import "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/opensearchexporter"
import (
"time"
)
type dataStream struct {
Dataset string `json:"dataset,omitempty"`
Namespace string `json:"namespace,omitempty"`
Type string `json:"type,omitempty"`
}
type ssoSpanEvent struct {
Attributes map[string]any `json:"attributes"`
DroppedAttributesCount uint32 `json:"droppedAttributesCount"`
Name string `json:"name"`
ObservedTimestamp *time.Time `json:"observedTimestamp,omitempty"`
Timestamp *time.Time `json:"@timestamp,omitempty"`
}
type ssoSpanLinks struct {
Attributes map[string]any `json:"attributes,omitempty"`
SpanID string `json:"spanId,omitempty"`
TraceID string `json:"traceId,omitempty"`
TraceState string `json:"traceState,omitempty"`
DroppedAttributesCount uint32 `json:"droppedAttributesCount,omitempty"`
}
type ssoSpan struct {
Attributes map[string]any `json:"attributes,omitempty"`
DroppedAttributesCount uint32 `json:"droppedAttributesCount"`
DroppedEventsCount uint32 `json:"droppedEventsCount"`
DroppedLinksCount uint32 `json:"droppedLinksCount"`
EndTime time.Time `json:"endTime"`
Events []ssoSpanEvent `json:"events,omitempty"`
InstrumentationScope struct {
Attributes map[string]any `json:"attributes,omitempty"`
DroppedAttributesCount uint32 `json:"droppedAttributesCount"`
Name string `json:"name"`
SchemaURL string `json:"schemaUrl"`
Version string `json:"version"`
} `json:"instrumentationScope,omitempty"`
Kind string `json:"kind"`
Links []ssoSpanLinks `json:"links,omitempty"`
Name string `json:"name"`
ParentSpanID string `json:"parentSpanId"`
Resource map[string]string `json:"resource,omitempty"`
SpanID string `json:"spanId"`
StartTime time.Time `json:"startTime"`
Status struct {
Code string `json:"code"`
Message string `json:"message"`
} `json:"status"`
Timestamp time.Time `json:"@timestamp"`
TraceID string `json:"traceId"`
TraceState string `json:"traceState"`
}
type ssoRecord struct {
Attributes map[string]any `json:"attributes,omitempty"`
Body string `json:"body"`
InstrumentationScope struct {
Attributes map[string]any `json:"attributes,omitempty"`
Name string `json:"name,omitempty"`
SchemaURL string `json:"schemaUrl,omitempty"`
Version string `json:"version,omitempty"`
} `json:"instrumentationScope,omitempty"`
ObservedTimestamp *time.Time `json:"observedTimestamp,omitempty"`
Resource map[string]string `json:"resource,omitempty"`
SchemaURL string `json:"schemaUrl,omitempty"`
Severity struct {
Text string `json:"text,omitempty"`
Number int64 `json:"number,omitempty"`
} `json:"severity"`
SpanID string `json:"spanId,omitempty"`
Timestamp *time.Time `json:"@timestamp"`
TraceID string `json:"traceId,omitempty"`
}