Movatterモバイル変換


[0]ホーム

URL:


otelconv

package
v1.39.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 8, 2025 License:Apache-2.0, BSD-3-ClauseImports:5Imported by:0

Details

Repository

github.com/open-telemetry/opentelemetry-go

Links

Documentation

Overview

Package otelconv provides types and functionality for OpenTelemetry semanticconventions in the "otel" namespace.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeComponentTypeAttr

type ComponentTypeAttrstring

ComponentTypeAttr is an attribute conforming to the otel.component.typesemantic conventions. It represents a name identifying the type of theOpenTelemetry component.

var (// ComponentTypeBatchingSpanProcessor is the builtin SDK batching span// processor.ComponentTypeBatchingSpanProcessorComponentTypeAttr = "batching_span_processor"// ComponentTypeSimpleSpanProcessor is the builtin SDK simple span processor.ComponentTypeSimpleSpanProcessorComponentTypeAttr = "simple_span_processor"// ComponentTypeBatchingLogProcessor is the builtin SDK batching log record// processor.ComponentTypeBatchingLogProcessorComponentTypeAttr = "batching_log_processor"// ComponentTypeSimpleLogProcessor is the builtin SDK simple log record// processor.ComponentTypeSimpleLogProcessorComponentTypeAttr = "simple_log_processor"// ComponentTypeOtlpGRPCSpanExporter is the OTLP span exporter over gRPC with// protobuf serialization.ComponentTypeOtlpGRPCSpanExporterComponentTypeAttr = "otlp_grpc_span_exporter"// ComponentTypeOtlpHTTPSpanExporter is the OTLP span exporter over HTTP with// protobuf serialization.ComponentTypeOtlpHTTPSpanExporterComponentTypeAttr = "otlp_http_span_exporter"// ComponentTypeOtlpHTTPJSONSpanExporter is the OTLP span exporter over HTTP// with JSON serialization.ComponentTypeOtlpHTTPJSONSpanExporterComponentTypeAttr = "otlp_http_json_span_exporter"// ComponentTypeZipkinHTTPSpanExporter is the zipkin span exporter over HTTP.ComponentTypeZipkinHTTPSpanExporterComponentTypeAttr = "zipkin_http_span_exporter"// ComponentTypeOtlpGRPCLogExporter is the OTLP log record exporter over gRPC// with protobuf serialization.ComponentTypeOtlpGRPCLogExporterComponentTypeAttr = "otlp_grpc_log_exporter"// ComponentTypeOtlpHTTPLogExporter is the OTLP log record exporter over HTTP// with protobuf serialization.ComponentTypeOtlpHTTPLogExporterComponentTypeAttr = "otlp_http_log_exporter"// ComponentTypeOtlpHTTPJSONLogExporter is the OTLP log record exporter over// HTTP with JSON serialization.ComponentTypeOtlpHTTPJSONLogExporterComponentTypeAttr = "otlp_http_json_log_exporter"// ComponentTypePeriodicMetricReader is the builtin SDK periodically exporting// metric reader.ComponentTypePeriodicMetricReaderComponentTypeAttr = "periodic_metric_reader"// ComponentTypeOtlpGRPCMetricExporter is the OTLP metric exporter over gRPC// with protobuf serialization.ComponentTypeOtlpGRPCMetricExporterComponentTypeAttr = "otlp_grpc_metric_exporter"// ComponentTypeOtlpHTTPMetricExporter is the OTLP metric exporter over HTTP// with protobuf serialization.ComponentTypeOtlpHTTPMetricExporterComponentTypeAttr = "otlp_http_metric_exporter"// ComponentTypeOtlpHTTPJSONMetricExporter is the OTLP metric exporter over HTTP// with JSON serialization.ComponentTypeOtlpHTTPJSONMetricExporterComponentTypeAttr = "otlp_http_json_metric_exporter"// ComponentTypePrometheusHTTPTextMetricExporter is the prometheus metric// exporter over HTTP with the default text-based format.ComponentTypePrometheusHTTPTextMetricExporterComponentTypeAttr = "prometheus_http_text_metric_exporter")

typeErrorTypeAttr

type ErrorTypeAttrstring

ErrorTypeAttr is an attribute conforming to the error.type semanticconventions. It represents the describes a class of error the operation endedwith.

var (// ErrorTypeOther is a fallback error value to be used when the instrumentation// doesn't define a custom value.ErrorTypeOtherErrorTypeAttr = "_OTHER")

typeRPCGRPCStatusCodeAttr

type RPCGRPCStatusCodeAttrint64

RPCGRPCStatusCodeAttr is an attribute conforming to the rpc.grpc.status_codesemantic conventions. It represents the gRPC status code of the last gRPCrequests performed in scope of this export call.

var (// RPCGRPCStatusCodeOk is the OK.RPCGRPCStatusCodeOkRPCGRPCStatusCodeAttr = 0// RPCGRPCStatusCodeCancelled is the CANCELLED.RPCGRPCStatusCodeCancelledRPCGRPCStatusCodeAttr = 1// RPCGRPCStatusCodeUnknown is the UNKNOWN.RPCGRPCStatusCodeUnknownRPCGRPCStatusCodeAttr = 2// RPCGRPCStatusCodeInvalidArgument is the INVALID_ARGUMENT.RPCGRPCStatusCodeInvalidArgumentRPCGRPCStatusCodeAttr = 3// RPCGRPCStatusCodeDeadlineExceeded is the DEADLINE_EXCEEDED.RPCGRPCStatusCodeDeadlineExceededRPCGRPCStatusCodeAttr = 4// RPCGRPCStatusCodeNotFound is the NOT_FOUND.RPCGRPCStatusCodeNotFoundRPCGRPCStatusCodeAttr = 5// RPCGRPCStatusCodeAlreadyExists is the ALREADY_EXISTS.RPCGRPCStatusCodeAlreadyExistsRPCGRPCStatusCodeAttr = 6// RPCGRPCStatusCodePermissionDenied is the PERMISSION_DENIED.RPCGRPCStatusCodePermissionDeniedRPCGRPCStatusCodeAttr = 7// RPCGRPCStatusCodeResourceExhausted is the RESOURCE_EXHAUSTED.RPCGRPCStatusCodeResourceExhaustedRPCGRPCStatusCodeAttr = 8// RPCGRPCStatusCodeFailedPrecondition is the FAILED_PRECONDITION.RPCGRPCStatusCodeFailedPreconditionRPCGRPCStatusCodeAttr = 9// RPCGRPCStatusCodeAborted is the ABORTED.RPCGRPCStatusCodeAbortedRPCGRPCStatusCodeAttr = 10// RPCGRPCStatusCodeOutOfRange is the OUT_OF_RANGE.RPCGRPCStatusCodeOutOfRangeRPCGRPCStatusCodeAttr = 11// RPCGRPCStatusCodeUnimplemented is the UNIMPLEMENTED.RPCGRPCStatusCodeUnimplementedRPCGRPCStatusCodeAttr = 12// RPCGRPCStatusCodeInternal is the INTERNAL.RPCGRPCStatusCodeInternalRPCGRPCStatusCodeAttr = 13// RPCGRPCStatusCodeUnavailable is the UNAVAILABLE.RPCGRPCStatusCodeUnavailableRPCGRPCStatusCodeAttr = 14// RPCGRPCStatusCodeDataLoss is the DATA_LOSS.RPCGRPCStatusCodeDataLossRPCGRPCStatusCodeAttr = 15// RPCGRPCStatusCodeUnauthenticated is the UNAUTHENTICATED.RPCGRPCStatusCodeUnauthenticatedRPCGRPCStatusCodeAttr = 16)

typeSDKExporterLogExported

type SDKExporterLogExported struct {metric.Int64Counter}

SDKExporterLogExported is an instrument used to record metric valuesconforming to the "otel.sdk.exporter.log.exported" semantic conventions. Itrepresents the number of log records for which the export has finished, eithersuccessful or failed.

funcNewSDKExporterLogExported

func NewSDKExporterLogExported(mmetric.Meter,opt ...metric.Int64CounterOption,) (SDKExporterLogExported,error)

NewSDKExporterLogExported returns a new SDKExporterLogExported instrument.

func (SDKExporterLogExported)Add

Add adds incr to the existing count for attrs.

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 onlynon-rejected log records count as success.If no rejection reason is available, `rejected` SHOULD be used as value for`error.type`.

func (SDKExporterLogExported)AddSet

AddSet adds incr to the existing count for set.

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 onlynon-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(valstring)attribute.KeyValue

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKExporterLogExported)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKExporterLogExported)AttrErrorType

AttrErrorType returns an optional attribute for the "error.type" semanticconvention. It represents the describes a class of error the operation endedwith.

func (SDKExporterLogExported)AttrServerAddress

func (SDKExporterLogExported) AttrServerAddress(valstring)attribute.KeyValue

AttrServerAddress returns an optional attribute for the "server.address"semantic convention. It represents the server domain name if available withoutreverse DNS lookup; otherwise, IP address or Unix domain socket name.

func (SDKExporterLogExported)AttrServerPort

func (SDKExporterLogExported) AttrServerPort(valint)attribute.KeyValue

AttrServerPort returns an optional attribute for the "server.port" semanticconvention. 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

Inst returns the underlying metric instrument.

func (SDKExporterLogExported)Name

Name returns the semantic convention name of the instrument.

func (SDKExporterLogExported)Unit

Unit returns the semantic convention unit of the instrument

typeSDKExporterLogInflight

type SDKExporterLogInflight struct {metric.Int64UpDownCounter}

SDKExporterLogInflight is an instrument used to record metric valuesconforming to the "otel.sdk.exporter.log.inflight" semantic conventions. Itrepresents the number of log records which were passed to the exporter, butthat have not been exported yet (neither successful, nor failed).

funcNewSDKExporterLogInflight

func NewSDKExporterLogInflight(mmetric.Meter,opt ...metric.Int64UpDownCounterOption,) (SDKExporterLogInflight,error)

NewSDKExporterLogInflight returns a new SDKExporterLogInflight instrument.

func (SDKExporterLogInflight)Add

Add adds incr to the existing count for attrs.

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

AddSet adds incr to the existing count for set.

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(valstring)attribute.KeyValue

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKExporterLogInflight)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKExporterLogInflight)AttrServerAddress

