Skip to content

Commit

Permalink
feat(semconv): add more attributes (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
hperl committed Apr 19, 2024
1 parent a7a3c8a commit 0b91ab7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions otelx/semconv/events.go
Expand Up @@ -31,6 +31,8 @@ const (
AttributeKeyGeoLocationRegion AttributeKey = "GeoLocationRegion"
AttributeKeyGeoLocationCountry AttributeKey = "GeoLocationCountry"
AttributeKeyWorkspace AttributeKey = "WorkspaceID"
AttributeKeySubscriptionID AttributeKey = "SubscriptionID"
AttributeKeyProjectEnvironment AttributeKey = "ProjectEnvironment"
)

func AttrIdentityID(val uuid.UUID) otelattr.KeyValue {
Expand All @@ -45,6 +47,14 @@ func AttrWorkspace(val uuid.UUID) otelattr.KeyValue {
return otelattr.String(AttributeKeyWorkspace.String(), val.String())
}

func AttrSubscription(val uuid.UUID) otelattr.KeyValue {
return otelattr.String(AttributeKeySubscriptionID.String(), val.String())
}

func AttrProjectEnvironment(val string) otelattr.KeyValue {
return otelattr.String(AttributeKeyProjectEnvironment.String(), val)
}

func AttrClientIP(val string) otelattr.KeyValue {
return otelattr.String(AttributeKeyClientIP.String(), val)
}
Expand Down

0 comments on commit 0b91ab7

Please sign in to comment.