dbconv

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: 2

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientConnectionCount

type ClientConnectionCount struct {
	metric.Int64UpDownCounter
}

ClientConnectionCount is an instrument used to record metric values conforming to the "db.client.connection.count" semantic conventions. It represents the number of connections that are currently in state described by the `state` attribute.

func NewClientConnectionCount

func NewClientConnectionCount(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (ClientConnectionCount, error)

NewClientConnectionCount returns a new ClientConnectionCount instrument.

func (ClientConnectionCount) Add

func (m ClientConnectionCount) Add(
	ctx context.Context,
	incr int64,
	clientConnectionPoolName string,
	clientConnectionState ClientConnectionStateAttr,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The clientConnectionPoolName is the the name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.

The clientConnectionState is the the state of a connection in the pool

func (ClientConnectionCount) AddSet

func (m ClientConnectionCount) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (ClientConnectionCount) Description

func (ClientConnectionCount) Description() string

Description returns the semantic convention description of the instrument

func (ClientConnectionCount) Inst

Inst returns the underlying metric instrument.

func (ClientConnectionCount) Name

Name returns the semantic convention name of the instrument.

func (ClientConnectionCount) Unit

Unit returns the semantic convention unit of the instrument

type ClientConnectionCreateTime

type ClientConnectionCreateTime struct {
	metric.Float64Histogram
}

ClientConnectionCreateTime is an instrument used to record metric values conforming to the "db.client.connection.create_time" semantic conventions. It represents the time it took to create a new connection.

func NewClientConnectionCreateTime

func NewClientConnectionCreateTime(
	m metric.Meter,
	opt ...metric.Float64HistogramOption,
) (ClientConnectionCreateTime, error)

NewClientConnectionCreateTime returns a new ClientConnectionCreateTime instrument.

func (ClientConnectionCreateTime) Description

func (ClientConnectionCreateTime) Description() string

Description returns the semantic convention description of the instrument

func (ClientConnectionCreateTime) Inst

Inst returns the underlying metric instrument.

func (ClientConnectionCreateTime) Name

Name returns the semantic convention name of the instrument.

func (ClientConnectionCreateTime) Record

func (m ClientConnectionCreateTime) Record(
	ctx context.Context,
	val float64,
	clientConnectionPoolName string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The clientConnectionPoolName is the the name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.

func (ClientConnectionCreateTime) RecordSet

func (m ClientConnectionCreateTime) RecordSet(ctx context.Context, val float64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (ClientConnectionCreateTime) Unit

Unit returns the semantic convention unit of the instrument

type ClientConnectionIdleMax

type ClientConnectionIdleMax struct {
	metric.Int64UpDownCounter
}

ClientConnectionIdleMax is an instrument used to record metric values conforming to the "db.client.connection.idle.max" semantic conventions. It represents the maximum number of idle open connections allowed.

func NewClientConnectionIdleMax

func NewClientConnectionIdleMax(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (ClientConnectionIdleMax, error)

NewClientConnectionIdleMax returns a new ClientConnectionIdleMax instrument.

func (ClientConnectionIdleMax) Add

func (m ClientConnectionIdleMax) Add(
	ctx context.Context,
	incr int64,
	clientConnectionPoolName string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The clientConnectionPoolName is the the name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.

func (ClientConnectionIdleMax) AddSet

func (m ClientConnectionIdleMax) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (ClientConnectionIdleMax) Description

func (ClientConnectionIdleMax) Description() string

Description returns the semantic convention description of the instrument

func (ClientConnectionIdleMax) Inst

Inst returns the underlying metric instrument.

func (ClientConnectionIdleMax) Name

Name returns the semantic convention name of the instrument.

func (ClientConnectionIdleMax) Unit

Unit returns the semantic convention unit of the instrument

type ClientConnectionIdleMin

type ClientConnectionIdleMin struct {
	metric.Int64UpDownCounter
}

ClientConnectionIdleMin is an instrument used to record metric values conforming to the "db.client.connection.idle.min" semantic conventions. It represents the minimum number of idle open connections allowed.

func NewClientConnectionIdleMin

func NewClientConnectionIdleMin(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (ClientConnectionIdleMin, error)

NewClientConnectionIdleMin returns a new ClientConnectionIdleMin instrument.

func (ClientConnectionIdleMin) Add

func (m ClientConnectionIdleMin) Add(
	ctx context.Context,
	incr int64,
	clientConnectionPoolName string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The clientConnectionPoolName is the the name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.

func (ClientConnectionIdleMin) AddSet

func (m ClientConnectionIdleMin) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (ClientConnectionIdleMin) Description

func (ClientConnectionIdleMin) Description() string

Description returns the semantic convention description of the instrument

func (ClientConnectionIdleMin) Inst

Inst returns the underlying metric instrument.

func (ClientConnectionIdleMin) Name

Name returns the semantic convention name of the instrument.

func (ClientConnectionIdleMin) Unit

Unit returns the semantic convention unit of the instrument

type ClientConnectionMax

type ClientConnectionMax struct {
	metric.Int64UpDownCounter
}

ClientConnectionMax is an instrument used to record metric values conforming to the "db.client.connection.max" semantic conventions. It represents the maximum number of open connections allowed.

func NewClientConnectionMax

func NewClientConnectionMax(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (ClientConnectionMax, error)

NewClientConnectionMax returns a new ClientConnectionMax instrument.

func (ClientConnectionMax) Add

func (m ClientConnectionMax) Add(
	ctx context.Context,
	incr int64,
	clientConnectionPoolName string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The clientConnectionPoolName is the the name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.

func (ClientConnectionMax) AddSet

func (m ClientConnectionMax) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (ClientConnectionMax) Description

func (ClientConnectionMax) Description() string

Description returns the semantic convention description of the instrument

func (ClientConnectionMax) Inst

Inst returns the underlying metric instrument.

func (ClientConnectionMax) Name

func (ClientConnectionMax) Name() string

Name returns the semantic convention name of the instrument.

func (ClientConnectionMax) Unit

func (ClientConnectionMax) Unit() string

Unit returns the semantic convention unit of the instrument

type ClientConnectionPendingRequests

type ClientConnectionPendingRequests struct {
	metric.Int64UpDownCounter
}

ClientConnectionPendingRequests is an instrument used to record metric values conforming to the "db.client.connection.pending_requests" semantic conventions. It represents the number of current pending requests for an open connection.

func NewClientConnectionPendingRequests

func NewClientConnectionPendingRequests(
	m metric.Meter,
	opt ...metric.Int64UpDownCounterOption,
) (ClientConnectionPendingRequests, error)

NewClientConnectionPendingRequests returns a new ClientConnectionPendingRequests instrument.

func (ClientConnectionPendingRequests) Add

func (m ClientConnectionPendingRequests) Add(
	ctx context.Context,
	incr int64,
	clientConnectionPoolName string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The clientConnectionPoolName is the the name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.

func (ClientConnectionPendingRequests) AddSet

AddSet adds incr to the existing count for set.

func (ClientConnectionPendingRequests) Description

Description returns the semantic convention description of the instrument

func (ClientConnectionPendingRequests) Inst

Inst returns the underlying metric instrument.

func (ClientConnectionPendingRequests) Name

Name returns the semantic convention name of the instrument.

func (ClientConnectionPendingRequests) Unit

Unit returns the semantic convention unit of the instrument

type ClientConnectionStateAttr

type ClientConnectionStateAttr string

ClientConnectionStateAttr is an attribute conforming to the db.client.connection.state semantic conventions. It represents the state of a connection in the pool.

var (
	// ClientConnectionStateIdle is the standardized value "idle" of
	// ClientConnectionStateAttr.
	ClientConnectionStateIdle ClientConnectionStateAttr = "idle"
	// ClientConnectionStateUsed is the standardized value "used" of
	// ClientConnectionStateAttr.
	ClientConnectionStateUsed ClientConnectionStateAttr = "used"
)

type ClientConnectionTimeouts

type ClientConnectionTimeouts struct {
	metric.Int64Counter
}

ClientConnectionTimeouts is an instrument used to record metric values conforming to the "db.client.connection.timeouts" semantic conventions. It represents the number of connection timeouts that have occurred trying to obtain a connection from the pool.

func NewClientConnectionTimeouts

func NewClientConnectionTimeouts(
	m metric.Meter,
	opt ...metric.Int64CounterOption,
) (ClientConnectionTimeouts, error)

NewClientConnectionTimeouts returns a new ClientConnectionTimeouts instrument.

func (ClientConnectionTimeouts) Add

func (m ClientConnectionTimeouts) Add(
	ctx context.Context,
	incr int64,
	clientConnectionPoolName string,
	attrs ...attribute.KeyValue,
)

Add adds incr to the existing count for attrs.

The clientConnectionPoolName is the the name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.

func (ClientConnectionTimeouts) AddSet

func (m ClientConnectionTimeouts) AddSet(ctx context.Context, incr int64, set attribute.Set)

AddSet adds incr to the existing count for set.

func (ClientConnectionTimeouts) Description

func (ClientConnectionTimeouts) Description() string

Description returns the semantic convention description of the instrument

func (ClientConnectionTimeouts) Inst

Inst returns the underlying metric instrument.

func (ClientConnectionTimeouts) Name

Name returns the semantic convention name of the instrument.

func (ClientConnectionTimeouts) Unit

Unit returns the semantic convention unit of the instrument

type ClientConnectionUseTime

type ClientConnectionUseTime struct {
	metric.Float64Histogram
}

ClientConnectionUseTime is an instrument used to record metric values conforming to the "db.client.connection.use_time" semantic conventions. It represents the time between borrowing a connection and returning it to the pool.

func NewClientConnectionUseTime

func NewClientConnectionUseTime(
	m metric.Meter,
	opt ...metric.Float64HistogramOption,
) (ClientConnectionUseTime, error)

NewClientConnectionUseTime returns a new ClientConnectionUseTime instrument.

func (ClientConnectionUseTime) Description

func (ClientConnectionUseTime) Description() string

Description returns the semantic convention description of the instrument

func (ClientConnectionUseTime) Inst

Inst returns the underlying metric instrument.

func (ClientConnectionUseTime) Name

Name returns the semantic convention name of the instrument.

func (ClientConnectionUseTime) Record

func (m ClientConnectionUseTime) Record(
	ctx context.Context,
	val float64,
	clientConnectionPoolName string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The clientConnectionPoolName is the the name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.

func (ClientConnectionUseTime) RecordSet

func (m ClientConnectionUseTime) RecordSet(ctx context.Context, val float64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (ClientConnectionUseTime) Unit

Unit returns the semantic convention unit of the instrument

type ClientConnectionWaitTime

type ClientConnectionWaitTime struct {
	metric.Float64Histogram
}

ClientConnectionWaitTime is an instrument used to record metric values conforming to the "db.client.connection.wait_time" semantic conventions. It represents the time it took to obtain an open connection from the pool.

func NewClientConnectionWaitTime

func NewClientConnectionWaitTime(
	m metric.Meter,
	opt ...metric.Float64HistogramOption,
) (ClientConnectionWaitTime, error)

NewClientConnectionWaitTime returns a new ClientConnectionWaitTime instrument.

func (ClientConnectionWaitTime) Description

func (ClientConnectionWaitTime) Description() string

Description returns the semantic convention description of the instrument

func (ClientConnectionWaitTime) Inst

Inst returns the underlying metric instrument.

func (ClientConnectionWaitTime) Name

Name returns the semantic convention name of the instrument.

func (ClientConnectionWaitTime) Record

func (m ClientConnectionWaitTime) Record(
	ctx context.Context,
	val float64,
	clientConnectionPoolName string,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The clientConnectionPoolName is the the name of the connection pool; unique within the instrumented application. In case the connection pool implementation doesn't provide a name, instrumentation SHOULD use a combination of parameters that would make the name unique, for example, combining attributes `server.address`, `server.port`, and `db.namespace`, formatted as `server.address:server.port/db.namespace`. Instrumentations that generate connection pool name following different patterns SHOULD document it.

func (ClientConnectionWaitTime) RecordSet

func (m ClientConnectionWaitTime) RecordSet(ctx context.Context, val float64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (ClientConnectionWaitTime) Unit

Unit returns the semantic convention unit of the instrument

type ClientOperationDuration

type ClientOperationDuration struct {
	metric.Float64Histogram
}

ClientOperationDuration is an instrument used to record metric values conforming to the "db.client.operation.duration" semantic conventions. It represents the duration of database client operations.

func NewClientOperationDuration

func NewClientOperationDuration(
	m metric.Meter,
	opt ...metric.Float64HistogramOption,
) (ClientOperationDuration, error)

NewClientOperationDuration returns a new ClientOperationDuration instrument.

func (ClientOperationDuration) AttrCollectionName

func (ClientOperationDuration) AttrCollectionName(val string) attribute.KeyValue

AttrCollectionName returns an optional attribute for the "db.collection.name" semantic convention. It represents the name of a collection (table, container) within the database.

func (ClientOperationDuration) 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 (ClientOperationDuration) AttrNamespace

func (ClientOperationDuration) AttrNamespace(val string) attribute.KeyValue

AttrNamespace 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 (ClientOperationDuration) AttrNetworkPeerAddress

func (ClientOperationDuration) AttrNetworkPeerAddress(val string) attribute.KeyValue

AttrNetworkPeerAddress returns an optional attribute for the "network.peer.address" semantic convention. It represents the peer address of the database node where the operation was performed.

func (ClientOperationDuration) AttrNetworkPeerPort

func (ClientOperationDuration) AttrNetworkPeerPort(val int) attribute.KeyValue

AttrNetworkPeerPort returns an optional attribute for the "network.peer.port" semantic convention. It represents the peer port number of the network connection.

func (ClientOperationDuration) AttrOperationName

func (ClientOperationDuration) AttrOperationName(val string) attribute.KeyValue

AttrOperationName returns an optional attribute for the "db.operation.name" semantic convention. It represents the name of the operation or command being executed.

func (ClientOperationDuration) AttrQuerySummary

func (ClientOperationDuration) AttrQuerySummary(val string) attribute.KeyValue

AttrQuerySummary returns an optional attribute for the "db.query.summary" semantic convention. It represents the low cardinality summary of a database query.

func (ClientOperationDuration) AttrQueryText

func (ClientOperationDuration) AttrQueryText(val string) attribute.KeyValue

AttrQueryText returns an optional attribute for the "db.query.text" semantic convention. It represents the database query being executed.

func (ClientOperationDuration) AttrResponseStatusCode

func (ClientOperationDuration) AttrResponseStatusCode(val string) attribute.KeyValue

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

func (ClientOperationDuration) AttrServerAddress

func (ClientOperationDuration) AttrServerAddress(val string) attribute.KeyValue

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

func (ClientOperationDuration) AttrServerPort

func (ClientOperationDuration) AttrServerPort(val int) attribute.KeyValue

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

func (ClientOperationDuration) AttrStoredProcedureName

func (ClientOperationDuration) AttrStoredProcedureName(val string) attribute.KeyValue

AttrStoredProcedureName returns an optional attribute for the "db.stored_procedure.name" semantic convention. It represents the name of a stored procedure within the database.

func (ClientOperationDuration) Description

func (ClientOperationDuration) Description() string

Description returns the semantic convention description of the instrument

func (ClientOperationDuration) Inst

Inst returns the underlying metric instrument.

func (ClientOperationDuration) Name

Name returns the semantic convention name of the instrument.

func (ClientOperationDuration) Record

func (m ClientOperationDuration) Record(
	ctx context.Context,
	val float64,
	systemName SystemNameAttr,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The systemName is the the database management system (DBMS) product as identified by the client instrumentation.

All additional attrs passed are included in the recorded value.

Batch operations SHOULD be recorded as a single operation.

func (ClientOperationDuration) RecordSet

func (m ClientOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set)

RecordSet records val to the current distribution for set.

Batch operations SHOULD be recorded as a single operation.

func (ClientOperationDuration) Unit

Unit returns the semantic convention unit of the instrument

type ClientResponseReturnedRows

type ClientResponseReturnedRows struct {
	metric.Int64Histogram
}

ClientResponseReturnedRows is an instrument used to record metric values conforming to the "db.client.response.returned_rows" semantic conventions. It represents the actual number of records returned by the database operation.

func NewClientResponseReturnedRows

func NewClientResponseReturnedRows(
	m metric.Meter,
	opt ...metric.Int64HistogramOption,
) (ClientResponseReturnedRows, error)

NewClientResponseReturnedRows returns a new ClientResponseReturnedRows instrument.

func (ClientResponseReturnedRows) AttrCollectionName

func (ClientResponseReturnedRows) AttrCollectionName(val string) attribute.KeyValue

AttrCollectionName returns an optional attribute for the "db.collection.name" semantic convention. It represents the name of a collection (table, container) within the database.

func (ClientResponseReturnedRows) 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 (ClientResponseReturnedRows) AttrNamespace

AttrNamespace 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 (ClientResponseReturnedRows) AttrNetworkPeerAddress

func (ClientResponseReturnedRows) AttrNetworkPeerAddress(val string) attribute.KeyValue

AttrNetworkPeerAddress returns an optional attribute for the "network.peer.address" semantic convention. It represents the peer address of the database node where the operation was performed.

func (ClientResponseReturnedRows) AttrNetworkPeerPort

func (ClientResponseReturnedRows) AttrNetworkPeerPort(val int) attribute.KeyValue

AttrNetworkPeerPort returns an optional attribute for the "network.peer.port" semantic convention. It represents the peer port number of the network connection.

func (ClientResponseReturnedRows) AttrOperationName

func (ClientResponseReturnedRows) AttrOperationName(val string) attribute.KeyValue

AttrOperationName returns an optional attribute for the "db.operation.name" semantic convention. It represents the name of the operation or command being executed.

func (ClientResponseReturnedRows) AttrQuerySummary

func (ClientResponseReturnedRows) AttrQuerySummary(val string) attribute.KeyValue

AttrQuerySummary returns an optional attribute for the "db.query.summary" semantic convention. It represents the low cardinality summary of a database query.

func (ClientResponseReturnedRows) AttrQueryText

AttrQueryText returns an optional attribute for the "db.query.text" semantic convention. It represents the database query being executed.

func (ClientResponseReturnedRows) AttrResponseStatusCode

func (ClientResponseReturnedRows) AttrResponseStatusCode(val string) attribute.KeyValue

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

func (ClientResponseReturnedRows) AttrServerAddress

func (ClientResponseReturnedRows) AttrServerAddress(val string) attribute.KeyValue

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

func (ClientResponseReturnedRows) AttrServerPort

func (ClientResponseReturnedRows) AttrServerPort(val int) attribute.KeyValue

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

func (ClientResponseReturnedRows) Description

func (ClientResponseReturnedRows) Description() string

Description returns the semantic convention description of the instrument

func (ClientResponseReturnedRows) Inst

Inst returns the underlying metric instrument.

func (ClientResponseReturnedRows) Name

Name returns the semantic convention name of the instrument.

func (ClientResponseReturnedRows) Record

func (m ClientResponseReturnedRows) Record(
	ctx context.Context,
	val int64,
	systemName SystemNameAttr,
	attrs ...attribute.KeyValue,
)

Record records val to the current distribution for attrs.

The systemName is the the database management system (DBMS) product as identified by the client instrumentation.

All additional attrs passed are included in the recorded value.

func (ClientResponseReturnedRows) RecordSet

func (m ClientResponseReturnedRows) RecordSet(ctx context.Context, val int64, set attribute.Set)

RecordSet records val to the current distribution for set.

func (ClientResponseReturnedRows) Unit

Unit returns the semantic convention unit of the instrument

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"
)

type SystemNameAttr

type SystemNameAttr string

SystemNameAttr is an attribute conforming to the db.system.name semantic conventions. It represents the database management system (DBMS) product as identified by the client instrumentation.

var (
	// SystemNameOtherSQL is the some other SQL database. Fallback only.
	SystemNameOtherSQL SystemNameAttr = "other_sql"
	// SystemNameSoftwareagAdabas is the [Adabas (Adaptable Database System)].
	//
	// [Adabas (Adaptable Database System)]: https://documentation.softwareag.com/?pf=adabas
	SystemNameSoftwareagAdabas SystemNameAttr = "softwareag.adabas"
	// SystemNameActianIngres is the [Actian Ingres].
	//
	// [Actian Ingres]: https://www.actian.com/databases/ingres/
	SystemNameActianIngres SystemNameAttr = "actian.ingres"
	// SystemNameAWSDynamoDB is the [Amazon DynamoDB].
	//
	// [Amazon DynamoDB]: https://aws.amazon.com/pm/dynamodb/
	SystemNameAWSDynamoDB SystemNameAttr = "aws.dynamodb"
	// SystemNameAWSRedshift is the [Amazon Redshift].
	//
	// [Amazon Redshift]: https://aws.amazon.com/redshift/
	SystemNameAWSRedshift SystemNameAttr = "aws.redshift"
	// SystemNameAzureCosmosDB is the [Azure Cosmos DB].
	//
	// [Azure Cosmos DB]: https://learn.microsoft.com/azure/cosmos-db
	SystemNameAzureCosmosDB SystemNameAttr = "azure.cosmosdb"
	// SystemNameIntersystemsCache is the [InterSystems Caché].
	//
	// [InterSystems Caché]: https://www.intersystems.com/products/cache/
	SystemNameIntersystemsCache SystemNameAttr = "intersystems.cache"
	// SystemNameCassandra is the [Apache Cassandra].
	//
	// [Apache Cassandra]: https://cassandra.apache.org/
	SystemNameCassandra SystemNameAttr = "cassandra"
	// SystemNameClickHouse is the [ClickHouse].
	//
	// [ClickHouse]: https://clickhouse.com/
	SystemNameClickHouse SystemNameAttr = "clickhouse"
	// SystemNameCockroachDB is the [CockroachDB].
	//
	// [CockroachDB]: https://www.cockroachlabs.com/
	SystemNameCockroachDB SystemNameAttr = "cockroachdb"
	// SystemNameCouchbase is the [Couchbase].
	//
	// [Couchbase]: https://www.couchbase.com/
	SystemNameCouchbase SystemNameAttr = "couchbase"
	// SystemNameCouchDB is the [Apache CouchDB].
	//
	// [Apache CouchDB]: https://couchdb.apache.org/
	SystemNameCouchDB SystemNameAttr = "couchdb"
	// SystemNameDerby is the [Apache Derby].
	//
	// [Apache Derby]: https://db.apache.org/derby/
	SystemNameDerby SystemNameAttr = "derby"
	// SystemNameElasticsearch is the [Elasticsearch].
	//
	// [Elasticsearch]: https://www.elastic.co/elasticsearch
	SystemNameElasticsearch SystemNameAttr = "elasticsearch"
	// SystemNameFirebirdSQL is the [Firebird].
	//
	// [Firebird]: https://www.firebirdsql.org/
	SystemNameFirebirdSQL SystemNameAttr = "firebirdsql"
	// SystemNameGCPSpanner is the [Google Cloud Spanner].
	//
	// [Google Cloud Spanner]: https://cloud.google.com/spanner
	SystemNameGCPSpanner SystemNameAttr = "gcp.spanner"
	// SystemNameGeode is the [Apache Geode].
	//
	// [Apache Geode]: https://geode.apache.org/
	SystemNameGeode SystemNameAttr = "geode"
	// SystemNameH2database is the [H2 Database].
	//
	// [H2 Database]: https://h2database.com/
	SystemNameH2database SystemNameAttr = "h2database"
	// SystemNameHBase is the [Apache HBase].
	//
	// [Apache HBase]: https://hbase.apache.org/
	SystemNameHBase SystemNameAttr = "hbase"
	// SystemNameHive is the [Apache Hive].
	//
	// [Apache Hive]: https://hive.apache.org/
	SystemNameHive SystemNameAttr = "hive"
	// SystemNameHSQLDB is the [HyperSQL Database].
	//
	// [HyperSQL Database]: https://hsqldb.org/
	SystemNameHSQLDB SystemNameAttr = "hsqldb"
	// SystemNameIBMDB2 is the [IBM Db2].
	//
	// [IBM Db2]: https://www.ibm.com/db2
	SystemNameIBMDB2 SystemNameAttr = "ibm.db2"
	// SystemNameIBMInformix is the [IBM Informix].
	//
	// [IBM Informix]: https://www.ibm.com/products/informix
	SystemNameIBMInformix SystemNameAttr = "ibm.informix"
	// SystemNameIBMNetezza is the [IBM Netezza].
	//
	// [IBM Netezza]: https://www.ibm.com/products/netezza
	SystemNameIBMNetezza SystemNameAttr = "ibm.netezza"
	// SystemNameInfluxDB is the [InfluxDB].
	//
	// [InfluxDB]: https://www.influxdata.com/
	SystemNameInfluxDB SystemNameAttr = "influxdb"
	// SystemNameInstantDB is the [Instant].
	//
	// [Instant]: https://www.instantdb.com/
	SystemNameInstantDB SystemNameAttr = "instantdb"
	// SystemNameMariaDB is the [MariaDB].
	//
	// [MariaDB]: https://mariadb.org/
	SystemNameMariaDB SystemNameAttr = "mariadb"
	// SystemNameMemcached is the [Memcached].
	//
	// [Memcached]: https://memcached.org/
	SystemNameMemcached SystemNameAttr = "memcached"
	// SystemNameMongoDB is the [MongoDB].
	//
	// [MongoDB]: https://www.mongodb.com/
	SystemNameMongoDB SystemNameAttr = "mongodb"
	// SystemNameMicrosoftSQLServer is the [Microsoft SQL Server].
	//
	// [Microsoft SQL Server]: https://www.microsoft.com/sql-server
	SystemNameMicrosoftSQLServer SystemNameAttr = "microsoft.sql_server"
	// SystemNameMySQL is the [MySQL].
	//
	// [MySQL]: https://www.mysql.com/
	SystemNameMySQL SystemNameAttr = "mysql"
	// SystemNameNeo4j is the [Neo4j].
	//
	// [Neo4j]: https://neo4j.com/
	SystemNameNeo4j SystemNameAttr = "neo4j"
	// SystemNameOpenSearch is the [OpenSearch].
	//
	// [OpenSearch]: https://opensearch.org/
	SystemNameOpenSearch SystemNameAttr = "opensearch"
	// SystemNameOracleDB is the [Oracle Database].
	//
	// [Oracle Database]: https://www.oracle.com/database/
	SystemNameOracleDB SystemNameAttr = "oracle.db"
	// SystemNamePostgreSQL is the [PostgreSQL].
	//
	// [PostgreSQL]: https://www.postgresql.org/
	SystemNamePostgreSQL SystemNameAttr = "postgresql"
	// SystemNameRedis is the [Redis].
	//
	// [Redis]: https://redis.io/
	SystemNameRedis SystemNameAttr = "redis"
	// SystemNameSAPHANA is the [SAP HANA].
	//
	// [SAP HANA]: https://www.sap.com/products/technology-platform/hana/what-is-sap-hana.html
	SystemNameSAPHANA SystemNameAttr = "sap.hana"
	// SystemNameSAPMaxDB is the [SAP MaxDB].
	//
	// [SAP MaxDB]: https://maxdb.sap.com/
	SystemNameSAPMaxDB SystemNameAttr = "sap.maxdb"
	// SystemNameSQLite is the [SQLite].
	//
	// [SQLite]: https://www.sqlite.org/
	SystemNameSQLite SystemNameAttr = "sqlite"
	// SystemNameTeradata is the [Teradata].
	//
	// [Teradata]: https://www.teradata.com/
	SystemNameTeradata SystemNameAttr = "teradata"
	// SystemNameTrino is the [Trino].
	//
	// [Trino]: https://trino.io/
	SystemNameTrino SystemNameAttr = "trino"
)