func (SDKExporterLogInflight) AttrServerAddress(valstring)attribute.KeyValue

AttrServerAddress returns an optional attribute for the "server.address"semantic convention. It represents the server domain name if available withoutreverse DNS lookup; otherwise, IP address or Unix domain socket name.

func (SDKExporterLogInflight)AttrServerPort

func (SDKExporterLogInflight) AttrServerPort(valint)attribute.KeyValue

AttrServerPort returns an optional attribute for the "server.port" semanticconvention. 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

Inst returns the underlying metric instrument.

func (SDKExporterLogInflight)Name

Name returns the semantic convention name of the instrument.

func (SDKExporterLogInflight)Unit

Unit returns the semantic convention unit of the instrument

typeSDKExporterMetricDataPointExported

type SDKExporterMetricDataPointExported struct {metric.Int64Counter}

SDKExporterMetricDataPointExported is an instrument used to record metricvalues conforming to the "otel.sdk.exporter.metric_data_point.exported"semantic conventions. It represents the number of metric data points for whichthe export has finished, either successful or failed.

funcNewSDKExporterMetricDataPointExported

func NewSDKExporterMetricDataPointExported(mmetric.Meter,opt ...metric.Int64CounterOption,) (SDKExporterMetricDataPointExported,error)

NewSDKExporterMetricDataPointExported returns a newSDKExporterMetricDataPointExported instrument.

