v1

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2022 License: Apache-2.0 Imports: 6 Imported by: 77

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SeverityNumber_name = map[int32]string{
		0:  "SEVERITY_NUMBER_UNSPECIFIED",
		1:  "SEVERITY_NUMBER_TRACE",
		2:  "SEVERITY_NUMBER_TRACE2",
		3:  "SEVERITY_NUMBER_TRACE3",
		4:  "SEVERITY_NUMBER_TRACE4",
		5:  "SEVERITY_NUMBER_DEBUG",
		6:  "SEVERITY_NUMBER_DEBUG2",
		7:  "SEVERITY_NUMBER_DEBUG3",
		8:  "SEVERITY_NUMBER_DEBUG4",
		9:  "SEVERITY_NUMBER_INFO",
		10: "SEVERITY_NUMBER_INFO2",
		11: "SEVERITY_NUMBER_INFO3",
		12: "SEVERITY_NUMBER_INFO4",
		13: "SEVERITY_NUMBER_WARN",
		14: "SEVERITY_NUMBER_WARN2",
		15: "SEVERITY_NUMBER_WARN3",
		16: "SEVERITY_NUMBER_WARN4",
		17: "SEVERITY_NUMBER_ERROR",
		18: "SEVERITY_NUMBER_ERROR2",
		19: "SEVERITY_NUMBER_ERROR3",
		20: "SEVERITY_NUMBER_ERROR4",
		21: "SEVERITY_NUMBER_FATAL",
		22: "SEVERITY_NUMBER_FATAL2",
		23: "SEVERITY_NUMBER_FATAL3",
		24: "SEVERITY_NUMBER_FATAL4",
	}
	SeverityNumber_value = map[string]int32{
		"SEVERITY_NUMBER_UNSPECIFIED": 0,
		"SEVERITY_NUMBER_TRACE":       1,
		"SEVERITY_NUMBER_TRACE2":      2,
		"SEVERITY_NUMBER_TRACE3":      3,
		"SEVERITY_NUMBER_TRACE4":      4,
		"SEVERITY_NUMBER_DEBUG":       5,
		"SEVERITY_NUMBER_DEBUG2":      6,
		"SEVERITY_NUMBER_DEBUG3":      7,
		"SEVERITY_NUMBER_DEBUG4":      8,
		"SEVERITY_NUMBER_INFO":        9,
		"SEVERITY_NUMBER_INFO2":       10,
		"SEVERITY_NUMBER_INFO3":       11,
		"SEVERITY_NUMBER_INFO4":       12,
		"SEVERITY_NUMBER_WARN":        13,
		"SEVERITY_NUMBER_WARN2":       14,
		"SEVERITY_NUMBER_WARN3":       15,
		"SEVERITY_NUMBER_WARN4":       16,
		"SEVERITY_NUMBER_ERROR":       17,
		"SEVERITY_NUMBER_ERROR2":      18,
		"SEVERITY_NUMBER_ERROR3":      19,
		"SEVERITY_NUMBER_ERROR4":      20,
		"SEVERITY_NUMBER_FATAL":       21,
		"SEVERITY_NUMBER_FATAL2":      22,
		"SEVERITY_NUMBER_FATAL3":      23,
		"SEVERITY_NUMBER_FATAL4":      24,
	}
)

Enum value maps for SeverityNumber.

View Source
var (
	LogRecordFlags_name = map[int32]string{
		0:   "LOG_RECORD_FLAG_UNSPECIFIED",
		255: "LOG_RECORD_FLAG_TRACE_FLAGS_MASK",
	}
	LogRecordFlags_value = map[string]int32{
		"LOG_RECORD_FLAG_UNSPECIFIED":      0,
		"LOG_RECORD_FLAG_TRACE_FLAGS_MASK": 255,
	}
)

Enum value maps for LogRecordFlags.

View Source
var File_opentelemetry_proto_logs_v1_logs_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type InstrumentationLibraryLogs deprecated

type InstrumentationLibraryLogs struct {

	// The instrumentation library information for the logs in this message.
	// Semantically when InstrumentationLibrary isn't set, it is equivalent with
	// an empty instrumentation library name (unknown).
	InstrumentationLibrary *v11.InstrumentationLibrary `` /* 127-byte string literal not displayed */
	// A list of logs that originate from an instrumentation library.
	LogRecords []*LogRecord `protobuf:"bytes,2,rep,name=log_records,json=logRecords,proto3" json:"log_records,omitempty"`
	// This schema_url applies to all logs in the "logs" field.
	SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"`
	// contains filtered or unexported fields
}

A collection of Logs produced by an InstrumentationLibrary. InstrumentationLibraryLogs is wire-compatible with ScopeLogs for binary Protobuf format. This message is deprecated and will be removed on June 15, 2022.

Deprecated: Do not use.

func (*InstrumentationLibraryLogs) Descriptor deprecated

func (*InstrumentationLibraryLogs) Descriptor() ([]byte, []int)

Deprecated: Use InstrumentationLibraryLogs.ProtoReflect.Descriptor instead.

func (*InstrumentationLibraryLogs) GetInstrumentationLibrary

func (x *InstrumentationLibraryLogs) GetInstrumentationLibrary() *v11.InstrumentationLibrary

func (*InstrumentationLibraryLogs) GetLogRecords added in v0.12.0

func (x *InstrumentationLibraryLogs) GetLogRecords() []*LogRecord

func (*InstrumentationLibraryLogs) GetSchemaUrl added in v0.9.0

func (x *InstrumentationLibraryLogs) GetSchemaUrl() string

func (*InstrumentationLibraryLogs) ProtoMessage

func (*InstrumentationLibraryLogs) ProtoMessage()

func (*InstrumentationLibraryLogs) ProtoReflect

func (*InstrumentationLibraryLogs) Reset

func (x *InstrumentationLibraryLogs) Reset()

func (*InstrumentationLibraryLogs) String

func (x *InstrumentationLibraryLogs) String() string

type LogRecord

type LogRecord struct {

	// time_unix_nano is the time when the event occurred.
	// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
	// Value of 0 indicates unknown or missing timestamp.
	TimeUnixNano uint64 `protobuf:"fixed64,1,opt,name=time_unix_nano,json=timeUnixNano,proto3" json:"time_unix_nano,omitempty"`
	// Time when the event was observed by the collection system.
	// For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
	// this timestamp is typically set at the generation time and is equal to Timestamp.
	// For events originating externally and collected by OpenTelemetry (e.g. using
	// Collector) this is the time when OpenTelemetry's code observed the event measured
	// by the clock of the OpenTelemetry code. This field MUST be set once the event is
	// observed by OpenTelemetry.
	//
	// For converting OpenTelemetry log data to formats that support only one timestamp or
	// when receiving OpenTelemetry log data by recipients that support only one timestamp
	// internally the following logic is recommended:
	//   - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
	//
	// Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
	// Value of 0 indicates unknown or missing timestamp.
	ObservedTimeUnixNano uint64 `` /* 128-byte string literal not displayed */
	// Numerical value of the severity, normalized to values described in Log Data Model.
	// [Optional].
	SeverityNumber SeverityNumber `` /* 152-byte string literal not displayed */
	// The severity text (also known as log level). The original string representation as
	// it is known at the source. [Optional].
	SeverityText string `protobuf:"bytes,3,opt,name=severity_text,json=severityText,proto3" json:"severity_text,omitempty"`
	// Short event identifier that does not contain varying parts. Name describes
	// what happened (e.g. "ProcessStarted"). Recommended to be no longer than 50
	// characters. Not guaranteed to be unique in any way. [Optional].
	// This deprecated field is planned to be removed March 15, 2022. Receivers can
	// ignore this field.
	//
	// Deprecated: Do not use.
	Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
	// A value containing the body of the log record. Can be for example a human-readable
	// string message (including multi-line) describing the event in a free form or it can
	// be a structured data composed of arrays and maps of other values. [Optional].
	Body *v11.AnyValue `protobuf:"bytes,5,opt,name=body,proto3" json:"body,omitempty"`
	// Additional attributes that describe the specific event occurrence. [Optional].
	// Attribute keys MUST be unique (it is not allowed to have more than one
	// attribute with the same key).
	Attributes             []*v11.KeyValue `protobuf:"bytes,6,rep,name=attributes,proto3" json:"attributes,omitempty"`
	DroppedAttributesCount uint32          `` /* 130-byte string literal not displayed */
	// Flags, a bit field. 8 least significant bits are the trace flags as
	// defined in W3C Trace Context specification. 24 most significant bits are reserved
	// and must be set to 0. Readers must not assume that 24 most significant bits
	// will be zero and must correctly mask the bits when reading 8-bit trace flag (use
	// flags & TRACE_FLAGS_MASK). [Optional].
	Flags uint32 `protobuf:"fixed32,8,opt,name=flags,proto3" json:"flags,omitempty"`
	// A unique identifier for a trace. All logs from the same trace share
	// the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes
	// is considered invalid. Can be set for logs that are part of request processing
	// and have an assigned trace id. [Optional].
	TraceId []byte `protobuf:"bytes,9,opt,name=trace_id,json=traceId,proto3" json:"trace_id,omitempty"`
	// A unique identifier for a span within a trace, assigned when the span
	// is created. The ID is an 8-byte array. An ID with all zeroes is considered
	// invalid. Can be set for logs that are part of a particular processing span.
	// If span_id is present trace_id SHOULD be also present. [Optional].
	SpanId []byte `protobuf:"bytes,10,opt,name=span_id,json=spanId,proto3" json:"span_id,omitempty"`
	// contains filtered or unexported fields
}

