otelconv
v1.47.0
Documentation
pkg.go.dev ↗Package otelconv provides types and functionality for OpenTelemetry semantic conventions in the "otel" namespace.
Types
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.
ComponentTypeBatchingSpanProcessor (10 declarations)
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" )
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.
ErrorTypeOther
var ErrorTypeOther ErrorTypeAttr = "_OTHER"
ErrorTypeOther is a fallback error value to be used when the instrumentation doesn't define a custom value.
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.
NewSDKExporterLogExported
func NewSDKExporterLogExported( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKExporterLogExported, error)
NewSDKExporterLogExported returns a new SDKExporterLogExported instrument.
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`.
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.
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.
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.
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.
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.
SDKExporterLogExported.Description
func (SDKExporterLogExported) Description() string
Description returns the semantic convention description of the instrument
SDKExporterLogExported.Inst
func (m SDKExporterLogExported) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
SDKExporterLogExported.Name
func (SDKExporterLogExported) Name() string
Name returns the semantic convention name of the instrument.
SDKExporterLogExported.Unit
func (SDKExporterLogExported) Unit() string
Unit returns the semantic convention unit of the instrument
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).
NewSDKExporterLogInflight
func NewSDKExporterLogInflight( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKExporterLogInflight, error)
NewSDKExporterLogInflight returns a new SDKExporterLogInflight instrument.
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.
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.
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.
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.
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.
SDKExporterLogInflight.Description
func (SDKExporterLogInflight) Description() string
Description returns the semantic convention description of the instrument
SDKExporterLogInflight.Inst
func (m SDKExporterLogInflight) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
SDKExporterLogInflight.Name
func (SDKExporterLogInflight) Name() string
Name returns the semantic convention name of the instrument.
SDKExporterLogInflight.Unit
func (SDKExporterLogInflight) Unit() string
Unit returns the semantic convention unit of the instrument
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.
NewSDKExporterSpanExportedCount
func NewSDKExporterSpanExportedCount( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKExporterSpanExportedCount, error)
NewSDKExporterSpanExportedCount returns a new SDKExporterSpanExportedCount instrument.
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`.
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.
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.
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.
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.
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.
SDKExporterSpanExportedCount.Description
func (SDKExporterSpanExportedCount) Description() string
Description returns the semantic convention description of the instrument
SDKExporterSpanExportedCount.Inst
func (m SDKExporterSpanExportedCount) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
SDKExporterSpanExportedCount.Name
func (SDKExporterSpanExportedCount) Name() string
Name returns the semantic convention name of the instrument.
SDKExporterSpanExportedCount.Unit
func (SDKExporterSpanExportedCount) Unit() string
Unit returns the semantic convention unit of the instrument
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).
NewSDKExporterSpanInflightCount
func NewSDKExporterSpanInflightCount( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKExporterSpanInflightCount, error)
NewSDKExporterSpanInflightCount returns a new SDKExporterSpanInflightCount instrument.
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.
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.
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.
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.
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.
SDKExporterSpanInflightCount.Description
func (SDKExporterSpanInflightCount) Description() string
Description returns the semantic convention description of the instrument
SDKExporterSpanInflightCount.Inst
func (m SDKExporterSpanInflightCount) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
SDKExporterSpanInflightCount.Name
func (SDKExporterSpanInflightCount) Name() string
Name returns the semantic convention name of the instrument.
SDKExporterSpanInflightCount.Unit
func (SDKExporterSpanInflightCount) Unit() string
Unit returns the semantic convention unit of the instrument
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.
NewSDKLogCreated
func NewSDKLogCreated( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKLogCreated, error)
NewSDKLogCreated returns a new SDKLogCreated instrument.
SDKLogCreated.Add
func (m SDKLogCreated) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
Add adds incr to the existing count.
SDKLogCreated.Description
func (SDKLogCreated) Description() string
Description returns the semantic convention description of the instrument
SDKLogCreated.Inst
func (m SDKLogCreated) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
SDKLogCreated.Name
func (SDKLogCreated) Name() string
Name returns the semantic convention name of the instrument.
SDKLogCreated.Unit
func (SDKLogCreated) Unit() string
Unit returns the semantic convention unit of the instrument
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.
NewSDKProcessorLogProcessed
func NewSDKProcessorLogProcessed( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKProcessorLogProcessed, error)
NewSDKProcessorLogProcessed returns a new SDKProcessorLogProcessed instrument.
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.
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.
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.
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.
SDKProcessorLogProcessed.Description
func (SDKProcessorLogProcessed) Description() string
Description returns the semantic convention description of the instrument
SDKProcessorLogProcessed.Inst
func (m SDKProcessorLogProcessed) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
SDKProcessorLogProcessed.Name
func (SDKProcessorLogProcessed) Name() string
Name returns the semantic convention name of the instrument.
SDKProcessorLogProcessed.Unit
func (SDKProcessorLogProcessed) Unit() string
Unit returns the semantic convention unit of the instrument
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.
NewSDKProcessorLogQueueCapacity
func NewSDKProcessorLogQueueCapacity( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorLogQueueCapacity, error)
NewSDKProcessorLogQueueCapacity returns a new SDKProcessorLogQueueCapacity instrument.
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.
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.
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.
SDKProcessorLogQueueCapacity.Description
func (SDKProcessorLogQueueCapacity) Description() string
Description returns the semantic convention description of the instrument
SDKProcessorLogQueueCapacity.Inst
func (m SDKProcessorLogQueueCapacity) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
SDKProcessorLogQueueCapacity.Name
func (SDKProcessorLogQueueCapacity) Name() string
Name returns the semantic convention name of the instrument.
SDKProcessorLogQueueCapacity.Unit
func (SDKProcessorLogQueueCapacity) Unit() string
Unit returns the semantic convention unit of the instrument
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.
NewSDKProcessorLogQueueSize
func NewSDKProcessorLogQueueSize( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorLogQueueSize, error)
NewSDKProcessorLogQueueSize returns a new SDKProcessorLogQueueSize instrument.
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.
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.
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.
SDKProcessorLogQueueSize.Description
func (SDKProcessorLogQueueSize) Description() string
Description returns the semantic convention description of the instrument
SDKProcessorLogQueueSize.Inst
func (m SDKProcessorLogQueueSize) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
SDKProcessorLogQueueSize.Name
func (SDKProcessorLogQueueSize) Name() string
Name returns the semantic convention name of the instrument.
SDKProcessorLogQueueSize.Unit
func (SDKProcessorLogQueueSize) Unit() string
Unit returns the semantic convention unit of the instrument
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.
NewSDKProcessorSpanProcessedCount
func NewSDKProcessorSpanProcessedCount( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKProcessorSpanProcessedCount, error)
NewSDKProcessorSpanProcessedCount returns a new SDKProcessorSpanProcessedCount instrument.
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.
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.
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.
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.
SDKProcessorSpanProcessedCount.Description
func (SDKProcessorSpanProcessedCount) Description() string
Description returns the semantic convention description of the instrument
SDKProcessorSpanProcessedCount.Inst
func (m SDKProcessorSpanProcessedCount) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
SDKProcessorSpanProcessedCount.Name
func (SDKProcessorSpanProcessedCount) Name() string
Name returns the semantic convention name of the instrument.
SDKProcessorSpanProcessedCount.Unit
func (SDKProcessorSpanProcessedCount) Unit() string
Unit returns the semantic convention unit of the instrument
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.
NewSDKProcessorSpanQueueCapacity
func NewSDKProcessorSpanQueueCapacity( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorSpanQueueCapacity, error)
NewSDKProcessorSpanQueueCapacity returns a new SDKProcessorSpanQueueCapacity instrument.
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.
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.
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.
SDKProcessorSpanQueueCapacity.Description
func (SDKProcessorSpanQueueCapacity) Description() string
Description returns the semantic convention description of the instrument
SDKProcessorSpanQueueCapacity.Inst
func (m SDKProcessorSpanQueueCapacity) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
SDKProcessorSpanQueueCapacity.Name
func (SDKProcessorSpanQueueCapacity) Name() string
Name returns the semantic convention name of the instrument.
SDKProcessorSpanQueueCapacity.Unit
func (SDKProcessorSpanQueueCapacity) Unit() string
Unit returns the semantic convention unit of the instrument
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.
NewSDKProcessorSpanQueueSize
func NewSDKProcessorSpanQueueSize( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKProcessorSpanQueueSize, error)
NewSDKProcessorSpanQueueSize returns a new SDKProcessorSpanQueueSize instrument.
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.
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.
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.
SDKProcessorSpanQueueSize.Description
func (SDKProcessorSpanQueueSize) Description() string
Description returns the semantic convention description of the instrument
SDKProcessorSpanQueueSize.Inst
func (m SDKProcessorSpanQueueSize) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
SDKProcessorSpanQueueSize.Name
func (SDKProcessorSpanQueueSize) Name() string
Name returns the semantic convention name of the instrument.
SDKProcessorSpanQueueSize.Unit
func (SDKProcessorSpanQueueSize) Unit() string
Unit returns the semantic convention unit of the instrument
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.
NewSDKSpanEndedCount
func NewSDKSpanEndedCount( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKSpanEndedCount, error)
NewSDKSpanEndedCount returns a new SDKSpanEndedCount instrument.
SDKSpanEndedCount.Add
func (m SDKSpanEndedCount) 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 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`.
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.
SDKSpanEndedCount.Description
func (SDKSpanEndedCount) Description() string
Description returns the semantic convention description of the instrument
SDKSpanEndedCount.Inst
func (m SDKSpanEndedCount) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
SDKSpanEndedCount.Name
func (SDKSpanEndedCount) Name() string
Name returns the semantic convention name of the instrument.
SDKSpanEndedCount.Unit
func (SDKSpanEndedCount) Unit() string
Unit returns the semantic convention unit of the instrument
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.
NewSDKSpanLiveCount
func NewSDKSpanLiveCount( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKSpanLiveCount, error)
NewSDKSpanLiveCount returns a new SDKSpanLiveCount instrument.
SDKSpanLiveCount.Add
func (m SDKSpanLiveCount) 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 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`.
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.
SDKSpanLiveCount.Description
func (SDKSpanLiveCount) Description() string
Description returns the semantic convention description of the instrument
SDKSpanLiveCount.Inst
func (m SDKSpanLiveCount) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
SDKSpanLiveCount.Name
func (SDKSpanLiveCount) Name() string
Name returns the semantic convention name of the instrument.
SDKSpanLiveCount.Unit
func (SDKSpanLiveCount) Unit() string
Unit returns the semantic convention unit of the instrument
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.
SpanSamplingResultDrop (3 declarations)
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" )