consts

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DaprInternalSpanAttrPrefix is the internal span attribution prefix.
	// Middleware will not populate it if the span key starts with this prefix.
	DaprInternalSpanAttrPrefix = "__dapr."
	// DaprAPISpanNameInternal is the internal attribution, but not populated to span attribution.
	DaprAPISpanNameInternal = DaprInternalSpanAttrPrefix + "spanname"

	// Span attribute keys
	// Reference trace semantics https://github.com/open-telemetry/opentelemetry-specification/tree/master/specification/trace/semantic_conventions
	DBSystemSpanAttributeKey                 = string(semconv.DBSystemKey)
	DBNameSpanAttributeKey                   = string(semconv.DBNameKey)
	DBStatementSpanAttributeKey              = string(semconv.DBStatementKey)
	DBConnectionStringSpanAttributeKey       = string(semconv.DBConnectionStringKey)
	MessagingSystemSpanAttributeKey          = string(semconv.MessagingSystemKey)
	MessagingDestinationSpanAttributeKey     = string(semconv.MessagingDestinationKey)
	MessagingDestinationKindSpanAttributeKey = string(semconv.MessagingDestinationKindKey)
	GrpcServiceSpanAttributeKey              = string(semconv.RPCServiceKey)
	NetPeerNameSpanAttributeKey              = string(semconv.NetPeerNameKey)

	DaprAPISpanAttributeKey           = "dapr.api"
	DaprAPIStatusCodeSpanAttributeKey = "dapr.status_code"
	DaprAPIProtocolSpanAttributeKey   = "dapr.protocol"
	DaprAPIInvokeMethod               = "dapr.invoke_method"
	DaprAPIActorTypeID                = "dapr.actor"

	DaprAPIHTTPSpanAttrValue = "http"
	DaprAPIGRPCSpanAttrValue = "grpc"

	StateBuildingBlockType   = "state"
	SecretBuildingBlockType  = "secrets"
	BindingBuildingBlockType = "bindings"
	PubsubBuildingBlockType  = "pubsub"

	DaprGRPCServiceInvocationService = "ServiceInvocation"
	DaprGRPCDaprService              = "Dapr"

	// Keys used in the context's metadata for streaming calls
	// Note: these keys must always be all-lowercase
	DaprCallLocalStreamMethodKey = "__dapr_calllocalstream_method"
)

Variables

View Source
var MessagingDestinationTopicKind = semconv.MessagingDestinationKindTopic.Value.AsString()

MessagingDestinationTopicKind is effectively const, but isn't a const from upstream.

Functions

This section is empty.

Types

type GrpcAppendSpanAttributesFn

type GrpcAppendSpanAttributesFn interface {
	// AppendSpanAttributes appends attributes to the map used for the span in tracing for the gRPC method.
	AppendSpanAttributes(rpcMethod string, m map[string]string)
}

GrpcAppendSpanAttributesFn is the interface that applies to gRPC requests that add span attributes.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL