otelfields

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ResourceFieldKey is the key used to identify Resource in stores.
	ResourceFieldKey = "Resource"
)

Variables

View Source
var AttributesNamespace = zap.Namespace("Attributes")

attributesNamespace is the namespace under which all arbitrary fields are logged, as per the OpenTelemetry spec.

Only for internal use.

Functions

This section is empty.

Types

type Resource

type Resource struct {
	// Name is the logical name of the service. Must be the same for all instances of
	// horizontally scaled services. Optional, and falls back to 'unknown_service' as per
	// the OpenTelemetry spec.
	Name string
	// Namespace helps to distinguish a group of services, for example the team name that
	// owns a group of services. Optional.
	Namespace string
	// Version is the version string of the service API or implementation. For Navegos
	// services, this should be from 'internal/version.Version()'
	Version string
	// InstanceID is the string ID of the service instance. For Navegos services, this
	// should be from 'internal/hostname.Get()'
	//
	// If unset, InstanceID is set to a generated UUID, as per the OpenTelemetry log spec:
	// https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/#service
	InstanceID string
}

Resource represents a service instance.

https://opentelemetry.io/docs/reference/specification/Resource/semantic_conventions/#service

type TraceContext

type TraceContext struct {
	TraceID string
	SpanID  string
}

TraceContext represents a trace to associate with log entries.

https://opentelemetry.io/docs/reference/specification/logs/data-model/#trace-context-fields

Jump to

Keyboard shortcuts

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