A log record according to OpenTelemetry Log Data Model: https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md

func (*LogRecord) Descriptor deprecated

func (*LogRecord) Descriptor() ([]byte, []int)

Deprecated: Use LogRecord.ProtoReflect.Descriptor instead.

func (*LogRecord) GetAttributes

func (x *LogRecord) GetAttributes() []*v11.KeyValue

func (*LogRecord) GetBody

func (x *LogRecord) GetBody() *v11.AnyValue

func (*LogRecord) GetDroppedAttributesCount

func (x *LogRecord) GetDroppedAttributesCount() uint32

func (*LogRecord) GetFlags

func (x *LogRecord) GetFlags() uint32

func (*LogRecord) GetName deprecated

func (x *LogRecord) GetName() string

Deprecated: Do not use.

func (*LogRecord) GetObservedTimeUnixNano added in v0.13.0

func (x *LogRecord) GetObservedTimeUnixNano() uint64

func (*LogRecord) GetSeverityNumber

func (x *LogRecord) GetSeverityNumber() SeverityNumber

func (*LogRecord) GetSeverityText

func (x *LogRecord) GetSeverityText() string

func (*LogRecord) GetSpanId

func (x *LogRecord) GetSpanId() []byte

func (*LogRecord) GetTimeUnixNano

func (x *LogRecord) GetTimeUnixNano() uint64

func (*LogRecord) GetTraceId

func (x *LogRecord) GetTraceId() []byte

func (*LogRecord) ProtoMessage

func (*LogRecord) ProtoMessage()

func (*LogRecord) ProtoReflect

func (x *LogRecord) ProtoReflect() protoreflect.Message

func (*LogRecord) Reset

func (x *LogRecord) Reset()

func (*LogRecord) String

func (x *LogRecord) String() string

type LogRecordFlags

type LogRecordFlags int32

Masks for LogRecord.flags field.

const (
	LogRecordFlags_LOG_RECORD_FLAG_UNSPECIFIED      LogRecordFlags = 0
	LogRecordFlags_LOG_RECORD_FLAG_TRACE_FLAGS_MASK LogRecordFlags = 255
)

func (LogRecordFlags) Descriptor

func (LogRecordFlags) Enum

func (x LogRecordFlags) Enum() *LogRecordFlags

func (LogRecordFlags) EnumDescriptor deprecated

func (LogRecordFlags) EnumDescriptor() ([]byte, []int)

Deprecated: Use LogRecordFlags.Descriptor instead.

func (LogRecordFlags) Number

func (LogRecordFlags) String

func (x LogRecordFlags) String() string

func (LogRecordFlags) Type

type LogsData added in v0.11.0

type LogsData struct {

	// An array of ResourceLogs.
	// For data coming from a single resource this array will typically contain
	// one element. Intermediary nodes that receive data from multiple origins
	// typically batch the data before forwarding further and in that case this
	// array will contain multiple elements.
	ResourceLogs []*ResourceLogs `protobuf:"bytes,1,rep,name=resource_logs,json=resourceLogs,proto3" json:"resource_logs,omitempty"`
	// contains filtered or unexported fields
}

LogsData represents the logs data that can be stored in a persistent storage, OR can be embedded by other protocols that transfer OTLP logs data but do not implement the OTLP protocol.

The main difference between this message and collector protocol is that in this message there will not be any "control" or "metadata" specific to OTLP protocol.

When new fields are added into this message, the OTLP request MUST be updated as well.

func (*LogsData) Descriptor deprecated added in v0.11.0

func (*LogsData) Descriptor() ([]byte, []int)

Deprecated: Use LogsData.ProtoReflect.Descriptor instead.

