func SpanContextToW3CString(sc trace.SpanContext) string {
	return fmt.Sprintf("%x-%x-%x-%x",
		[]byte{supportedVersion},
		sc.TraceID[:],
		sc.SpanID[:],
		[]byte{byte(sc.TraceOptions)})
}
SpanContextToW3CString returns the SpanContext string representation.
package diagnostics
import (
	"context"
	"encoding/hex"
	"fmt"
	"strings"
	"go.opencensus.io/trace"
	"go.opencensus.io/trace/tracestate"
	"github.com/dapr/dapr/pkg/config"
	diag_utils "github.com/dapr/dapr/pkg/diagnostics/utils"
	"go.opentelemetry.io/otel/semconv"
)
const (
	daprHeaderPrefix    = "dapr-"
	daprHeaderBinSuffix = "-bin"
	daprInternalSpanAttrPrefix = "__dapr."
	daprAPISpanNameInternal = daprInternalSpanAttrPrefix + "spanname"
	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"
)
var messagingDestinationTopicKind = semconv.MessagingDestinationKindKeyTopic.Value.AsString()