func (SDKExporterMetricDataPointExported)Add

Add adds incr to the existing count for attrs.

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 onlynon-rejected data points count as success.If no rejection reason is available, `rejected` SHOULD be used as value for`error.type`.

func (SDKExporterMetricDataPointExported)AddSet

AddSet adds incr to the existing count for set.

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 onlynon-rejected data points count as success.If no rejection reason is available, `rejected` SHOULD be used as value for`error.type`.

func (SDKExporterMetricDataPointExported)AttrComponentName

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKExporterMetricDataPointExported)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKExporterMetricDataPointExported)AttrErrorType

AttrErrorType returns an optional attribute for the "error.type" semanticconvention. It represents the describes a class of error the operation endedwith.

func (SDKExporterMetricDataPointExported)AttrServerAddress

AttrServerAddress returns an optional attribute for the "server.address"semantic convention. It represents the server domain name if available withoutreverse DNS lookup; otherwise, IP address or Unix domain socket name.

func (SDKExporterMetricDataPointExported)AttrServerPort

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

func (SDKExporterMetricDataPointExported)Description

Description returns the semantic convention description of the instrument

func (SDKExporterMetricDataPointExported)Inst

Inst returns the underlying metric instrument.

func (SDKExporterMetricDataPointExported)Name

Name returns the semantic convention name of the instrument.

func (SDKExporterMetricDataPointExported)Unit

Unit returns the semantic convention unit of the instrument

typeSDKExporterMetricDataPointInflight

type SDKExporterMetricDataPointInflight struct {metric.Int64UpDownCounter}

SDKExporterMetricDataPointInflight is an instrument used to record metricvalues conforming to the "otel.sdk.exporter.metric_data_point.inflight"semantic conventions. It represents the number of metric data points whichwere passed to the exporter, but that have not been exported yet (neithersuccessful, nor failed).

funcNewSDKExporterMetricDataPointInflight

func NewSDKExporterMetricDataPointInflight(mmetric.Meter,opt ...metric.Int64UpDownCounterOption,) (SDKExporterMetricDataPointInflight,error)

NewSDKExporterMetricDataPointInflight returns a newSDKExporterMetricDataPointInflight instrument.

func (SDKExporterMetricDataPointInflight)Add

