Documentation
¶
Overview ¶
Package httpconv provides types and functionality for OpenTelemetry semantic conventions in the "db" namespace.
Index ¶
- type ClientConnectionCount
- func (m ClientConnectionCount) Add(ctx context.Context, incr int64, clientConnectionPoolName string, ...)
- func (m ClientConnectionCount) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (ClientConnectionCount) Description() string
- func (m ClientConnectionCount) Inst() metric.Int64UpDownCounter
- func (ClientConnectionCount) Name() string
- func (ClientConnectionCount) Unit() string
- type ClientConnectionCreateTime
- func (ClientConnectionCreateTime) Description() string
- func (m ClientConnectionCreateTime) Inst() metric.Float64Histogram
- func (ClientConnectionCreateTime) Name() string
- func (m ClientConnectionCreateTime) Record(ctx context.Context, val float64, clientConnectionPoolName string, ...)
- func (m ClientConnectionCreateTime) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ClientConnectionCreateTime) Unit() string
- type ClientConnectionIdleMax
- func (m ClientConnectionIdleMax) Add(ctx context.Context, incr int64, clientConnectionPoolName string, ...)
- func (m ClientConnectionIdleMax) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (ClientConnectionIdleMax) Description() string
- func (m ClientConnectionIdleMax) Inst() metric.Int64UpDownCounter
- func (ClientConnectionIdleMax) Name() string
- func (ClientConnectionIdleMax) Unit() string
- type ClientConnectionIdleMin
- func (m ClientConnectionIdleMin) Add(ctx context.Context, incr int64, clientConnectionPoolName string, ...)
- func (m ClientConnectionIdleMin) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (ClientConnectionIdleMin) Description() string
- func (m ClientConnectionIdleMin) Inst() metric.Int64UpDownCounter
- func (ClientConnectionIdleMin) Name() string
- func (ClientConnectionIdleMin) Unit() string
- type ClientConnectionMax
- func (m ClientConnectionMax) Add(ctx context.Context, incr int64, clientConnectionPoolName string, ...)
- func (m ClientConnectionMax) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (ClientConnectionMax) Description() string
- func (m ClientConnectionMax) Inst() metric.Int64UpDownCounter
- func (ClientConnectionMax) Name() string
- func (ClientConnectionMax) Unit() string
- type ClientConnectionPendingRequests
- func (m ClientConnectionPendingRequests) Add(ctx context.Context, incr int64, clientConnectionPoolName string, ...)
- func (m ClientConnectionPendingRequests) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (ClientConnectionPendingRequests) Description() string
- func (m ClientConnectionPendingRequests) Inst() metric.Int64UpDownCounter
- func (ClientConnectionPendingRequests) Name() string
- func (ClientConnectionPendingRequests) Unit() string
- type ClientConnectionStateAttr
- type ClientConnectionTimeouts
- func (m ClientConnectionTimeouts) Add(ctx context.Context, incr int64, clientConnectionPoolName string, ...)
- func (m ClientConnectionTimeouts) AddSet(ctx context.Context, incr int64, set attribute.Set)
- func (ClientConnectionTimeouts) Description() string
- func (m ClientConnectionTimeouts) Inst() metric.Int64Counter
- func (ClientConnectionTimeouts) Name() string
- func (ClientConnectionTimeouts) Unit() string
- type ClientConnectionUseTime
- func (ClientConnectionUseTime) Description() string
- func (m ClientConnectionUseTime) Inst() metric.Float64Histogram
- func (ClientConnectionUseTime) Name() string
- func (m ClientConnectionUseTime) Record(ctx context.Context, val float64, clientConnectionPoolName string, ...)
- func (m ClientConnectionUseTime) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ClientConnectionUseTime) Unit() string
- type ClientConnectionWaitTime
- func (ClientConnectionWaitTime) Description() string
- func (m ClientConnectionWaitTime) Inst() metric.Float64Histogram
- func (ClientConnectionWaitTime) Name() string
- func (m ClientConnectionWaitTime) Record(ctx context.Context, val float64, clientConnectionPoolName string, ...)
- func (m ClientConnectionWaitTime) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ClientConnectionWaitTime) Unit() string
- type ClientOperationDuration
- func (ClientOperationDuration) AttrCollectionName(val string) attribute.KeyValue
- func (ClientOperationDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ClientOperationDuration) AttrNamespace(val string) attribute.KeyValue
- func (ClientOperationDuration) AttrNetworkPeerAddress(val string) attribute.KeyValue
- func (ClientOperationDuration) AttrNetworkPeerPort(val int) attribute.KeyValue
- func (ClientOperationDuration) AttrOperationName(val string) attribute.KeyValue
- func (ClientOperationDuration) AttrQuerySummary(val string) attribute.KeyValue
- func (ClientOperationDuration) AttrQueryText(val string) attribute.KeyValue
- func (ClientOperationDuration) AttrResponseStatusCode(val string) attribute.KeyValue
- func (ClientOperationDuration) AttrServerAddress(val string) attribute.KeyValue
- func (ClientOperationDuration) AttrServerPort(val int) attribute.KeyValue
- func (ClientOperationDuration) AttrStoredProcedureName(val string) attribute.KeyValue
- func (ClientOperationDuration) Description() string
- func (m ClientOperationDuration) Inst() metric.Float64Histogram
- func (ClientOperationDuration) Name() string
- func (m ClientOperationDuration) Record(ctx context.Context, val float64, systemName SystemNameAttr, ...)
- func (m ClientOperationDuration) RecordSet(ctx context.Context, val float64, set attribute.Set)
- func (ClientOperationDuration) Unit() string
- type ClientResponseReturnedRows
- func (ClientResponseReturnedRows) AttrCollectionName(val string) attribute.KeyValue
- func (ClientResponseReturnedRows) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (ClientResponseReturnedRows) AttrNamespace(val string) attribute.KeyValue
- func (ClientResponseReturnedRows) AttrNetworkPeerAddress(val string) attribute.KeyValue
- func (ClientResponseReturnedRows) AttrNetworkPeerPort(val int) attribute.KeyValue
- func (ClientResponseReturnedRows) AttrOperationName(val string) attribute.KeyValue
- func (ClientResponseReturnedRows) AttrQuerySummary(val string) attribute.KeyValue
- func (ClientResponseReturnedRows) AttrQueryText(val string) attribute.KeyValue
- func (ClientResponseReturnedRows) AttrResponseStatusCode(val string) attribute.KeyValue
- func (ClientResponseReturnedRows) AttrServerAddress(val string) attribute.KeyValue
- func (ClientResponseReturnedRows) AttrServerPort(val int) attribute.KeyValue
- func (ClientResponseReturnedRows) Description() string
- func (m ClientResponseReturnedRows) Inst() metric.Int64Histogram
- func (ClientResponseReturnedRows) Name() string
- func (m ClientResponseReturnedRows) Record(ctx context.Context, val int64, systemName SystemNameAttr, ...)
- func (m ClientResponseReturnedRows) RecordSet(ctx context.Context, val int64, set attribute.Set)
- func (ClientResponseReturnedRows) Unit() string
- type ErrorTypeAttr
- type SystemNameAttr
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) Description ¶
func (ClientConnectionCount) Description() string
Description returns the semantic convention description of the instrument
func (ClientConnectionCount) Inst ¶
func (m ClientConnectionCount) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (ClientConnectionCount) Name ¶
func (ClientConnectionCount) Name() string
Name returns the semantic convention name of the instrument.
func (ClientConnectionCount) Unit ¶
func (ClientConnectionCount) Unit() string
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 ¶
func (m ClientConnectionCreateTime) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ClientConnectionCreateTime) Name ¶
func (ClientConnectionCreateTime) Name() string
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 ¶
RecordSet records val to the current distribution for set.
func (ClientConnectionCreateTime) Unit ¶
func (ClientConnectionCreateTime) Unit() string
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) Description ¶
func (ClientConnectionIdleMax) Description() string
Description returns the semantic convention description of the instrument
func (ClientConnectionIdleMax) Inst ¶
func (m ClientConnectionIdleMax) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (ClientConnectionIdleMax) Name ¶
func (ClientConnectionIdleMax) Name() string
Name returns the semantic convention name of the instrument.
func (ClientConnectionIdleMax) Unit ¶
func (ClientConnectionIdleMax) Unit() string
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) Description ¶
func (ClientConnectionIdleMin) Description() string
Description returns the semantic convention description of the instrument
func (ClientConnectionIdleMin) Inst ¶
func (m ClientConnectionIdleMin) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (ClientConnectionIdleMin) Name ¶
func (ClientConnectionIdleMin) Name() string
Name returns the semantic convention name of the instrument.
func (ClientConnectionIdleMin) Unit ¶
func (ClientConnectionIdleMin) Unit() string
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) Description ¶
func (ClientConnectionMax) Description() string
Description returns the semantic convention description of the instrument
func (ClientConnectionMax) Inst ¶
func (m ClientConnectionMax) Inst() metric.Int64UpDownCounter
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) Description ¶
func (ClientConnectionPendingRequests) Description() string
Description returns the semantic convention description of the instrument
func (ClientConnectionPendingRequests) Inst ¶
func (m ClientConnectionPendingRequests) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (ClientConnectionPendingRequests) Name ¶
func (ClientConnectionPendingRequests) Name() string
Name returns the semantic convention name of the instrument.
func (ClientConnectionPendingRequests) Unit ¶
func (ClientConnectionPendingRequests) Unit() string
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) Description ¶
func (ClientConnectionTimeouts) Description() string
Description returns the semantic convention description of the instrument
func (ClientConnectionTimeouts) Inst ¶
func (m ClientConnectionTimeouts) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (ClientConnectionTimeouts) Name ¶
func (ClientConnectionTimeouts) Name() string
Name returns the semantic convention name of the instrument.
func (ClientConnectionTimeouts) Unit ¶
func (ClientConnectionTimeouts) Unit() string
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 ¶
func (m ClientConnectionUseTime) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ClientConnectionUseTime) Name ¶
func (ClientConnectionUseTime) Name() string
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 ¶
RecordSet records val to the current distribution for set.
func (ClientConnectionUseTime) Unit ¶
func (ClientConnectionUseTime) Unit() string
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 ¶
func (m ClientConnectionWaitTime) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ClientConnectionWaitTime) Name ¶
func (ClientConnectionWaitTime) Name() string
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 ¶
RecordSet records val to the current distribution for set.
func (ClientConnectionWaitTime) Unit ¶
func (ClientConnectionWaitTime) Unit() string
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 ¶
func (ClientOperationDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
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 ¶
func (m ClientOperationDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (ClientOperationDuration) Name ¶
func (ClientOperationDuration) Name() string
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 ¶
RecordSet records val to the current distribution for set.
Batch operations SHOULD be recorded as a single operation.
func (ClientOperationDuration) Unit ¶
func (ClientOperationDuration) Unit() string
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 ¶
func (ClientResponseReturnedRows) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
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 ¶
func (ClientResponseReturnedRows) 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 (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 ¶
func (ClientResponseReturnedRows) 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 (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 ¶
func (m ClientResponseReturnedRows) Inst() metric.Int64Histogram
Inst returns the underlying metric instrument.
func (ClientResponseReturnedRows) Name ¶
func (ClientResponseReturnedRows) Name() string
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 ¶
RecordSet records val to the current distribution for set.
func (ClientResponseReturnedRows) Unit ¶
func (ClientResponseReturnedRows) Unit() string
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" )