func (*LogsData) GetResourceLogs added in v0.11.0

func (x *LogsData) GetResourceLogs() []*ResourceLogs

func (*LogsData) ProtoMessage added in v0.11.0

func (*LogsData) ProtoMessage()

func (*LogsData) ProtoReflect added in v0.11.0

func (x *LogsData) ProtoReflect() protoreflect.Message

func (*LogsData) Reset added in v0.11.0

func (x *LogsData) Reset()

func (*LogsData) String added in v0.11.0

func (x *LogsData) String() string

type ResourceLogs

type ResourceLogs struct {

	// The resource for the logs in this message.
	// If this field is not set then resource info is unknown.
	Resource *v1.Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
	// A list of ScopeLogs that originate from a resource.
	ScopeLogs []*ScopeLogs `protobuf:"bytes,2,rep,name=scope_logs,json=scopeLogs,proto3" json:"scope_logs,omitempty"`
	// A list of InstrumentationLibraryLogs that originate from a resource.
	// This field is deprecated and will be removed after grace period expires on June 15, 2022.
	//
	// During the grace period the following rules SHOULD be followed:
	//
	// For Binary Protobufs
	// ====================
	// Binary Protobuf senders SHOULD NOT set instrumentation_library_logs. Instead
	// scope_logs SHOULD be set.
	//
	// Binary Protobuf receivers SHOULD check if instrumentation_library_logs is set
	// and scope_logs is not set then the value in instrumentation_library_logs
	// SHOULD be used instead by converting InstrumentationLibraryLogs into ScopeLogs.
	// If scope_logs is set then instrumentation_library_logs SHOULD be ignored.
	//
	// For JSON
	// ========
	// JSON senders that set instrumentation_library_logs field MAY also set
	// scope_logs to carry the same logs, essentially double-publishing the same data.
	// Such double-publishing MAY be controlled by a user-settable option.
	// If double-publishing is not used then the senders SHOULD set scope_logs and
	// SHOULD NOT set instrumentation_library_logs.
	//
	// JSON receivers SHOULD check if instrumentation_library_logs is set and
	// scope_logs is not set then the value in instrumentation_library_logs
	// SHOULD be used instead by converting InstrumentationLibraryLogs into ScopeLogs.
	// If scope_logs is set then instrumentation_library_logs field SHOULD be ignored.
	//
	// Deprecated: Do not use.
	InstrumentationLibraryLogs []*InstrumentationLibraryLogs `` /* 144-byte string literal not displayed */
	// This schema_url applies to the data in the "resource" field. It does not apply
	// to the data in the "scope_logs" field which have their own schema_url field.
	SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"`
	// contains filtered or unexported fields
}

A collection of ScopeLogs from a Resource.

func (*ResourceLogs) Descriptor deprecated

func (*ResourceLogs) Descriptor() ([]byte, []int)

Deprecated: Use ResourceLogs.ProtoReflect.Descriptor instead.

func (*ResourceLogs) GetInstrumentationLibraryLogs deprecated

func (x *ResourceLogs) GetInstrumentationLibraryLogs() []*InstrumentationLibraryLogs

Deprecated: Do not use.

func (*ResourceLogs) GetResource

func (x *ResourceLogs) GetResource() *v1.Resource

func (*ResourceLogs) GetSchemaUrl added in v0.9.0

func (x *ResourceLogs) GetSchemaUrl() string

func (*ResourceLogs) GetScopeLogs added in v0.15.0

func (x *ResourceLogs) GetScopeLogs() []*ScopeLogs

func (*ResourceLogs) ProtoMessage

func (*ResourceLogs) ProtoMessage()

func (*ResourceLogs) ProtoReflect

func (x *ResourceLogs) ProtoReflect() protoreflect.Message

func (*ResourceLogs) Reset

func (x *ResourceLogs) Reset()

func (*ResourceLogs) String

func (x *ResourceLogs) String() string

type ScopeLogs added in v0.15.0

type ScopeLogs struct {

	// The instrumentation scope information for the logs in this message.
	// Semantically when InstrumentationScope isn't set, it is equivalent with
	// an empty instrumentation scope name (unknown).
	Scope *v11.InstrumentationScope `protobuf:"bytes,1,opt,name=scope,proto3" json:"scope,omitempty"`
	// A list of log records.
	LogRecords []*LogRecord `protobuf:"bytes,2,rep,name=log_records,json=logRecords,proto3" json:"log_records,omitempty"`
	// This schema_url applies to all logs in the "logs" field.
	SchemaUrl string `protobuf:"bytes,3,opt,name=schema_url,json=schemaUrl,proto3" json:"schema_url,omitempty"`
	// contains filtered or unexported fields
}

