Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update semconv comments #1249

Merged
merged 3 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions semconv/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ const (
CloudZoneKey = label.Key("cloud.zone")
)

// Semantic conventions for common cloud provider resource attributes.
var (
CloudProviderAWS = CloudProviderKey.String("aws")
CloudProviderAzure = CloudProviderKey.String("azure")
Expand Down
18 changes: 18 additions & 0 deletions semconv/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const (
NetHostNameKey = label.Key("net.host.name")
)

// Semantic conventions for common transport protocol attributes.
var (
NetTransportTCP = NetTransportKey.String("IP.TCP")
NetTransportUDP = NetTransportKey.String("IP.UDP")
Expand Down Expand Up @@ -126,10 +127,13 @@ const (
HTTPResponseContentLengthUncompressedKey = label.Key("http.response_content_length_uncompressed")
)

// Semantic conventions for common HTTP attributes.
var (
// Semantic conventions for HTTP(S) URI schemes.
HTTPSchemeHTTP = HTTPSchemeKey.String("http")
HTTPSchemeHTTPS = HTTPSchemeKey.String("https")

// Semantic conventions for HTTP protocols.
HTTPFlavor1_0 = HTTPFlavorKey.String("1.0")
HTTPFlavor1_1 = HTTPFlavorKey.String("1.1")
HTTPFlavor2 = HTTPFlavorKey.String("2")
Expand All @@ -149,6 +153,7 @@ const (
DBUserKey = label.Key("db.user")
)

// Semantic conventions for common database system attributes.
var (
DBSystemDB2 = DBSystemKey.String("db2") // IBM DB2
DBSystemDerby = DBSystemKey.String("derby") // Apache Derby
Expand Down Expand Up @@ -227,11 +232,15 @@ const (
RPCMessageUncompressedSizeKey = label.Key("message.uncompressed_size")
)

// Semantic conventions for common RPC attributes.
var (
// Semantic convention for gRPC as the remoting system.
RPCSystemGRPC = RPCSystemKey.String("grpc")

// Semantic convention for a message named message.
RPCNameMessage = RPCNameKey.String("message")

// Semantic conventions for RPC message types.
RPCMessageTypeSent = RPCMessageTypeKey.String("SENT")
RPCMessageTypeReceived = RPCMessageTypeKey.String("RECEIVED")
)
Expand Down Expand Up @@ -280,12 +289,18 @@ const (
MessagingRabbitMQRoutingKeyKey = label.Key("messaging.rabbitmq.routing_key")
)

// Semantic conventions for common messaging system attributes.
var (
// Semantic conventions for message destinations.
MessagingDestinationKindKeyQueue = MessagingDestinationKindKey.String("queue")
MessagingDestinationKindKeyTopic = MessagingDestinationKindKey.String("topic")

// Semantic convention for message destinations that are temporary.
MessagingTempDestination = MessagingTempDestinationKey.Bool(true)

// Semantic convention for the operation parts of message consumption.
// This does not include a "send" attribute as that is explicitly not
// allowed in the OpenTelemetry specification.
MessagingOperationReceive = MessagingOperationKey.String("receive")
MessagingOperationProcess = MessagingOperationKey.String("process")
)
Expand Down Expand Up @@ -324,13 +339,16 @@ const (
FaaSCronKey = label.Key("faas.cron")
)

// Semantic conventions for common FaaS system attributes.
var (
// Semantic conventions for the types of triggers.
FaasTriggerDatasource = FaaSTriggerKey.String("datasource")
FaasTriggerHTTP = FaaSTriggerKey.String("http")
FaasTriggerPubSub = FaaSTriggerKey.String("pubsub")
FaasTriggerTimer = FaaSTriggerKey.String("timer")
FaasTriggerOther = FaaSTriggerKey.String("other")

// Semantic conventions for the types of operations performed.
FaaSDocumentOperationInsert = FaaSDocumentOperationKey.String("insert")
FaaSDocumentOperationEdit = FaaSDocumentOperationKey.String("edit")
FaaSDocumentOperationDelete = FaaSDocumentOperationKey.String("delete")
Expand Down