Add adds incr to the existing count for attrs.

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

AddSet adds incr to the existing count for set.

For successful exports, `error.type` MUST NOT be set. For failed exports,`error.type` MUST contain the failure cause.

func (SDKExporterMetricDataPointInflight)AttrComponentName

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKExporterMetricDataPointInflight)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKExporterMetricDataPointInflight)AttrServerAddress

AttrServerAddress returns an optional attribute for the "server.address"semantic convention. It represents the server domain name if available withoutreverse DNS lookup; otherwise, IP address or Unix domain socket name.

func (SDKExporterMetricDataPointInflight)AttrServerPort

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

func (SDKExporterMetricDataPointInflight)Description

Description returns the semantic convention description of the instrument

func (SDKExporterMetricDataPointInflight)Inst

Inst returns the underlying metric instrument.

func (SDKExporterMetricDataPointInflight)Name

Name returns the semantic convention name of the instrument.

func (SDKExporterMetricDataPointInflight)Unit

Unit returns the semantic convention unit of the instrument

typeSDKExporterOperationDuration

type SDKExporterOperationDuration struct {metric.Float64Histogram}

SDKExporterOperationDuration is an instrument used to record metric valuesconforming to the "otel.sdk.exporter.operation.duration" semantic conventions.It represents the duration of exporting a batch of telemetry records.

funcNewSDKExporterOperationDuration

func NewSDKExporterOperationDuration(mmetric.Meter,opt ...metric.Float64HistogramOption,) (SDKExporterOperationDuration,error)

NewSDKExporterOperationDuration returns a new SDKExporterOperationDurationinstrument.

func (SDKExporterOperationDuration)AttrComponentName

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKExporterOperationDuration)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKExporterOperationDuration)AttrErrorType

AttrErrorType returns an optional attribute for the "error.type" semanticconvention. It represents the describes a class of error the operation endedwith.

func (SDKExporterOperationDuration)AttrHTTPResponseStatusCode

func (SDKExporterOperationDuration) AttrHTTPResponseStatusCode(valint)attribute.KeyValue

AttrHTTPResponseStatusCode returns an optional attribute for the"http.response.status_code" semantic convention. It represents the HTTP statuscode of the last HTTP request performed in scope of this export call.

func (SDKExporterOperationDuration)AttrRPCGRPCStatusCode

AttrRPCGRPCStatusCode returns an optional attribute for the"rpc.grpc.status_code" semantic convention. It represents the gRPC status codeof the last gRPC requests performed in scope of this export call.

func (SDKExporterOperationDuration)AttrServerAddress

AttrServerAddress returns an optional attribute for the "server.address"semantic convention. It represents the server domain name if available withoutreverse DNS lookup; otherwise, IP address or Unix domain socket name.

func (SDKExporterOperationDuration)AttrServerPort

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

func (SDKExporterOperationDuration)Description

Description returns the semantic convention description of the instrument

func (SDKExporterOperationDuration)Inst

Inst returns the underlying metric instrument.

func (SDKExporterOperationDuration)Name

Name returns the semantic convention name of the instrument.

func (SDKExporterOperationDuration)Record

Record records val to the current distribution for attrs.

All additional attrs passed are included in the recorded value.

This metric defines successful operations using the full success definitionsforhttpandgrpc. Anything else is defined as an unsuccessful operation. Forsuccessfuloperations, `error.type` MUST NOT be set. For unsuccessful export operations,`error.type` MUST contain a relevant failure cause.

func (SDKExporterOperationDuration)RecordSet

RecordSet records val to the current distribution for set.

This metric defines successful operations using the full success definitionsforhttpandgrpc. Anything else is defined as an unsuccessful operation. Forsuccessfuloperations, `error.type` MUST NOT be set. For unsuccessful export operations,`error.type` MUST contain a relevant failure cause.

func (SDKExporterOperationDuration)Unit

Unit returns the semantic convention unit of the instrument

typeSDKExporterSpanExported

type SDKExporterSpanExported struct {metric.Int64Counter}

SDKExporterSpanExported is an instrument used to record metric valuesconforming to the "otel.sdk.exporter.span.exported" semantic conventions. Itrepresents the number of spans for which the export has finished, eithersuccessful or failed.

funcNewSDKExporterSpanExported

func NewSDKExporterSpanExported(mmetric.Meter,opt ...metric.Int64CounterOption,) (SDKExporterSpanExported,error)

NewSDKExporterSpanExported returns a new SDKExporterSpanExported instrument.

func (SDKExporterSpanExported)Add

Add adds incr to the existing count for attrs.

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 assuccess.If no rejection reason is available, `rejected` SHOULD be used as value for`error.type`.

