Documentation ¶
Index ¶
- type Document
- func (doc *Document) Add(key string, v Value)
- func (doc *Document) AddAttribute(key string, attribute pcommon.Value)
- func (doc *Document) AddAttributes(key string, attributes pcommon.Map)
- func (doc *Document) AddDynamicTemplate(path, template string)
- func (doc *Document) AddEvents(key string, events ptrace.SpanEventSlice)
- func (doc *Document) AddInt(key string, value int64)
- func (doc *Document) AddSpanID(key string, id pcommon.SpanID)
- func (doc *Document) AddString(key string, v string)
- func (doc *Document) AddTimestamp(key string, ts pcommon.Timestamp)
- func (doc *Document) AddTraceID(key string, id pcommon.TraceID)
- func (doc *Document) AddUInt(key string, value uint64)
- func (doc *Document) Clone() *Document
- func (doc *Document) Dedup(appendValueOnConflict bool)
- func (doc *Document) DynamicTemplates() map[string]string
- func (doc *Document) Serialize(w io.Writer, dedot bool, otel bool) error
- type Kind
- type Value
- func ArrValue(values ...Value) Value
- func BoolValue(b bool) Value
- func DoubleValue(d float64) Value
- func IntValue(i int64) Value
- func StringValue(str string) Value
- func TimestampValue(ts time.Time) Value
- func UIntValue(i uint64) Value
- func UnflattenableObjectValue(m pcommon.Map) Value
- func ValueFromAttribute(attr pcommon.Value) Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
Document is an intermediate representation for converting open telemetry records with arbitrary attributes into a JSON document that can be processed by Elasticsearch.
func DocumentFromAttributes ¶
DocumentFromAttributes creates a document from a OpenTelemetry attribute map. All nested maps will be flattened, with keys being joined using a `.` symbol.
func DocumentFromAttributesWithPath ¶
DocumentFromAttributesWithPath creates a document from a OpenTelemetry attribute map. All nested maps will be flattened, with keys being joined using a `.` symbol.
All keys in the map will be prefixed with path.
func (*Document) AddAttribute ¶
AddAttribute converts and adds a AttributeValue to the document. If the attribute represents a map, the fields will be flattened.
func (*Document) AddAttributes ¶
AddAttributes expands and flattens all key-value pairs from the input attribute map into the document.
func (*Document) AddDynamicTemplate ¶ added in v0.108.0
func (*Document) AddEvents ¶ added in v0.78.0
func (doc *Document) AddEvents(key string, events ptrace.SpanEventSlice)
AddEvents converts and adds span events to the document.
func (*Document) AddSpanID ¶ added in v0.65.0
AddSpanID adds the hex presentation of a SpanID to the document. If the SpanID is empty, no value will be added.
func (*Document) AddTimestamp ¶
AddTimestamp adds a raw timestamp value to the Document.
func (*Document) AddTraceID ¶ added in v0.65.0
AddTraceID adds the hex presentation of a TraceID value to the document. If the TraceID is empty, no value will be added.
func (*Document) AddUInt ¶ added in v0.116.0
AddUInt adds an unsigned integer value to the document.
func (*Document) Dedup ¶
Dedup removes fields from the document, that have duplicate keys. The filtering only keeps the last value for a key.
Dedup ensure that keys are sorted.
func (*Document) DynamicTemplates ¶ added in v0.108.0
type Value ¶
type Value struct {
// contains filtered or unexported fields
}
Value type that can be added to a Document.
func DoubleValue ¶
DoubleValue creates a new value from a double value..
func TimestampValue ¶
TimestampValue create a new value from a time.Time.
func UnflattenableObjectValue ¶ added in v0.108.0
UnflattenableObjectValue creates a unflattenable object from a map
func ValueFromAttribute ¶
ValueFromAttribute converts a AttributeValue into a value.