semconv

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package semconv defines semantic conventions for OpenTelemetry, like log or trace attributes.

Currently, this package is manually maintained, but the goal is to generate it from a specification.

Index

Constants

View Source
const (
	AttrTaskID    = "task.id"
	AttrTaskTitle = "task.title"

	AttrDBOperation = "db.operation"
	AttrDBResult    = "db.result"
)
View Source
const (
	DBResultOkValue       = "ok"
	DBResultErrorValue    = "error"
	DBResultCanceledValue = "canceled"
)
View Source
const (
	MetricTasksCreated  = "tasks.created.count"
	MetricTasksDeleted  = "tasks.deleted.count"
	MetricTasksReturned = "tasks.returned.count"
)
View Source
const (
	DatabaseOperationCount = "db.operation.count"
	DatabaseOperationTime  = "db.operation.time"
)
View Source
const (
	SystemDatabase = "example.ernado.me/database"
	SystemModel    = "example.ernado.me/model"
	SystemHandler  = "example.ernado.me/handler"
)

Variables

This section is empty.

Functions

func DBOperation

func DBOperation(operation string) attribute.KeyValue

func DBResultError

func DBResultError() attribute.KeyValue

func DBResultOk

func DBResultOk() attribute.KeyValue

func TaskID

func TaskID(id int64) zap.Field

TaskID returns zap field with task ID.

func TaskTitle

func TaskTitle(title string) zap.Field

TaskTitle returns zap field with task title.

Types

This section is empty.

Jump to

Keyboard shortcuts

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