func (SDKExporterSpanExported)AddSet

AddSet adds incr to the existing count for set.

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 assuccess.If no rejection reason is available, `rejected` SHOULD be used as value for`error.type`.

func (SDKExporterSpanExported)AttrComponentName

func (SDKExporterSpanExported) AttrComponentName(valstring)attribute.KeyValue

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKExporterSpanExported)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKExporterSpanExported)AttrErrorType

AttrErrorType returns an optional attribute for the "error.type" semanticconvention. It represents the describes a class of error the operation endedwith.

func (SDKExporterSpanExported)AttrServerAddress

func (SDKExporterSpanExported) AttrServerAddress(valstring)attribute.KeyValue

AttrServerAddress returns an optional attribute for the "server.address"semantic convention. It represents the server domain name if available withoutreverse DNS lookup; otherwise, IP address or Unix domain socket name.

func (SDKExporterSpanExported)AttrServerPort

AttrServerPort returns an optional attribute for the "server.port" semanticconvention. 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

Inst returns the underlying metric instrument.

func (SDKExporterSpanExported)Name

Name returns the semantic convention name of the instrument.

func (SDKExporterSpanExported)Unit

Unit returns the semantic convention unit of the instrument

typeSDKExporterSpanInflight

type SDKExporterSpanInflight struct {metric.Int64UpDownCounter}

SDKExporterSpanInflight is an instrument used to record metric valuesconforming to the "otel.sdk.exporter.span.inflight" semantic conventions. Itrepresents the number of spans which were passed to the exporter, but thathave not been exported yet (neither successful, nor failed).

funcNewSDKExporterSpanInflight

func NewSDKExporterSpanInflight(mmetric.Meter,opt ...metric.Int64UpDownCounterOption,) (SDKExporterSpanInflight,error)

NewSDKExporterSpanInflight returns a new SDKExporterSpanInflight instrument.

func (SDKExporterSpanInflight)Add

Add adds incr to the existing count for attrs.

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

AddSet adds incr to the existing count for set.

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(valstring)attribute.KeyValue

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKExporterSpanInflight)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKExporterSpanInflight)AttrServerAddress

func (SDKExporterSpanInflight) AttrServerAddress(valstring)attribute.KeyValue

AttrServerAddress returns an optional attribute for the "server.address"semantic convention. It represents the server domain name if available withoutreverse DNS lookup; otherwise, IP address or Unix domain socket name.

func (SDKExporterSpanInflight)AttrServerPort

AttrServerPort returns an optional attribute for the "server.port" semanticconvention. 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

Inst returns the underlying metric instrument.

func (SDKExporterSpanInflight)Name

Name returns the semantic convention name of the instrument.

func (SDKExporterSpanInflight)Unit

Unit returns the semantic convention unit of the instrument

typeSDKLogCreated

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 logssubmitted to enabled SDK Loggers.

funcNewSDKLogCreated

func NewSDKLogCreated(mmetric.Meter,opt ...metric.Int64CounterOption,) (SDKLogCreated,error)

NewSDKLogCreated returns a new SDKLogCreated instrument.

func (SDKLogCreated)Add

func (mSDKLogCreated) Add(ctxcontext.Context, incrint64, attrs ...attribute.KeyValue)

Add adds incr to the existing count for attrs.

func (SDKLogCreated)AddSet

func (mSDKLogCreated) AddSet(ctxcontext.Context, incrint64, setattribute.Set)

AddSet adds incr to the existing count for set.

func (SDKLogCreated)Description

func (SDKLogCreated) Description()string

Description returns the semantic convention description of the instrument

func (SDKLogCreated)Inst

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

typeSDKMetricReaderCollectionDuration

type SDKMetricReaderCollectionDuration struct {metric.Float64Histogram}

SDKMetricReaderCollectionDuration is an instrument used to record metricvalues conforming to the "otel.sdk.metric_reader.collection.duration" semanticconventions. It represents the duration of the collect operation of the metricreader.

funcNewSDKMetricReaderCollectionDuration

func NewSDKMetricReaderCollectionDuration(mmetric.Meter,opt ...metric.Float64HistogramOption,) (SDKMetricReaderCollectionDuration,error)

NewSDKMetricReaderCollectionDuration returns a newSDKMetricReaderCollectionDuration instrument.

func (SDKMetricReaderCollectionDuration)AttrComponentName

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKMetricReaderCollectionDuration)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKMetricReaderCollectionDuration)AttrErrorType

AttrErrorType returns an optional attribute for the "error.type" semanticconvention. It represents the describes a class of error the operation endedwith.

func (SDKMetricReaderCollectionDuration)Description

Description returns the semantic convention description of the instrument

