azureconv

package
v1.38.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2025 License: Apache-2.0, BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package httpconv provides types and functionality for OpenTelemetry semantic conventions in the "azure" namespace.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CosmosDBClientActiveInstanceCount

type CosmosDBClientActiveInstanceCount struct {
	metric.Int64UpDownCounter
}

CosmosDBClientActiveInstanceCount is an instrument used to record metric values conforming to the "azure.cosmosdb.client.active_instance.count" semantic conventions. It represents the number of active client instances.

func NewCosmosDBClientActiveInstanceCount

func NewCosmosDBClientActiveInstanceCount(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (CosmosDBClientActiveInstanceCount, error)

NewCosmosDBClientActiveInstanceCount returns a new CosmosDBClientActiveInstanceCount instrument.

func (CosmosDBClientActiveInstanceCount) Add

Add adds incr to the existing count.

All additional attrs passed are included in the recorded value.

func (CosmosDBClientActiveInstanceCount) AttrServerAddress

AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the name of the database host.

func (CosmosDBClientActiveInstanceCount) AttrServerPort

AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.

func (CosmosDBClientActiveInstanceCount) Description

Description returns the semantic convention description of the instrument

func (CosmosDBClientActiveInstanceCount) Inst

Inst returns the underlying metric instrument.

func (CosmosDBClientActiveInstanceCount) Name

Name returns the semantic convention name of the instrument.

func (CosmosDBClientActiveInstanceCount) Unit

Unit returns the semantic convention unit of the instrument

type CosmosDBClientOperationRequestCharge

type CosmosDBClientOperationRequestCharge struct {
	metric.Int64Histogram
}

CosmosDBClientOperationRequestCharge is an instrument used to record metric values conforming to the "azure.cosmosdb.client.operation.request_charge" semantic conventions. It represents the Request units consumed by the operation.

func NewCosmosDBClientOperationRequestCharge

func NewCosmosDBClientOperationRequestCharge(
	m metric.Meter,
	opt ...metric.Int64HistogramOption,
) (CosmosDBClientOperationRequestCharge, error)

NewCosmosDBClientOperationRequestCharge returns a new CosmosDBClientOperationRequestCharge instrument.

func (CosmosDBClientOperationRequestCharge) AttrCosmosDBConsistencyLevel

AttrCosmosDBConsistencyLevel returns an optional attribute for the "azure.cosmosdb.consistency.level" semantic convention. It represents the account or request consistency level.

func (CosmosDBClientOperationRequestCharge) AttrCosmosDBOperationContactedRegions

func (CosmosDBClientOperationRequestCharge) AttrCosmosDBOperationContactedRegions(val ...string) attribute.KeyValue

AttrCosmosDBOperationContactedRegions returns an optional attribute for the "azure.cosmosdb.operation.contacted_regions" semantic convention. It represents the list of regions contacted during operation in the order that they were contacted. If there is more than one region listed, it indicates that the operation was performed on multiple regions i.e. cross-regional call.

func (CosmosDBClientOperationRequestCharge) AttrCosmosDBResponseSubStatusCode

func (CosmosDBClientOperationRequestCharge) AttrCosmosDBResponseSubStatusCode(val int) attribute.KeyValue

AttrCosmosDBResponseSubStatusCode returns an optional attribute for the "azure.cosmosdb.response.sub_status_code" semantic convention. It represents the cosmos DB sub status code.

func (CosmosDBClientOperationRequestCharge) AttrDBCollectionName

AttrDBCollectionName returns an optional attribute for the "db.collection.name" semantic convention. It represents the cosmos DB container name.

func (CosmosDBClientOperationRequestCharge) AttrDBNamespace

AttrDBNamespace returns an optional attribute for the "db.namespace" semantic convention. It represents the name of the database, fully qualified within the server address and port.

func (CosmosDBClientOperationRequestCharge) AttrDBResponseStatusCode

func (CosmosDBClientOperationRequestCharge) AttrDBResponseStatusCode(val string) attribute.KeyValue

AttrDBResponseStatusCode returns an optional attribute for the "db.response.status_code" semantic convention. It represents the database response status code.

func (CosmosDBClientOperationRequestCharge) AttrErrorType

AttrErrorType returns an optional attribute for the "error.type" semantic convention. It represents the describes a class of error the operation ended with.

func (CosmosDBClientOperationRequestCharge) AttrServerAddress

AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the name of the database host.

func (CosmosDBClientOperationRequestCharge) AttrServerPort

AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.

func (CosmosDBClientOperationRequestCharge) Description

Description returns the semantic convention description of the instrument

func (CosmosDBClientOperationRequestCharge) Inst

Inst returns the underlying metric instrument.

func (CosmosDBClientOperationRequestCharge) Name

Name returns the semantic convention name of the instrument.

func (CosmosDBClientOperationRequestCharge) Record

func (m CosmosDBClientOperationRequestCharge) Record(
	ctx context.Context,
	val int64,
	dbOperationName string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution.

The dbOperationName is the the name of the operation or command being executed.

All additional attrs passed are included in the recorded value.

func (CosmosDBClientOperationRequestCharge) Unit

Unit returns the semantic convention unit of the instrument

type CosmosDBConsistencyLevelAttr

type CosmosDBConsistencyLevelAttr string

CosmosDBConsistencyLevelAttr is an attribute conforming to the azure.cosmosdb.consistency.level semantic conventions. It represents the account or request consistency level.

var (
	// CosmosDBConsistencyLevelStrong is the none.
	CosmosDBConsistencyLevelStrong CosmosDBConsistencyLevelAttr = "Strong"
	// CosmosDBConsistencyLevelBoundedStaleness is the none.
	CosmosDBConsistencyLevelBoundedStaleness CosmosDBConsistencyLevelAttr = "BoundedStaleness"
	// CosmosDBConsistencyLevelSession is the none.
	CosmosDBConsistencyLevelSession CosmosDBConsistencyLevelAttr = "Session"
	// CosmosDBConsistencyLevelEventual is the none.
	CosmosDBConsistencyLevelEventual CosmosDBConsistencyLevelAttr = "Eventual"
	// CosmosDBConsistencyLevelConsistentPrefix is the none.
	CosmosDBConsistencyLevelConsistentPrefix CosmosDBConsistencyLevelAttr = "ConsistentPrefix"
)

type ErrorTypeAttr

type ErrorTypeAttr string

ErrorTypeAttr is an attribute conforming to the error.type semantic conventions. It represents the describes a class of error the operation ended with.

var (
	// ErrorTypeOther is a fallback error value to be used when the instrumentation
	// doesn't define a custom value.
	ErrorTypeOther ErrorTypeAttr = "_OTHER"
)