package otelconv
import "go.opentelemetry.io/otel/semconv/v1.32.0/otelconv"
Package httpconv provides types and functionality for OpenTelemetry semantic conventions in the "otel" namespace.
Index ¶
- type ComponentTypeAttr
- type ErrorTypeAttr
- type SDKExporterLogExported
- func NewSDKExporterLogExported( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKExporterLogExported, error)
- func (m SDKExporterLogExported) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKExporterLogExported) AttrComponentName(val string) attribute.KeyValue
- func (SDKExporterLogExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKExporterLogExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (SDKExporterLogExported) AttrServerAddress(val string) attribute.KeyValue
- func (SDKExporterLogExported) AttrServerPort(val int) attribute.KeyValue
- func (SDKExporterLogExported) Description() string
- func (m SDKExporterLogExported) Inst() metric.Int64Counter
- func (SDKExporterLogExported) Name() string
- func (SDKExporterLogExported) Unit() string
- type SDKExporterLogInflight
- func NewSDKExporterLogInflight( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKExporterLogInflight, error)
- func (m SDKExporterLogInflight) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKExporterLogInflight) AttrComponentName(val string) attribute.KeyValue
- func (SDKExporterLogInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKExporterLogInflight) AttrServerAddress(val string) attribute.KeyValue
- func (SDKExporterLogInflight) AttrServerPort(val int) attribute.KeyValue
- func (SDKExporterLogInflight) Description() string
- func (m SDKExporterLogInflight) Inst() metric.Int64UpDownCounter
- func (SDKExporterLogInflight) Name() string
- func (SDKExporterLogInflight) Unit() string
- type SDKExporterSpanExportedCount
- func NewSDKExporterSpanExportedCount( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKExporterSpanExportedCount, error)
- func (m SDKExporterSpanExportedCount) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKExporterSpanExportedCount) AttrComponentName(val string) attribute.KeyValue
- func (SDKExporterSpanExportedCount) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKExporterSpanExportedCount) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (SDKExporterSpanExportedCount) AttrServerAddress(val string) attribute.KeyValue
- func (SDKExporterSpanExportedCount) AttrServerPort(val int) attribute.KeyValue
- func (SDKExporterSpanExportedCount) Description() string
- func (m SDKExporterSpanExportedCount) Inst() metric.Int64Counter
- func (SDKExporterSpanExportedCount) Name() string
- func (SDKExporterSpanExportedCount) Unit() string
- type SDKExporterSpanInflightCount
- func NewSDKExporterSpanInflightCount( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKExporterSpanInflightCount, error)
- func (m SDKExporterSpanInflightCount) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKExporterSpanInflightCount) AttrComponentName(val string) attribute.KeyValue
- func (SDKExporterSpanInflightCount) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKExporterSpanInflightCount) AttrServerAddress(val string) attribute.KeyValue
- func (SDKExporterSpanInflightCount) AttrServerPort(val int) attribute.KeyValue
- func (SDKExporterSpanInflightCount) Description() string
- func (m SDKExporterSpanInflightCount) Inst() metric.Int64UpDownCounter
- func (SDKExporterSpanInflightCount) Name() string
- func (SDKExporterSpanInflightCount) Unit() string
- type SDKLogCreated
- func NewSDKLogCreated( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKLogCreated, error)
- func (m SDKLogCreated) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (SDKLogCreated) Description() string
- func (m SDKLogCreated) Inst() metric.Int64Counter
- func (SDKLogCreated) Name() string
- func (SDKLogCreated) Unit() string
- type SDKProcessorLogProcessed
- func NewSDKProcessorLogProcessed( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKProcessorLogProcessed, error)
- func (m SDKProcessorLogProcessed) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKProcessorLogProcessed) AttrComponentName(val string) attribute.KeyValue
- func (SDKProcessorLogProcessed) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKProcessorLogProcessed) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (SDKProcessorLogProcessed) Description() string
- func (m SDKProcessorLogProcessed) Inst() metric.Int64Counter
- func (SDKProcessorLogProcessed) Name() string
- func (SDKProcessorLogProcessed) Unit() string
- type SDKProcessorLogQueueCapacity
- func NewSDKProcessorLogQueueCapacity( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorLogQueueCapacity, error)
- func (m SDKProcessorLogQueueCapacity) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKProcessorLogQueueCapacity) AttrComponentName(val string) attribute.KeyValue
- func (SDKProcessorLogQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKProcessorLogQueueCapacity) Description() string
- func (m SDKProcessorLogQueueCapacity) Inst() metric.Int64UpDownCounter
- func (SDKProcessorLogQueueCapacity) Name() string
- func (SDKProcessorLogQueueCapacity) Unit() string
- type SDKProcessorLogQueueSize
- func NewSDKProcessorLogQueueSize( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorLogQueueSize, error)
- func (m SDKProcessorLogQueueSize) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKProcessorLogQueueSize) AttrComponentName(val string) attribute.KeyValue
- func (SDKProcessorLogQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKProcessorLogQueueSize) Description() string
- func (m SDKProcessorLogQueueSize) Inst() metric.Int64UpDownCounter
- func (SDKProcessorLogQueueSize) Name() string
- func (SDKProcessorLogQueueSize) Unit() string
- type SDKProcessorSpanProcessedCount
- func NewSDKProcessorSpanProcessedCount( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKProcessorSpanProcessedCount, error)
- func (m SDKProcessorSpanProcessedCount) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKProcessorSpanProcessedCount) AttrComponentName(val string) attribute.KeyValue
- func (SDKProcessorSpanProcessedCount) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKProcessorSpanProcessedCount) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (SDKProcessorSpanProcessedCount) Description() string
- func (m SDKProcessorSpanProcessedCount) Inst() metric.Int64Counter
- func (SDKProcessorSpanProcessedCount) Name() string
- func (SDKProcessorSpanProcessedCount) Unit() string
- type SDKProcessorSpanQueueCapacity
- func NewSDKProcessorSpanQueueCapacity( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorSpanQueueCapacity, error)
- func (m SDKProcessorSpanQueueCapacity) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKProcessorSpanQueueCapacity) AttrComponentName(val string) attribute.KeyValue
- func (SDKProcessorSpanQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKProcessorSpanQueueCapacity) Description() string
- func (m SDKProcessorSpanQueueCapacity) Inst() metric.Int64UpDownCounter
- func (SDKProcessorSpanQueueCapacity) Name() string
- func (SDKProcessorSpanQueueCapacity) Unit() string
- type SDKProcessorSpanQueueSize
- func NewSDKProcessorSpanQueueSize( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorSpanQueueSize, error)
- func (m SDKProcessorSpanQueueSize) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKProcessorSpanQueueSize) AttrComponentName(val string) attribute.KeyValue
- func (SDKProcessorSpanQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKProcessorSpanQueueSize) Description() string
- func (m SDKProcessorSpanQueueSize) Inst() metric.Int64UpDownCounter
- func (SDKProcessorSpanQueueSize) Name() string
- func (SDKProcessorSpanQueueSize) Unit() string
- type SDKSpanEndedCount
- func NewSDKSpanEndedCount( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKSpanEndedCount, error)
- func (m SDKSpanEndedCount) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKSpanEndedCount) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue
- func (SDKSpanEndedCount) Description() string
- func (m SDKSpanEndedCount) Inst() metric.Int64Counter
- func (SDKSpanEndedCount) Name() string
- func (SDKSpanEndedCount) Unit() string
- type SDKSpanLiveCount
- func NewSDKSpanLiveCount( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKSpanLiveCount, error)
- func (m SDKSpanLiveCount) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
- func (SDKSpanLiveCount) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue
- func (SDKSpanLiveCount) Description() string
- func (m SDKSpanLiveCount) Inst() metric.Int64UpDownCounter
- func (SDKSpanLiveCount) Name() string
- func (SDKSpanLiveCount) Unit() string
- type SpanSamplingResultAttr
Types ¶
type ComponentTypeAttr ¶
type ComponentTypeAttr string
ComponentTypeAttr is an attribute conforming to the otel.component.type semantic conventions. It represents a name identifying the type of the OpenTelemetry component.
var ( // ComponentTypeBatchingSpanProcessor is the builtin SDK Batching Span // Processor. ComponentTypeBatchingSpanProcessor ComponentTypeAttr = "batching_span_processor" // ComponentTypeSimpleSpanProcessor is the builtin SDK Simple Span Processor. ComponentTypeSimpleSpanProcessor ComponentTypeAttr = "simple_span_processor" // ComponentTypeBatchingLogProcessor is the builtin SDK Batching LogRecord // Processor. ComponentTypeBatchingLogProcessor ComponentTypeAttr = "batching_log_processor" // ComponentTypeSimpleLogProcessor is the builtin SDK Simple LogRecord // Processor. ComponentTypeSimpleLogProcessor ComponentTypeAttr = "simple_log_processor" // ComponentTypeOtlpGRPCSpanExporter is the OTLP span exporter over gRPC with // protobuf serialization. ComponentTypeOtlpGRPCSpanExporter ComponentTypeAttr = "otlp_grpc_span_exporter" // ComponentTypeOtlpHTTPSpanExporter is the OTLP span exporter over HTTP with // protobuf serialization. ComponentTypeOtlpHTTPSpanExporter ComponentTypeAttr = "otlp_http_span_exporter" // ComponentTypeOtlpHTTPJSONSpanExporter is the OTLP span exporter over HTTP // with JSON serialization. ComponentTypeOtlpHTTPJSONSpanExporter ComponentTypeAttr = "otlp_http_json_span_exporter" // ComponentTypeOtlpGRPCLogExporter is the OTLP LogRecord exporter over gRPC // with protobuf serialization. ComponentTypeOtlpGRPCLogExporter ComponentTypeAttr = "otlp_grpc_log_exporter" // ComponentTypeOtlpHTTPLogExporter is the OTLP LogRecord exporter over HTTP // with protobuf serialization. ComponentTypeOtlpHTTPLogExporter ComponentTypeAttr = "otlp_http_log_exporter" // ComponentTypeOtlpHTTPJSONLogExporter is the OTLP LogRecord exporter over HTTP // with JSON serialization. ComponentTypeOtlpHTTPJSONLogExporter ComponentTypeAttr = "otlp_http_json_log_exporter" )
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 SDKExporterLogExported ¶
type SDKExporterLogExported struct {
metric.Int64Counter
}
SDKExporterLogExported is an instrument used to record metric values conforming to the "otel.sdk.exporter.log.exported" semantic conventions. It represents the number of log records for which the export has finished, either successful or failed.
func NewSDKExporterLogExported ¶
func NewSDKExporterLogExported( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKExporterLogExported, error)
NewSDKExporterLogExported returns a new SDKExporterLogExported instrument.
func (SDKExporterLogExported) Add ¶
func (m SDKExporterLogExported) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` must contain the failure cause. For exporters with partial success semantics (e.g. OTLP with `rejected_log_records`), rejected log records must count as failed and only non-rejected log records count as success. If no rejection reason is available, `rejected` SHOULD be used as value for `error.type`.
func (SDKExporterLogExported) AttrComponentName ¶
func (SDKExporterLogExported) AttrComponentName(val string) attribute.KeyValue
AttrComponentName returns an optional attribute for the "otel.component.name" semantic convention. It represents a name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
func (SDKExporterLogExported) AttrComponentType ¶
func (SDKExporterLogExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
AttrComponentType returns an optional attribute for the "otel.component.type" semantic convention. It represents a name identifying the type of the OpenTelemetry component.
func (SDKExporterLogExported) AttrErrorType ¶
func (SDKExporterLogExported) 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 (SDKExporterLogExported) AttrServerAddress ¶
func (SDKExporterLogExported) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
func (SDKExporterLogExported) AttrServerPort ¶
func (SDKExporterLogExported) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (SDKExporterLogExported) Description ¶
func (SDKExporterLogExported) Description() string
Description returns the semantic convention description of the instrument
func (SDKExporterLogExported) Inst ¶
func (m SDKExporterLogExported) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (SDKExporterLogExported) Name ¶
func (SDKExporterLogExported) Name() string
Name returns the semantic convention name of the instrument.
func (SDKExporterLogExported) Unit ¶
func (SDKExporterLogExported) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKExporterLogInflight ¶
type SDKExporterLogInflight struct {
metric.Int64UpDownCounter
}
SDKExporterLogInflight is an instrument used to record metric values conforming to the "otel.sdk.exporter.log.inflight" semantic conventions. It represents the number of log records which were passed to the exporter, but that have not been exported yet (neither successful, nor failed).
func NewSDKExporterLogInflight ¶
func NewSDKExporterLogInflight( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKExporterLogInflight, error)
NewSDKExporterLogInflight returns a new SDKExporterLogInflight instrument.
func (SDKExporterLogInflight) Add ¶
func (m SDKExporterLogInflight) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` must contain the failure cause.
func (SDKExporterLogInflight) AttrComponentName ¶
func (SDKExporterLogInflight) AttrComponentName(val string) attribute.KeyValue
AttrComponentName returns an optional attribute for the "otel.component.name" semantic convention. It represents a name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
func (SDKExporterLogInflight) AttrComponentType ¶
func (SDKExporterLogInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
AttrComponentType returns an optional attribute for the "otel.component.type" semantic convention. It represents a name identifying the type of the OpenTelemetry component.
func (SDKExporterLogInflight) AttrServerAddress ¶
func (SDKExporterLogInflight) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
func (SDKExporterLogInflight) AttrServerPort ¶
func (SDKExporterLogInflight) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (SDKExporterLogInflight) Description ¶
func (SDKExporterLogInflight) Description() string
Description returns the semantic convention description of the instrument
func (SDKExporterLogInflight) Inst ¶
func (m SDKExporterLogInflight) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (SDKExporterLogInflight) Name ¶
func (SDKExporterLogInflight) Name() string
Name returns the semantic convention name of the instrument.
func (SDKExporterLogInflight) Unit ¶
func (SDKExporterLogInflight) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKExporterSpanExportedCount ¶
type SDKExporterSpanExportedCount struct {
metric.Int64Counter
}
SDKExporterSpanExportedCount is an instrument used to record metric values conforming to the "otel.sdk.exporter.span.exported.count" semantic conventions. It represents the number of spans for which the export has finished, either successful or failed.
func NewSDKExporterSpanExportedCount ¶
func NewSDKExporterSpanExportedCount( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKExporterSpanExportedCount, error)
NewSDKExporterSpanExportedCount returns a new SDKExporterSpanExportedCount instrument.
func (SDKExporterSpanExportedCount) Add ¶
func (m SDKExporterSpanExportedCount) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` must contain the failure cause. For exporters with partial success semantics (e.g. OTLP with `rejected_spans` ), rejected spans must count as failed and only non-rejected spans count as success. If no rejection reason is available, `rejected` SHOULD be used as value for `error.type`.
func (SDKExporterSpanExportedCount) AttrComponentName ¶
func (SDKExporterSpanExportedCount) AttrComponentName(val string) attribute.KeyValue
AttrComponentName returns an optional attribute for the "otel.component.name" semantic convention. It represents a name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
func (SDKExporterSpanExportedCount) AttrComponentType ¶
func (SDKExporterSpanExportedCount) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
AttrComponentType returns an optional attribute for the "otel.component.type" semantic convention. It represents a name identifying the type of the OpenTelemetry component.
func (SDKExporterSpanExportedCount) AttrErrorType ¶
func (SDKExporterSpanExportedCount) 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 (SDKExporterSpanExportedCount) AttrServerAddress ¶
func (SDKExporterSpanExportedCount) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
func (SDKExporterSpanExportedCount) AttrServerPort ¶
func (SDKExporterSpanExportedCount) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (SDKExporterSpanExportedCount) Description ¶
func (SDKExporterSpanExportedCount) Description() string
Description returns the semantic convention description of the instrument
func (SDKExporterSpanExportedCount) Inst ¶
func (m SDKExporterSpanExportedCount) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (SDKExporterSpanExportedCount) Name ¶
func (SDKExporterSpanExportedCount) Name() string
Name returns the semantic convention name of the instrument.
func (SDKExporterSpanExportedCount) Unit ¶
func (SDKExporterSpanExportedCount) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKExporterSpanInflightCount ¶
type SDKExporterSpanInflightCount struct {
metric.Int64UpDownCounter
}
SDKExporterSpanInflightCount is an instrument used to record metric values conforming to the "otel.sdk.exporter.span.inflight.count" semantic conventions. It represents the number of spans which were passed to the exporter, but that have not been exported yet (neither successful, nor failed).
func NewSDKExporterSpanInflightCount ¶
func NewSDKExporterSpanInflightCount( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKExporterSpanInflightCount, error)
NewSDKExporterSpanInflightCount returns a new SDKExporterSpanInflightCount instrument.
func (SDKExporterSpanInflightCount) Add ¶
func (m SDKExporterSpanInflightCount) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
For successful exports, `error.type` MUST NOT be set. For failed exports, `error.type` must contain the failure cause.
func (SDKExporterSpanInflightCount) AttrComponentName ¶
func (SDKExporterSpanInflightCount) AttrComponentName(val string) attribute.KeyValue
AttrComponentName returns an optional attribute for the "otel.component.name" semantic convention. It represents a name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
func (SDKExporterSpanInflightCount) AttrComponentType ¶
func (SDKExporterSpanInflightCount) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
AttrComponentType returns an optional attribute for the "otel.component.type" semantic convention. It represents a name identifying the type of the OpenTelemetry component.
func (SDKExporterSpanInflightCount) AttrServerAddress ¶
func (SDKExporterSpanInflightCount) AttrServerAddress(val string) attribute.KeyValue
AttrServerAddress returns an optional attribute for the "server.address" semantic convention. It represents the server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.
func (SDKExporterSpanInflightCount) AttrServerPort ¶
func (SDKExporterSpanInflightCount) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (SDKExporterSpanInflightCount) Description ¶
func (SDKExporterSpanInflightCount) Description() string
Description returns the semantic convention description of the instrument
func (SDKExporterSpanInflightCount) Inst ¶
func (m SDKExporterSpanInflightCount) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (SDKExporterSpanInflightCount) Name ¶
func (SDKExporterSpanInflightCount) Name() string
Name returns the semantic convention name of the instrument.
func (SDKExporterSpanInflightCount) Unit ¶
func (SDKExporterSpanInflightCount) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKLogCreated ¶
type SDKLogCreated struct {
metric.Int64Counter
}
SDKLogCreated is an instrument used to record metric values conforming to the "otel.sdk.log.created" semantic conventions. It represents the number of logs submitted to enabled SDK Loggers.
func NewSDKLogCreated ¶
func NewSDKLogCreated( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKLogCreated, error)
NewSDKLogCreated returns a new SDKLogCreated instrument.
func (SDKLogCreated) Add ¶
Add adds incr to the existing count.
func (SDKLogCreated) Description ¶
func (SDKLogCreated) Description() string
Description returns the semantic convention description of the instrument
func (SDKLogCreated) Inst ¶
func (m SDKLogCreated) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (SDKLogCreated) Name ¶
func (SDKLogCreated) Name() string
Name returns the semantic convention name of the instrument.
func (SDKLogCreated) Unit ¶
func (SDKLogCreated) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKProcessorLogProcessed ¶
type SDKProcessorLogProcessed struct {
metric.Int64Counter
}
SDKProcessorLogProcessed is an instrument used to record metric values conforming to the "otel.sdk.processor.log.processed" semantic conventions. It represents the number of log records for which the processing has finished, either successful or failed.
func NewSDKProcessorLogProcessed ¶
func NewSDKProcessorLogProcessed( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKProcessorLogProcessed, error)
NewSDKProcessorLogProcessed returns a new SDKProcessorLogProcessed instrument.
func (SDKProcessorLogProcessed) Add ¶
func (m SDKProcessorLogProcessed) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
For successful processing, `error.type` MUST NOT be set. For failed processing, `error.type` must contain the failure cause. For the SDK Simple and Batching Log Record Processor a log record is considered to be processed already when it has been submitted to the exporter, not when the corresponding export call has finished.
func (SDKProcessorLogProcessed) AttrComponentName ¶
func (SDKProcessorLogProcessed) AttrComponentName(val string) attribute.KeyValue
AttrComponentName returns an optional attribute for the "otel.component.name" semantic convention. It represents a name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
func (SDKProcessorLogProcessed) AttrComponentType ¶
func (SDKProcessorLogProcessed) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
AttrComponentType returns an optional attribute for the "otel.component.type" semantic convention. It represents a name identifying the type of the OpenTelemetry component.
func (SDKProcessorLogProcessed) AttrErrorType ¶
func (SDKProcessorLogProcessed) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
AttrErrorType returns an optional attribute for the "error.type" semantic convention. It represents a low-cardinality description of the failure reason. SDK Batching Log Record Processors MUST use `queue_full` for log records dropped due to a full queue.
func (SDKProcessorLogProcessed) Description ¶
func (SDKProcessorLogProcessed) Description() string
Description returns the semantic convention description of the instrument
func (SDKProcessorLogProcessed) Inst ¶
func (m SDKProcessorLogProcessed) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (SDKProcessorLogProcessed) Name ¶
func (SDKProcessorLogProcessed) Name() string
Name returns the semantic convention name of the instrument.
func (SDKProcessorLogProcessed) Unit ¶
func (SDKProcessorLogProcessed) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKProcessorLogQueueCapacity ¶
type SDKProcessorLogQueueCapacity struct {
metric.Int64UpDownCounter
}
SDKProcessorLogQueueCapacity is an instrument used to record metric values conforming to the "otel.sdk.processor.log.queue.capacity" semantic conventions. It represents the maximum number of log records the queue of a given instance of an SDK Log Record processor can hold.
func NewSDKProcessorLogQueueCapacity ¶
func NewSDKProcessorLogQueueCapacity( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorLogQueueCapacity, error)
NewSDKProcessorLogQueueCapacity returns a new SDKProcessorLogQueueCapacity instrument.
func (SDKProcessorLogQueueCapacity) Add ¶
func (m SDKProcessorLogQueueCapacity) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
Only applies to Log Record processors which use a queue, e.g. the SDK Batching Log Record Processor.
func (SDKProcessorLogQueueCapacity) AttrComponentName ¶
func (SDKProcessorLogQueueCapacity) AttrComponentName(val string) attribute.KeyValue
AttrComponentName returns an optional attribute for the "otel.component.name" semantic convention. It represents a name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
func (SDKProcessorLogQueueCapacity) AttrComponentType ¶
func (SDKProcessorLogQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
AttrComponentType returns an optional attribute for the "otel.component.type" semantic convention. It represents a name identifying the type of the OpenTelemetry component.
func (SDKProcessorLogQueueCapacity) Description ¶
func (SDKProcessorLogQueueCapacity) Description() string
Description returns the semantic convention description of the instrument
func (SDKProcessorLogQueueCapacity) Inst ¶
func (m SDKProcessorLogQueueCapacity) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (SDKProcessorLogQueueCapacity) Name ¶
func (SDKProcessorLogQueueCapacity) Name() string
Name returns the semantic convention name of the instrument.
func (SDKProcessorLogQueueCapacity) Unit ¶
func (SDKProcessorLogQueueCapacity) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKProcessorLogQueueSize ¶
type SDKProcessorLogQueueSize struct {
metric.Int64UpDownCounter
}
SDKProcessorLogQueueSize is an instrument used to record metric values conforming to the "otel.sdk.processor.log.queue.size" semantic conventions. It represents the number of log records in the queue of a given instance of an SDK log processor.
func NewSDKProcessorLogQueueSize ¶
func NewSDKProcessorLogQueueSize( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorLogQueueSize, error)
NewSDKProcessorLogQueueSize returns a new SDKProcessorLogQueueSize instrument.
func (SDKProcessorLogQueueSize) Add ¶
func (m SDKProcessorLogQueueSize) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
Only applies to log record processors which use a queue, e.g. the SDK Batching Log Record Processor.
func (SDKProcessorLogQueueSize) AttrComponentName ¶
func (SDKProcessorLogQueueSize) AttrComponentName(val string) attribute.KeyValue
AttrComponentName returns an optional attribute for the "otel.component.name" semantic convention. It represents a name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
func (SDKProcessorLogQueueSize) AttrComponentType ¶
func (SDKProcessorLogQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
AttrComponentType returns an optional attribute for the "otel.component.type" semantic convention. It represents a name identifying the type of the OpenTelemetry component.
func (SDKProcessorLogQueueSize) Description ¶
func (SDKProcessorLogQueueSize) Description() string
Description returns the semantic convention description of the instrument
func (SDKProcessorLogQueueSize) Inst ¶
func (m SDKProcessorLogQueueSize) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (SDKProcessorLogQueueSize) Name ¶
func (SDKProcessorLogQueueSize) Name() string
Name returns the semantic convention name of the instrument.
func (SDKProcessorLogQueueSize) Unit ¶
func (SDKProcessorLogQueueSize) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKProcessorSpanProcessedCount ¶
type SDKProcessorSpanProcessedCount struct {
metric.Int64Counter
}
SDKProcessorSpanProcessedCount is an instrument used to record metric values conforming to the "otel.sdk.processor.span.processed.count" semantic conventions. It represents the number of spans for which the processing has finished, either successful or failed.
func NewSDKProcessorSpanProcessedCount ¶
func NewSDKProcessorSpanProcessedCount( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKProcessorSpanProcessedCount, error)
NewSDKProcessorSpanProcessedCount returns a new SDKProcessorSpanProcessedCount instrument.
func (SDKProcessorSpanProcessedCount) Add ¶
func (m SDKProcessorSpanProcessedCount) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
For successful processing, `error.type` MUST NOT be set. For failed processing, `error.type` must contain the failure cause. For the SDK Simple and Batching Span Processor a span is considered to be processed already when it has been submitted to the exporter, not when the corresponding export call has finished.
func (SDKProcessorSpanProcessedCount) AttrComponentName ¶
func (SDKProcessorSpanProcessedCount) AttrComponentName(val string) attribute.KeyValue
AttrComponentName returns an optional attribute for the "otel.component.name" semantic convention. It represents a name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
func (SDKProcessorSpanProcessedCount) AttrComponentType ¶
func (SDKProcessorSpanProcessedCount) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
AttrComponentType returns an optional attribute for the "otel.component.type" semantic convention. It represents a name identifying the type of the OpenTelemetry component.
func (SDKProcessorSpanProcessedCount) AttrErrorType ¶
func (SDKProcessorSpanProcessedCount) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
AttrErrorType returns an optional attribute for the "error.type" semantic convention. It represents a low-cardinality description of the failure reason. SDK Batching Span Processors MUST use `queue_full` for spans dropped due to a full queue.
func (SDKProcessorSpanProcessedCount) Description ¶
func (SDKProcessorSpanProcessedCount) Description() string
Description returns the semantic convention description of the instrument
func (SDKProcessorSpanProcessedCount) Inst ¶
func (m SDKProcessorSpanProcessedCount) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (SDKProcessorSpanProcessedCount) Name ¶
func (SDKProcessorSpanProcessedCount) Name() string
Name returns the semantic convention name of the instrument.
func (SDKProcessorSpanProcessedCount) Unit ¶
func (SDKProcessorSpanProcessedCount) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKProcessorSpanQueueCapacity ¶
type SDKProcessorSpanQueueCapacity struct {
metric.Int64UpDownCounter
}
SDKProcessorSpanQueueCapacity is an instrument used to record metric values conforming to the "otel.sdk.processor.span.queue.capacity" semantic conventions. It represents the maximum number of spans the queue of a given instance of an SDK span processor can hold.
func NewSDKProcessorSpanQueueCapacity ¶
func NewSDKProcessorSpanQueueCapacity( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorSpanQueueCapacity, error)
NewSDKProcessorSpanQueueCapacity returns a new SDKProcessorSpanQueueCapacity instrument.
func (SDKProcessorSpanQueueCapacity) Add ¶
func (m SDKProcessorSpanQueueCapacity) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor.
func (SDKProcessorSpanQueueCapacity) AttrComponentName ¶
func (SDKProcessorSpanQueueCapacity) AttrComponentName(val string) attribute.KeyValue
AttrComponentName returns an optional attribute for the "otel.component.name" semantic convention. It represents a name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
func (SDKProcessorSpanQueueCapacity) AttrComponentType ¶
func (SDKProcessorSpanQueueCapacity) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
AttrComponentType returns an optional attribute for the "otel.component.type" semantic convention. It represents a name identifying the type of the OpenTelemetry component.
func (SDKProcessorSpanQueueCapacity) Description ¶
func (SDKProcessorSpanQueueCapacity) Description() string
Description returns the semantic convention description of the instrument
func (SDKProcessorSpanQueueCapacity) Inst ¶
func (m SDKProcessorSpanQueueCapacity) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (SDKProcessorSpanQueueCapacity) Name ¶
func (SDKProcessorSpanQueueCapacity) Name() string
Name returns the semantic convention name of the instrument.
func (SDKProcessorSpanQueueCapacity) Unit ¶
func (SDKProcessorSpanQueueCapacity) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKProcessorSpanQueueSize ¶
type SDKProcessorSpanQueueSize struct {
metric.Int64UpDownCounter
}
SDKProcessorSpanQueueSize is an instrument used to record metric values conforming to the "otel.sdk.processor.span.queue.size" semantic conventions. It represents the number of spans in the queue of a given instance of an SDK span processor.
func NewSDKProcessorSpanQueueSize ¶
func NewSDKProcessorSpanQueueSize( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorSpanQueueSize, error)
NewSDKProcessorSpanQueueSize returns a new SDKProcessorSpanQueueSize instrument.
func (SDKProcessorSpanQueueSize) Add ¶
func (m SDKProcessorSpanQueueSize) Add( ctx context.Context, incr int64, attrs ...attribute.KeyValue, )
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
Only applies to span processors which use a queue, e.g. the SDK Batching Span Processor.
func (SDKProcessorSpanQueueSize) AttrComponentName ¶
func (SDKProcessorSpanQueueSize) AttrComponentName(val string) attribute.KeyValue
AttrComponentName returns an optional attribute for the "otel.component.name" semantic convention. It represents a name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
func (SDKProcessorSpanQueueSize) AttrComponentType ¶
func (SDKProcessorSpanQueueSize) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
AttrComponentType returns an optional attribute for the "otel.component.type" semantic convention. It represents a name identifying the type of the OpenTelemetry component.
func (SDKProcessorSpanQueueSize) Description ¶
func (SDKProcessorSpanQueueSize) Description() string
Description returns the semantic convention description of the instrument
func (SDKProcessorSpanQueueSize) Inst ¶
func (m SDKProcessorSpanQueueSize) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (SDKProcessorSpanQueueSize) Name ¶
func (SDKProcessorSpanQueueSize) Name() string
Name returns the semantic convention name of the instrument.
func (SDKProcessorSpanQueueSize) Unit ¶
func (SDKProcessorSpanQueueSize) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKSpanEndedCount ¶
type SDKSpanEndedCount struct {
metric.Int64Counter
}
SDKSpanEndedCount is an instrument used to record metric values conforming to the "otel.sdk.span.ended.count" semantic conventions. It represents the number of created spans for which the end operation was called.
func NewSDKSpanEndedCount ¶
func NewSDKSpanEndedCount( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKSpanEndedCount, error)
NewSDKSpanEndedCount returns a new SDKSpanEndedCount instrument.
func (SDKSpanEndedCount) Add ¶
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
For spans with `recording=true`: Implementations MUST record both `otel.sdk.span.live.count` and `otel.sdk.span.ended.count`. For spans with `recording=false`: If implementations decide to record this metric, they MUST also record `otel.sdk.span.live.count`.
func (SDKSpanEndedCount) AttrSpanSamplingResult ¶
func (SDKSpanEndedCount) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue
AttrSpanSamplingResult returns an optional attribute for the "otel.span.sampling_result" semantic convention. It represents the result value of the sampler for this span.
func (SDKSpanEndedCount) Description ¶
func (SDKSpanEndedCount) Description() string
Description returns the semantic convention description of the instrument
func (SDKSpanEndedCount) Inst ¶
func (m SDKSpanEndedCount) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (SDKSpanEndedCount) Name ¶
func (SDKSpanEndedCount) Name() string
Name returns the semantic convention name of the instrument.
func (SDKSpanEndedCount) Unit ¶
func (SDKSpanEndedCount) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKSpanLiveCount ¶
type SDKSpanLiveCount struct {
metric.Int64UpDownCounter
}
SDKSpanLiveCount is an instrument used to record metric values conforming to the "otel.sdk.span.live.count" semantic conventions. It represents the number of created spans for which the end operation has not been called yet.
func NewSDKSpanLiveCount ¶
func NewSDKSpanLiveCount( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKSpanLiveCount, error)
NewSDKSpanLiveCount returns a new SDKSpanLiveCount instrument.
func (SDKSpanLiveCount) Add ¶
Add adds incr to the existing count.
All additional attrs passed are included in the recorded value.
For spans with `recording=true`: Implementations MUST record both `otel.sdk.span.live.count` and `otel.sdk.span.ended.count`. For spans with `recording=false`: If implementations decide to record this metric, they MUST also record `otel.sdk.span.ended.count`.
func (SDKSpanLiveCount) AttrSpanSamplingResult ¶
func (SDKSpanLiveCount) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue
AttrSpanSamplingResult returns an optional attribute for the "otel.span.sampling_result" semantic convention. It represents the result value of the sampler for this span.
func (SDKSpanLiveCount) Description ¶
func (SDKSpanLiveCount) Description() string
Description returns the semantic convention description of the instrument
func (SDKSpanLiveCount) Inst ¶
func (m SDKSpanLiveCount) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (SDKSpanLiveCount) Name ¶
func (SDKSpanLiveCount) Name() string
Name returns the semantic convention name of the instrument.
func (SDKSpanLiveCount) Unit ¶
func (SDKSpanLiveCount) Unit() string
Unit returns the semantic convention unit of the instrument
type SpanSamplingResultAttr ¶
type SpanSamplingResultAttr string
SpanSamplingResultAttr is an attribute conforming to the otel.span.sampling_result semantic conventions. It represents the result value of the sampler for this span.
var ( // SpanSamplingResultDrop is the span is not sampled and not recording. SpanSamplingResultDrop SpanSamplingResultAttr = "DROP" // SpanSamplingResultRecordOnly is the span is not sampled, but recording. SpanSamplingResultRecordOnly SpanSamplingResultAttr = "RECORD_ONLY" // SpanSamplingResultRecordAndSample is the span is sampled and recording. SpanSamplingResultRecordAndSample SpanSamplingResultAttr = "RECORD_AND_SAMPLE" )
Source Files ¶
metric.go
- Version
- v1.36.0
- Published
- May 21, 2025
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 3 hours ago –
Tools for package owners.