func (SDKMetricReaderCollectionDuration)Inst

Inst returns the underlying metric instrument.

func (SDKMetricReaderCollectionDuration)Name

Name returns the semantic convention name of the instrument.

func (SDKMetricReaderCollectionDuration)Record

Record records val to the current distribution for attrs.

All additional attrs passed are included in the recorded value.

For successful collections, `error.type` MUST NOT be set. For failedcollections, `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 thefailure causes.

func (SDKMetricReaderCollectionDuration)RecordSet

RecordSet records val to the current distribution for set.

For successful collections, `error.type` MUST NOT be set. For failedcollections, `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 thefailure causes.

func (SDKMetricReaderCollectionDuration)Unit

Unit returns the semantic convention unit of the instrument

typeSDKProcessorLogProcessed

type SDKProcessorLogProcessed struct {metric.Int64Counter}

SDKProcessorLogProcessed is an instrument used to record metric valuesconforming to the "otel.sdk.processor.log.processed" semantic conventions. Itrepresents the number of log records for which the processing has finished,either successful or failed.

funcNewSDKProcessorLogProcessed

func NewSDKProcessorLogProcessed(mmetric.Meter,opt ...metric.Int64CounterOption,) (SDKProcessorLogProcessed,error)

NewSDKProcessorLogProcessed returns a new SDKProcessorLogProcessed instrument.

func (SDKProcessorLogProcessed)Add

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

For successful processing, `error.type` MUST NOT be set. For failedprocessing, `error.type` MUST contain the failure cause.For the SDK Simple and Batching Log Record Processor a log record isconsidered to be processed already when it has been submitted to the exporter,not when the corresponding export call has finished.

func (SDKProcessorLogProcessed)AddSet

AddSet adds incr to the existing count for set.

For successful processing, `error.type` MUST NOT be set. For failedprocessing, `error.type` MUST contain the failure cause.For the SDK Simple and Batching Log Record Processor a log record isconsidered to be processed already when it has been submitted to the exporter,not when the corresponding export call has finished.

func (SDKProcessorLogProcessed)AttrComponentName

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKProcessorLogProcessed)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKProcessorLogProcessed)AttrErrorType

AttrErrorType returns an optional attribute for the "error.type" semanticconvention. It represents a low-cardinality description of the failure reason.SDK Batching Log Record Processors MUST use `queue_full` for log recordsdropped due to a full queue.

func (SDKProcessorLogProcessed)Description

func (SDKProcessorLogProcessed) Description()string

Description returns the semantic convention description of the instrument

func (SDKProcessorLogProcessed)Inst

Inst returns the underlying metric instrument.

func (SDKProcessorLogProcessed)Name

Name returns the semantic convention name of the instrument.

func (SDKProcessorLogProcessed)Unit

Unit returns the semantic convention unit of the instrument

typeSDKProcessorLogQueueCapacity

type SDKProcessorLogQueueCapacity struct {metric.Int64ObservableUpDownCounter}

SDKProcessorLogQueueCapacity is an instrument used to record metric valuesconforming to the "otel.sdk.processor.log.queue.capacity" semanticconventions. It represents the maximum number of log records the queue of agiven instance of an SDK Log Record processor can hold.

funcNewSDKProcessorLogQueueCapacity

NewSDKProcessorLogQueueCapacity returns a new SDKProcessorLogQueueCapacityinstrument.

func (SDKProcessorLogQueueCapacity)AttrComponentName

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKProcessorLogQueueCapacity)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKProcessorLogQueueCapacity)Description

Description returns the semantic convention description of the instrument

func (SDKProcessorLogQueueCapacity)Inst

Inst returns the underlying metric instrument.

func (SDKProcessorLogQueueCapacity)Name

Name returns the semantic convention name of the instrument.

func (SDKProcessorLogQueueCapacity)Unit

Unit returns the semantic convention unit of the instrument

typeSDKProcessorLogQueueSize

type SDKProcessorLogQueueSize struct {metric.Int64ObservableUpDownCounter}

SDKProcessorLogQueueSize is an instrument used to record metric valuesconforming to the "otel.sdk.processor.log.queue.size" semantic conventions. Itrepresents the number of log records in the queue of a given instance of anSDK log processor.

funcNewSDKProcessorLogQueueSize

NewSDKProcessorLogQueueSize returns a new SDKProcessorLogQueueSize instrument.

func (SDKProcessorLogQueueSize)AttrComponentName

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKProcessorLogQueueSize)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKProcessorLogQueueSize)Description

func (SDKProcessorLogQueueSize) Description()string

Description returns the semantic convention description of the instrument

func (SDKProcessorLogQueueSize)Inst

Inst returns the underlying metric instrument.