A collection of Logs produced by a Scope.

func (*ScopeLogs) Descriptor deprecated added in v0.15.0

func (*ScopeLogs) Descriptor() ([]byte, []int)

Deprecated: Use ScopeLogs.ProtoReflect.Descriptor instead.

func (*ScopeLogs) GetLogRecords added in v0.15.0

func (x *ScopeLogs) GetLogRecords() []*LogRecord

func (*ScopeLogs) GetSchemaUrl added in v0.15.0

func (x *ScopeLogs) GetSchemaUrl() string

func (*ScopeLogs) GetScope added in v0.15.0

func (x *ScopeLogs) GetScope() *v11.InstrumentationScope

func (*ScopeLogs) ProtoMessage added in v0.15.0

func (*ScopeLogs) ProtoMessage()

func (*ScopeLogs) ProtoReflect added in v0.15.0

func (x *ScopeLogs) ProtoReflect() protoreflect.Message

func (*ScopeLogs) Reset added in v0.15.0

func (x *ScopeLogs) Reset()

func (*ScopeLogs) String added in v0.15.0

func (x *ScopeLogs) String() string

type SeverityNumber

type SeverityNumber int32

Possible values for LogRecord.SeverityNumber.

const (
	// UNSPECIFIED is the default SeverityNumber, it MUST NOT be used.
	SeverityNumber_SEVERITY_NUMBER_UNSPECIFIED SeverityNumber = 0
	SeverityNumber_SEVERITY_NUMBER_TRACE       SeverityNumber = 1
	SeverityNumber_SEVERITY_NUMBER_TRACE2      SeverityNumber = 2
	SeverityNumber_SEVERITY_NUMBER_TRACE3      SeverityNumber = 3
	SeverityNumber_SEVERITY_NUMBER_TRACE4      SeverityNumber = 4
	SeverityNumber_SEVERITY_NUMBER_DEBUG       SeverityNumber = 5
	SeverityNumber_SEVERITY_NUMBER_DEBUG2      SeverityNumber = 6
	SeverityNumber_SEVERITY_NUMBER_DEBUG3      SeverityNumber = 7
	SeverityNumber_SEVERITY_NUMBER_DEBUG4      SeverityNumber = 8
	SeverityNumber_SEVERITY_NUMBER_INFO        SeverityNumber = 9
	SeverityNumber_SEVERITY_NUMBER_INFO2       SeverityNumber = 10
	SeverityNumber_SEVERITY_NUMBER_INFO3       SeverityNumber = 11
	SeverityNumber_SEVERITY_NUMBER_INFO4       SeverityNumber = 12
	SeverityNumber_SEVERITY_NUMBER_WARN        SeverityNumber = 13
	SeverityNumber_SEVERITY_NUMBER_WARN2       SeverityNumber = 14
	SeverityNumber_SEVERITY_NUMBER_WARN3       SeverityNumber = 15
	SeverityNumber_SEVERITY_NUMBER_WARN4       SeverityNumber = 16
	SeverityNumber_SEVERITY_NUMBER_ERROR       SeverityNumber = 17
	SeverityNumber_SEVERITY_NUMBER_ERROR2      SeverityNumber = 18
	SeverityNumber_SEVERITY_NUMBER_ERROR3      SeverityNumber = 19
	SeverityNumber_SEVERITY_NUMBER_ERROR4      SeverityNumber = 20
	SeverityNumber_SEVERITY_NUMBER_FATAL       SeverityNumber = 21
	SeverityNumber_SEVERITY_NUMBER_FATAL2      SeverityNumber = 22
	SeverityNumber_SEVERITY_NUMBER_FATAL3      SeverityNumber = 23
	SeverityNumber_SEVERITY_NUMBER_FATAL4      SeverityNumber = 24
)

func (SeverityNumber) Descriptor

func (SeverityNumber) Enum

func (x SeverityNumber) Enum() *SeverityNumber

func (SeverityNumber) EnumDescriptor deprecated

func (SeverityNumber) EnumDescriptor() ([]byte, []int)

Deprecated: Use SeverityNumber.Descriptor instead.

func (SeverityNumber) Number

func (SeverityNumber) String

func (x SeverityNumber) String() string

func (SeverityNumber) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL