Documentation
¶
Overview ¶
Package httpconv provides types and functionality for OpenTelemetry semantic conventions in the "otel" namespace.
Index ¶
- type ComponentTypeAttr
- type ErrorTypeAttr
- type RPCGRPCStatusCodeAttr
- type SDKExporterLogExported
- 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 (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 SDKExporterMetricDataPointExported
- func (m SDKExporterMetricDataPointExported) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (SDKExporterMetricDataPointExported) AttrComponentName(val string) attribute.KeyValue
- func (SDKExporterMetricDataPointExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKExporterMetricDataPointExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (SDKExporterMetricDataPointExported) AttrServerAddress(val string) attribute.KeyValue
- func (SDKExporterMetricDataPointExported) AttrServerPort(val int) attribute.KeyValue
- func (SDKExporterMetricDataPointExported) Description() string
- func (m SDKExporterMetricDataPointExported) Inst() metric.Int64Counter
- func (SDKExporterMetricDataPointExported) Name() string
- func (SDKExporterMetricDataPointExported) Unit() string
- type SDKExporterMetricDataPointInflight
- func (m SDKExporterMetricDataPointInflight) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (SDKExporterMetricDataPointInflight) AttrComponentName(val string) attribute.KeyValue
- func (SDKExporterMetricDataPointInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKExporterMetricDataPointInflight) AttrServerAddress(val string) attribute.KeyValue
- func (SDKExporterMetricDataPointInflight) AttrServerPort(val int) attribute.KeyValue
- func (SDKExporterMetricDataPointInflight) Description() string
- func (m SDKExporterMetricDataPointInflight) Inst() metric.Int64UpDownCounter
- func (SDKExporterMetricDataPointInflight) Name() string
- func (SDKExporterMetricDataPointInflight) Unit() string
- type SDKExporterOperationDuration
- func (SDKExporterOperationDuration) AttrComponentName(val string) attribute.KeyValue
- func (SDKExporterOperationDuration) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKExporterOperationDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (SDKExporterOperationDuration) AttrHTTPResponseStatusCode(val int) attribute.KeyValue
- func (SDKExporterOperationDuration) AttrRPCGRPCStatusCode(val RPCGRPCStatusCodeAttr) attribute.KeyValue
- func (SDKExporterOperationDuration) AttrServerAddress(val string) attribute.KeyValue
- func (SDKExporterOperationDuration) AttrServerPort(val int) attribute.KeyValue
- func (SDKExporterOperationDuration) Description() string
- func (m SDKExporterOperationDuration) Inst() metric.Float64Histogram
- func (SDKExporterOperationDuration) Name() string
- func (m SDKExporterOperationDuration) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue)
- func (SDKExporterOperationDuration) Unit() string
- type SDKExporterSpanExported
- func (m SDKExporterSpanExported) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (SDKExporterSpanExported) AttrComponentName(val string) attribute.KeyValue
- func (SDKExporterSpanExported) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKExporterSpanExported) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (SDKExporterSpanExported) AttrServerAddress(val string) attribute.KeyValue
- func (SDKExporterSpanExported) AttrServerPort(val int) attribute.KeyValue
- func (SDKExporterSpanExported) Description() string
- func (m SDKExporterSpanExported) Inst() metric.Int64Counter
- func (SDKExporterSpanExported) Name() string
- func (SDKExporterSpanExported) Unit() string
- type SDKExporterSpanInflight
- func (m SDKExporterSpanInflight) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (SDKExporterSpanInflight) AttrComponentName(val string) attribute.KeyValue
- func (SDKExporterSpanInflight) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKExporterSpanInflight) AttrServerAddress(val string) attribute.KeyValue
- func (SDKExporterSpanInflight) AttrServerPort(val int) attribute.KeyValue
- func (SDKExporterSpanInflight) Description() string
- func (m SDKExporterSpanInflight) Inst() metric.Int64UpDownCounter
- func (SDKExporterSpanInflight) Name() string
- func (SDKExporterSpanInflight) Unit() string
- type SDKLogCreated
- type SDKMetricReaderCollectionDuration
- func (SDKMetricReaderCollectionDuration) AttrComponentName(val string) attribute.KeyValue
- func (SDKMetricReaderCollectionDuration) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKMetricReaderCollectionDuration) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (SDKMetricReaderCollectionDuration) Description() string
- func (m SDKMetricReaderCollectionDuration) Inst() metric.Float64Histogram
- func (SDKMetricReaderCollectionDuration) Name() string
- func (m SDKMetricReaderCollectionDuration) Record(ctx context.Context, val float64, attrs ...attribute.KeyValue)
- func (SDKMetricReaderCollectionDuration) Unit() string
- type SDKProcessorLogProcessed
- 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 (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 (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 SDKProcessorSpanProcessed
- func (m SDKProcessorSpanProcessed) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (SDKProcessorSpanProcessed) AttrComponentName(val string) attribute.KeyValue
- func (SDKProcessorSpanProcessed) AttrComponentType(val ComponentTypeAttr) attribute.KeyValue
- func (SDKProcessorSpanProcessed) AttrErrorType(val ErrorTypeAttr) attribute.KeyValue
- func (SDKProcessorSpanProcessed) Description() string
- func (m SDKProcessorSpanProcessed) Inst() metric.Int64Counter
- func (SDKProcessorSpanProcessed) Name() string
- func (SDKProcessorSpanProcessed) Unit() string
- type SDKProcessorSpanQueueCapacity
- 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 (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 SDKSpanEnded
- func (m SDKSpanEnded) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (SDKSpanEnded) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue
- func (SDKSpanEnded) Description() string
- func (m SDKSpanEnded) Inst() metric.Int64Counter
- func (SDKSpanEnded) Name() string
- func (SDKSpanEnded) Unit() string
- type SDKSpanLive
- func (m SDKSpanLive) Add(ctx context.Context, incr int64, attrs ...attribute.KeyValue)
- func (SDKSpanLive) AttrSpanSamplingResult(val SpanSamplingResultAttr) attribute.KeyValue
- func (SDKSpanLive) Description() string
- func (m SDKSpanLive) Inst() metric.Int64UpDownCounter
- func (SDKSpanLive) Name() string
- func (SDKSpanLive) Unit() string
- type SpanSamplingResultAttr
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 log record // processor. ComponentTypeBatchingLogProcessor ComponentTypeAttr = "batching_log_processor" // ComponentTypeSimpleLogProcessor is the builtin SDK simple log record // 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 log record exporter over gRPC // with protobuf serialization. ComponentTypeOtlpGRPCLogExporter ComponentTypeAttr = "otlp_grpc_log_exporter" // ComponentTypeOtlpHTTPLogExporter is the OTLP log record exporter over HTTP // with protobuf serialization. ComponentTypeOtlpHTTPLogExporter ComponentTypeAttr = "otlp_http_log_exporter" // ComponentTypeOtlpHTTPJSONLogExporter is the OTLP log record exporter over // HTTP with JSON serialization. ComponentTypeOtlpHTTPJSONLogExporter ComponentTypeAttr = "otlp_http_json_log_exporter" // ComponentTypePeriodicMetricReader is the builtin SDK periodically exporting // metric reader. ComponentTypePeriodicMetricReader ComponentTypeAttr = "periodic_metric_reader" // ComponentTypeOtlpGRPCMetricExporter is the OTLP metric exporter over gRPC // with protobuf serialization. ComponentTypeOtlpGRPCMetricExporter ComponentTypeAttr = "otlp_grpc_metric_exporter" // ComponentTypeOtlpHTTPMetricExporter is the OTLP metric exporter over HTTP // with protobuf serialization. ComponentTypeOtlpHTTPMetricExporter ComponentTypeAttr = "otlp_http_metric_exporter" // ComponentTypeOtlpHTTPJSONMetricExporter is the OTLP metric exporter over HTTP // with JSON serialization. ComponentTypeOtlpHTTPJSONMetricExporter ComponentTypeAttr = "otlp_http_json_metric_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 RPCGRPCStatusCodeAttr ¶
type RPCGRPCStatusCodeAttr int64
RPCGRPCStatusCodeAttr is an attribute conforming to the rpc.grpc.status_code semantic conventions. It represents the gRPC status code of the last gRPC requests performed in scope of this export call.
var ( // RPCGRPCStatusCodeOk is the OK. RPCGRPCStatusCodeOk RPCGRPCStatusCodeAttr = 0 // RPCGRPCStatusCodeCancelled is the CANCELLED. RPCGRPCStatusCodeCancelled RPCGRPCStatusCodeAttr = 1 // RPCGRPCStatusCodeUnknown is the UNKNOWN. RPCGRPCStatusCodeUnknown RPCGRPCStatusCodeAttr = 2 // RPCGRPCStatusCodeInvalidArgument is the INVALID_ARGUMENT. RPCGRPCStatusCodeInvalidArgument RPCGRPCStatusCodeAttr = 3 // RPCGRPCStatusCodeDeadlineExceeded is the DEADLINE_EXCEEDED. RPCGRPCStatusCodeDeadlineExceeded RPCGRPCStatusCodeAttr = 4 // RPCGRPCStatusCodeNotFound is the NOT_FOUND. RPCGRPCStatusCodeNotFound RPCGRPCStatusCodeAttr = 5 // RPCGRPCStatusCodeAlreadyExists is the ALREADY_EXISTS. RPCGRPCStatusCodeAlreadyExists RPCGRPCStatusCodeAttr = 6 // RPCGRPCStatusCodePermissionDenied is the PERMISSION_DENIED. RPCGRPCStatusCodePermissionDenied RPCGRPCStatusCodeAttr = 7 // RPCGRPCStatusCodeResourceExhausted is the RESOURCE_EXHAUSTED. RPCGRPCStatusCodeResourceExhausted RPCGRPCStatusCodeAttr = 8 // RPCGRPCStatusCodeFailedPrecondition is the FAILED_PRECONDITION. RPCGRPCStatusCodeFailedPrecondition RPCGRPCStatusCodeAttr = 9 // RPCGRPCStatusCodeAborted is the ABORTED. RPCGRPCStatusCodeAborted RPCGRPCStatusCodeAttr = 10 // RPCGRPCStatusCodeOutOfRange is the OUT_OF_RANGE. RPCGRPCStatusCodeOutOfRange RPCGRPCStatusCodeAttr = 11 // RPCGRPCStatusCodeUnimplemented is the UNIMPLEMENTED. RPCGRPCStatusCodeUnimplemented RPCGRPCStatusCodeAttr = 12 // RPCGRPCStatusCodeInternal is the INTERNAL. RPCGRPCStatusCodeInternal RPCGRPCStatusCodeAttr = 13 RPCGRPCStatusCodeUnavailable RPCGRPCStatusCodeAttr = 14 // RPCGRPCStatusCodeDataLoss is the DATA_LOSS. RPCGRPCStatusCodeDataLoss RPCGRPCStatusCodeAttr = 15 // RPCGRPCStatusCodeUnauthenticated is the UNAUTHENTICATED. RPCGRPCStatusCodeUnauthenticated RPCGRPCStatusCodeAttr = 16 )
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 SDKExporterMetricDataPointExported ¶
type SDKExporterMetricDataPointExported struct {
metric.Int64Counter
}
SDKExporterMetricDataPointExported is an instrument used to record metric values conforming to the "otel.sdk.exporter.metric_data_point.exported" semantic conventions. It represents the number of metric data points for which the export has finished, either successful or failed.
func NewSDKExporterMetricDataPointExported ¶
func NewSDKExporterMetricDataPointExported( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKExporterMetricDataPointExported, error)
NewSDKExporterMetricDataPointExported returns a new SDKExporterMetricDataPointExported instrument.
func (SDKExporterMetricDataPointExported) Add ¶
func (m SDKExporterMetricDataPointExported) 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_data_points`), rejected data points MUST count as failed and only non-rejected data points count as success. If no rejection reason is available, `rejected` SHOULD be used as value for `error.type`.
func (SDKExporterMetricDataPointExported) AttrComponentName ¶
func (SDKExporterMetricDataPointExported) 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 (SDKExporterMetricDataPointExported) AttrComponentType ¶
func (SDKExporterMetricDataPointExported) 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 (SDKExporterMetricDataPointExported) AttrErrorType ¶
func (SDKExporterMetricDataPointExported) 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 (SDKExporterMetricDataPointExported) AttrServerAddress ¶
func (SDKExporterMetricDataPointExported) 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 (SDKExporterMetricDataPointExported) AttrServerPort ¶
func (SDKExporterMetricDataPointExported) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (SDKExporterMetricDataPointExported) Description ¶
func (SDKExporterMetricDataPointExported) Description() string
Description returns the semantic convention description of the instrument
func (SDKExporterMetricDataPointExported) Inst ¶
func (m SDKExporterMetricDataPointExported) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (SDKExporterMetricDataPointExported) Name ¶
func (SDKExporterMetricDataPointExported) Name() string
Name returns the semantic convention name of the instrument.
func (SDKExporterMetricDataPointExported) Unit ¶
func (SDKExporterMetricDataPointExported) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKExporterMetricDataPointInflight ¶
type SDKExporterMetricDataPointInflight struct {
metric.Int64UpDownCounter
}
SDKExporterMetricDataPointInflight is an instrument used to record metric values conforming to the "otel.sdk.exporter.metric_data_point.inflight" semantic conventions. It represents the number of metric data points which were passed to the exporter, but that have not been exported yet (neither successful, nor failed).
func NewSDKExporterMetricDataPointInflight ¶
func NewSDKExporterMetricDataPointInflight( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKExporterMetricDataPointInflight, error)
NewSDKExporterMetricDataPointInflight returns a new SDKExporterMetricDataPointInflight instrument.
func (SDKExporterMetricDataPointInflight) Add ¶
func (m SDKExporterMetricDataPointInflight) 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 (SDKExporterMetricDataPointInflight) AttrComponentName ¶
func (SDKExporterMetricDataPointInflight) 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 (SDKExporterMetricDataPointInflight) AttrComponentType ¶
func (SDKExporterMetricDataPointInflight) 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 (SDKExporterMetricDataPointInflight) AttrServerAddress ¶
func (SDKExporterMetricDataPointInflight) 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 (SDKExporterMetricDataPointInflight) AttrServerPort ¶
func (SDKExporterMetricDataPointInflight) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (SDKExporterMetricDataPointInflight) Description ¶
func (SDKExporterMetricDataPointInflight) Description() string
Description returns the semantic convention description of the instrument
func (SDKExporterMetricDataPointInflight) Inst ¶
func (m SDKExporterMetricDataPointInflight) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (SDKExporterMetricDataPointInflight) Name ¶
func (SDKExporterMetricDataPointInflight) Name() string
Name returns the semantic convention name of the instrument.
func (SDKExporterMetricDataPointInflight) Unit ¶
func (SDKExporterMetricDataPointInflight) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKExporterOperationDuration ¶
type SDKExporterOperationDuration struct {
metric.Float64Histogram
}
SDKExporterOperationDuration is an instrument used to record metric values conforming to the "otel.sdk.exporter.operation.duration" semantic conventions. It represents the duration of exporting a batch of telemetry records.
func NewSDKExporterOperationDuration ¶
func NewSDKExporterOperationDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (SDKExporterOperationDuration, error)
NewSDKExporterOperationDuration returns a new SDKExporterOperationDuration instrument.
func (SDKExporterOperationDuration) AttrComponentName ¶
func (SDKExporterOperationDuration) 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 (SDKExporterOperationDuration) AttrComponentType ¶
func (SDKExporterOperationDuration) 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 (SDKExporterOperationDuration) AttrErrorType ¶
func (SDKExporterOperationDuration) 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 (SDKExporterOperationDuration) AttrHTTPResponseStatusCode ¶
func (SDKExporterOperationDuration) AttrHTTPResponseStatusCode(val int) attribute.KeyValue
AttrHTTPResponseStatusCode returns an optional attribute for the "http.response.status_code" semantic convention. It represents the HTTP status code of the last HTTP request performed in scope of this export call.
func (SDKExporterOperationDuration) AttrRPCGRPCStatusCode ¶
func (SDKExporterOperationDuration) AttrRPCGRPCStatusCode(val RPCGRPCStatusCodeAttr) attribute.KeyValue
AttrRPCGRPCStatusCode returns an optional attribute for the "rpc.grpc.status_code" semantic convention. It represents the gRPC status code of the last gRPC requests performed in scope of this export call.
func (SDKExporterOperationDuration) AttrServerAddress ¶
func (SDKExporterOperationDuration) 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 (SDKExporterOperationDuration) AttrServerPort ¶
func (SDKExporterOperationDuration) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (SDKExporterOperationDuration) Description ¶
func (SDKExporterOperationDuration) Description() string
Description returns the semantic convention description of the instrument
func (SDKExporterOperationDuration) Inst ¶
func (m SDKExporterOperationDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (SDKExporterOperationDuration) Name ¶
func (SDKExporterOperationDuration) Name() string
Name returns the semantic convention name of the instrument.
func (SDKExporterOperationDuration) Record ¶
func (m SDKExporterOperationDuration) Record( ctx context.Context, val float64, attrs ...attribute.KeyValue, )
Record records val to the current distribution.
All additional attrs passed are included in the recorded value.
This metric defines successful operations using the full success definitions for http and grpc. Anything else is defined as an unsuccessful operation. For successful operations, `error.type` MUST NOT be set. For unsuccessful export operations, `error.type` MUST contain a relevant failure cause.
func (SDKExporterOperationDuration) Unit ¶
func (SDKExporterOperationDuration) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKExporterSpanExported ¶
type SDKExporterSpanExported struct {
metric.Int64Counter
}
SDKExporterSpanExported is an instrument used to record metric values conforming to the "otel.sdk.exporter.span.exported" semantic conventions. It represents the number of spans for which the export has finished, either successful or failed.
func NewSDKExporterSpanExported ¶
func NewSDKExporterSpanExported( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKExporterSpanExported, error)
NewSDKExporterSpanExported returns a new SDKExporterSpanExported instrument.
func (SDKExporterSpanExported) Add ¶
func (m SDKExporterSpanExported) 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 (SDKExporterSpanExported) AttrComponentName ¶
func (SDKExporterSpanExported) 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 (SDKExporterSpanExported) AttrComponentType ¶
func (SDKExporterSpanExported) 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 (SDKExporterSpanExported) AttrErrorType ¶
func (SDKExporterSpanExported) 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 (SDKExporterSpanExported) AttrServerAddress ¶
func (SDKExporterSpanExported) 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 (SDKExporterSpanExported) AttrServerPort ¶
func (SDKExporterSpanExported) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (SDKExporterSpanExported) Description ¶
func (SDKExporterSpanExported) Description() string
Description returns the semantic convention description of the instrument
func (SDKExporterSpanExported) Inst ¶
func (m SDKExporterSpanExported) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (SDKExporterSpanExported) Name ¶
func (SDKExporterSpanExported) Name() string
Name returns the semantic convention name of the instrument.
func (SDKExporterSpanExported) Unit ¶
func (SDKExporterSpanExported) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKExporterSpanInflight ¶
type SDKExporterSpanInflight struct {
metric.Int64UpDownCounter
}
SDKExporterSpanInflight is an instrument used to record metric values conforming to the "otel.sdk.exporter.span.inflight" 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 NewSDKExporterSpanInflight ¶
func NewSDKExporterSpanInflight( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKExporterSpanInflight, error)
NewSDKExporterSpanInflight returns a new SDKExporterSpanInflight instrument.
func (SDKExporterSpanInflight) Add ¶
func (m SDKExporterSpanInflight) 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 (SDKExporterSpanInflight) AttrComponentName ¶
func (SDKExporterSpanInflight) 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 (SDKExporterSpanInflight) AttrComponentType ¶
func (SDKExporterSpanInflight) 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 (SDKExporterSpanInflight) AttrServerAddress ¶
func (SDKExporterSpanInflight) 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 (SDKExporterSpanInflight) AttrServerPort ¶
func (SDKExporterSpanInflight) AttrServerPort(val int) attribute.KeyValue
AttrServerPort returns an optional attribute for the "server.port" semantic convention. It represents the server port number.
func (SDKExporterSpanInflight) Description ¶
func (SDKExporterSpanInflight) Description() string
Description returns the semantic convention description of the instrument
func (SDKExporterSpanInflight) Inst ¶
func (m SDKExporterSpanInflight) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (SDKExporterSpanInflight) Name ¶
func (SDKExporterSpanInflight) Name() string
Name returns the semantic convention name of the instrument.
func (SDKExporterSpanInflight) Unit ¶
func (SDKExporterSpanInflight) 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) 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 SDKMetricReaderCollectionDuration ¶
type SDKMetricReaderCollectionDuration struct {
metric.Float64Histogram
}
SDKMetricReaderCollectionDuration is an instrument used to record metric values conforming to the "otel.sdk.metric_reader.collection.duration" semantic conventions. It represents the duration of the collect operation of the metric reader.
func NewSDKMetricReaderCollectionDuration ¶
func NewSDKMetricReaderCollectionDuration( m metric.Meter, opt ...metric.Float64HistogramOption, ) (SDKMetricReaderCollectionDuration, error)
NewSDKMetricReaderCollectionDuration returns a new SDKMetricReaderCollectionDuration instrument.
func (SDKMetricReaderCollectionDuration) AttrComponentName ¶
func (SDKMetricReaderCollectionDuration) 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 (SDKMetricReaderCollectionDuration) AttrComponentType ¶
func (SDKMetricReaderCollectionDuration) 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 (SDKMetricReaderCollectionDuration) AttrErrorType ¶
func (SDKMetricReaderCollectionDuration) 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 (SDKMetricReaderCollectionDuration) Description ¶
func (SDKMetricReaderCollectionDuration) Description() string
Description returns the semantic convention description of the instrument
func (SDKMetricReaderCollectionDuration) Inst ¶
func (m SDKMetricReaderCollectionDuration) Inst() metric.Float64Histogram
Inst returns the underlying metric instrument.
func (SDKMetricReaderCollectionDuration) Name ¶
func (SDKMetricReaderCollectionDuration) Name() string
Name returns the semantic convention name of the instrument.
func (SDKMetricReaderCollectionDuration) Record ¶
func (m SDKMetricReaderCollectionDuration) Record( ctx context.Context, val float64, attrs ...attribute.KeyValue, )
Record records val to the current distribution.
All additional attrs passed are included in the recorded value.
For successful collections, `error.type` MUST NOT be set. For failed collections, `error.type` SHOULD contain the failure cause. It can happen that metrics collection is successful for some MetricProducers, while others fail. In that case `error.type` SHOULD be set to any of the failure causes.
func (SDKMetricReaderCollectionDuration) Unit ¶
func (SDKMetricReaderCollectionDuration) 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 SDKProcessorSpanProcessed ¶
type SDKProcessorSpanProcessed struct {
metric.Int64Counter
}
SDKProcessorSpanProcessed is an instrument used to record metric values conforming to the "otel.sdk.processor.span.processed" semantic conventions. It represents the number of spans for which the processing has finished, either successful or failed.
func NewSDKProcessorSpanProcessed ¶
func NewSDKProcessorSpanProcessed( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKProcessorSpanProcessed, error)
NewSDKProcessorSpanProcessed returns a new SDKProcessorSpanProcessed instrument.
func (SDKProcessorSpanProcessed) Add ¶
func (m SDKProcessorSpanProcessed) 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 (SDKProcessorSpanProcessed) AttrComponentName ¶
func (SDKProcessorSpanProcessed) 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 (SDKProcessorSpanProcessed) AttrComponentType ¶
func (SDKProcessorSpanProcessed) 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 (SDKProcessorSpanProcessed) AttrErrorType ¶
func (SDKProcessorSpanProcessed) 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 (SDKProcessorSpanProcessed) Description ¶
func (SDKProcessorSpanProcessed) Description() string
Description returns the semantic convention description of the instrument
func (SDKProcessorSpanProcessed) Inst ¶
func (m SDKProcessorSpanProcessed) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (SDKProcessorSpanProcessed) Name ¶
func (SDKProcessorSpanProcessed) Name() string
Name returns the semantic convention name of the instrument.
func (SDKProcessorSpanProcessed) Unit ¶
func (SDKProcessorSpanProcessed) 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 SDKSpanEnded ¶
type SDKSpanEnded struct {
metric.Int64Counter
}
SDKSpanEnded is an instrument used to record metric values conforming to the "otel.sdk.span.ended" semantic conventions. It represents the number of created spans for which the end operation was called.
func NewSDKSpanEnded ¶
func NewSDKSpanEnded( m metric.Meter, opt ...metric.Int64CounterOption, ) (SDKSpanEnded, error)
NewSDKSpanEnded returns a new SDKSpanEnded instrument.
func (SDKSpanEnded) 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` and `otel.sdk.span.ended`. For spans with `recording=false`: If implementations decide to record this metric, they MUST also record `otel.sdk.span.live`.
func (SDKSpanEnded) AttrSpanSamplingResult ¶
func (SDKSpanEnded) 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 (SDKSpanEnded) Description ¶
func (SDKSpanEnded) Description() string
Description returns the semantic convention description of the instrument
func (SDKSpanEnded) Inst ¶
func (m SDKSpanEnded) Inst() metric.Int64Counter
Inst returns the underlying metric instrument.
func (SDKSpanEnded) Name ¶
func (SDKSpanEnded) Name() string
Name returns the semantic convention name of the instrument.
func (SDKSpanEnded) Unit ¶
func (SDKSpanEnded) Unit() string
Unit returns the semantic convention unit of the instrument
type SDKSpanLive ¶
type SDKSpanLive struct {
metric.Int64UpDownCounter
}
SDKSpanLive is an instrument used to record metric values conforming to the "otel.sdk.span.live" semantic conventions. It represents the number of created spans for which the end operation has not been called yet.
func NewSDKSpanLive ¶
func NewSDKSpanLive( m metric.Meter, opt ...metric.Int64UpDownCounterOption, ) (SDKSpanLive, error)
NewSDKSpanLive returns a new SDKSpanLive instrument.
func (SDKSpanLive) 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` and `otel.sdk.span.ended`. For spans with `recording=false`: If implementations decide to record this metric, they MUST also record `otel.sdk.span.ended`.
func (SDKSpanLive) AttrSpanSamplingResult ¶
func (SDKSpanLive) 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 (SDKSpanLive) Description ¶
func (SDKSpanLive) Description() string
Description returns the semantic convention description of the instrument
func (SDKSpanLive) Inst ¶
func (m SDKSpanLive) Inst() metric.Int64UpDownCounter
Inst returns the underlying metric instrument.
func (SDKSpanLive) Name ¶
func (SDKSpanLive) Name() string
Name returns the semantic convention name of the instrument.
func (SDKSpanLive) Unit ¶
func (SDKSpanLive) 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" )