func (SDKProcessorLogQueueSize)Name

Name returns the semantic convention name of the instrument.

func (SDKProcessorLogQueueSize)Unit

Unit returns the semantic convention unit of the instrument

typeSDKProcessorSpanProcessed

type SDKProcessorSpanProcessed struct {metric.Int64Counter}

SDKProcessorSpanProcessed is an instrument used to record metric valuesconforming to the "otel.sdk.processor.span.processed" semantic conventions. Itrepresents the number of spans for which the processing has finished, eithersuccessful or failed.

funcNewSDKProcessorSpanProcessed

func NewSDKProcessorSpanProcessed(mmetric.Meter,opt ...metric.Int64CounterOption,) (SDKProcessorSpanProcessed,error)

NewSDKProcessorSpanProcessed returns a new SDKProcessorSpanProcessedinstrument.

func (SDKProcessorSpanProcessed)Add

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

For successful processing, `error.type` MUST NOT be set. For failedprocessing, `error.type` MUST contain the failure cause.For the SDK Simple and Batching Span Processor a span is considered to beprocessed already when it has been submitted to the exporter, not when thecorresponding export call has finished.

func (SDKProcessorSpanProcessed)AddSet

AddSet adds incr to the existing count for set.

For successful processing, `error.type` MUST NOT be set. For failedprocessing, `error.type` MUST contain the failure cause.For the SDK Simple and Batching Span Processor a span is considered to beprocessed already when it has been submitted to the exporter, not when thecorresponding export call has finished.

func (SDKProcessorSpanProcessed)AttrComponentName

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKProcessorSpanProcessed)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKProcessorSpanProcessed)AttrErrorType

AttrErrorType returns an optional attribute for the "error.type" semanticconvention. It represents a low-cardinality description of the failure reason.SDK Batching Span Processors MUST use `queue_full` for spans dropped due to afull queue.

func (SDKProcessorSpanProcessed)Description

func (SDKProcessorSpanProcessed) Description()string

Description returns the semantic convention description of the instrument

func (SDKProcessorSpanProcessed)Inst

Inst returns the underlying metric instrument.

func (SDKProcessorSpanProcessed)Name

Name returns the semantic convention name of the instrument.

func (SDKProcessorSpanProcessed)Unit

Unit returns the semantic convention unit of the instrument

typeSDKProcessorSpanQueueCapacity

type SDKProcessorSpanQueueCapacity struct {metric.Int64ObservableUpDownCounter}

SDKProcessorSpanQueueCapacity is an instrument used to record metric valuesconforming to the "otel.sdk.processor.span.queue.capacity" semanticconventions. It represents the maximum number of spans the queue of a giveninstance of an SDK span processor can hold.

funcNewSDKProcessorSpanQueueCapacity

NewSDKProcessorSpanQueueCapacity returns a new SDKProcessorSpanQueueCapacityinstrument.

func (SDKProcessorSpanQueueCapacity)AttrComponentName

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKProcessorSpanQueueCapacity)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKProcessorSpanQueueCapacity)Description

Description returns the semantic convention description of the instrument

func (SDKProcessorSpanQueueCapacity)Inst

Inst returns the underlying metric instrument.

func (SDKProcessorSpanQueueCapacity)Name

Name returns the semantic convention name of the instrument.

func (SDKProcessorSpanQueueCapacity)Unit

Unit returns the semantic convention unit of the instrument

typeSDKProcessorSpanQueueSize

type SDKProcessorSpanQueueSize struct {metric.Int64ObservableUpDownCounter}

SDKProcessorSpanQueueSize is an instrument used to record metric valuesconforming 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 SDKspan processor.

funcNewSDKProcessorSpanQueueSize

NewSDKProcessorSpanQueueSize returns a new SDKProcessorSpanQueueSizeinstrument.

func (SDKProcessorSpanQueueSize)AttrComponentName

AttrComponentName returns an optional attribute for the "otel.component.name"semantic convention. It represents a name uniquely identifying the instance ofthe OpenTelemetry component within its containing SDK instance.

func (SDKProcessorSpanQueueSize)AttrComponentType

AttrComponentType returns an optional attribute for the "otel.component.type"semantic convention. It represents a name identifying the type of theOpenTelemetry component.

func (SDKProcessorSpanQueueSize)Description

func (SDKProcessorSpanQueueSize) Description()string

Description returns the semantic convention description of the instrument

func (SDKProcessorSpanQueueSize)Inst

Inst returns the underlying metric instrument.

func (SDKProcessorSpanQueueSize)Name

Name returns the semantic convention name of the instrument.

func (SDKProcessorSpanQueueSize)Unit

Unit returns the semantic convention unit of the instrument

typeSDKSpanLive

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 createdspans with `recording=true` for which the end operation has not been calledyet.

funcNewSDKSpanLive

NewSDKSpanLive returns a new SDKSpanLive instrument.

func (SDKSpanLive)Add

func (mSDKSpanLive) Add(ctxcontext.Context,incrint64,attrs ...attribute.KeyValue,)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

func (SDKSpanLive)AddSet

func (mSDKSpanLive) AddSet(ctxcontext.Context, incrint64, setattribute.Set)

AddSet adds incr to the existing count for set.

func (SDKSpanLive)AttrSpanSamplingResult

func (SDKSpanLive) AttrSpanSamplingResult(valSpanSamplingResultAttr)attribute.KeyValue

AttrSpanSamplingResult returns an optional attribute for the"otel.span.sampling_result" semantic convention. It represents the resultvalue 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

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

typeSDKSpanStarted

type SDKSpanStarted struct {metric.Int64Counter}

SDKSpanStarted is an instrument used to record metric values conforming to the"otel.sdk.span.started" semantic conventions. It represents the number ofcreated spans.

funcNewSDKSpanStarted

func NewSDKSpanStarted(mmetric.Meter,opt ...metric.Int64CounterOption,) (SDKSpanStarted,error)

NewSDKSpanStarted returns a new SDKSpanStarted instrument.

func (SDKSpanStarted)Add

func (mSDKSpanStarted) Add(ctxcontext.Context,incrint64,attrs ...attribute.KeyValue,)

Add adds incr to the existing count for attrs.

All additional attrs passed are included in the recorded value.

Implementations MUST record this metric for all spans, even for non-recordingones.

func (SDKSpanStarted)AddSet

func (mSDKSpanStarted) AddSet(ctxcontext.Context, incrint64, setattribute.Set)

AddSet adds incr to the existing count for set.

Implementations MUST record this metric for all spans, even for non-recordingones.

func (SDKSpanStarted)AttrSpanParentOrigin

func (SDKSpanStarted) AttrSpanParentOrigin(valSpanParentOriginAttr)attribute.KeyValue

AttrSpanParentOrigin returns an optional attribute for the"otel.span.parent.origin" semantic convention. It represents the determineswhether the span has a parent span, and if so,whether it is a remote parent.

func (SDKSpanStarted)AttrSpanSamplingResult

func (SDKSpanStarted) AttrSpanSamplingResult(valSpanSamplingResultAttr)attribute.KeyValue

AttrSpanSamplingResult returns an optional attribute for the"otel.span.sampling_result" semantic convention. It represents the resultvalue of the sampler for this span.

func (SDKSpanStarted)Description

func (SDKSpanStarted) Description()string

Description returns the semantic convention description of the instrument

func (SDKSpanStarted)Inst

Inst returns the underlying metric instrument.

func (SDKSpanStarted)Name

func (SDKSpanStarted) Name()string

Name returns the semantic convention name of the instrument.

func (SDKSpanStarted)Unit

func (SDKSpanStarted) Unit()string

Unit returns the semantic convention unit of the instrument

typeSpanParentOriginAttr

type SpanParentOriginAttrstring

SpanParentOriginAttr is an attribute conforming to the otel.span.parent.originsemantic conventions. It represents the determines whether the span has aparent span, and if so,whether it is a remote parent.

var (// SpanParentOriginNone is the span does not have a parent, it is a root span.SpanParentOriginNoneSpanParentOriginAttr = "none"// SpanParentOriginLocal is the span has a parent and the parent's span context// [isRemote()] is false.//// [isRemote()]:https://opentelemetry.io/docs/specs/otel/trace/api/#isremoteSpanParentOriginLocalSpanParentOriginAttr = "local"// SpanParentOriginRemote is the span has a parent and the parent's span context// [isRemote()] is true.//// [isRemote()]:https://opentelemetry.io/docs/specs/otel/trace/api/#isremoteSpanParentOriginRemoteSpanParentOriginAttr = "remote")

typeSpanSamplingResultAttr

type SpanSamplingResultAttrstring

SpanSamplingResultAttr is an attribute conforming to theotel.span.sampling_result semantic conventions. It represents the result valueof the sampler for this span.

var (// SpanSamplingResultDrop is the span is not sampled and not recording.SpanSamplingResultDropSpanSamplingResultAttr = "DROP"// SpanSamplingResultRecordOnly is the span is not sampled, but recording.SpanSamplingResultRecordOnlySpanSamplingResultAttr = "RECORD_ONLY"// SpanSamplingResultRecordAndSample is the span is sampled and recording.SpanSamplingResultRecordAndSampleSpanSamplingResultAttr = "RECORD_AND_SAMPLE")

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp