@@ -24,17 +24,19 @@ func (a AttributeKey) String() string {
2424}
2525
2626const (
27- AttributeKeyIdentityID AttributeKey = "IdentityID"
28- AttributeKeyNID AttributeKey = "ProjectID"
29- AttributeKeyClientIP AttributeKey = "ClientIP"
30- AttributeKeyGeoLocationCity AttributeKey = "GeoLocationCity"
31- AttributeKeyGeoLocationRegion AttributeKey = "GeoLocationRegion"
32- AttributeKeyGeoLocationCountry AttributeKey = "GeoLocationCountry"
33- AttributeKeyWorkspace AttributeKey = "WorkspaceID"
34- AttributeKeySubscriptionID AttributeKey = "SubscriptionID"
35- AttributeKeyProjectEnvironment AttributeKey = "ProjectEnvironment"
36- AttributeKeyWorkspaceAPIKeyID AttributeKey = "WorkspaceAPIKeyID"
37- AttributeKeyProjectAPIKeyID AttributeKey = "ProjectAPIKeyID"
27+ AttributeKeyIdentityID AttributeKey = "IdentityID"
28+ AttributeKeyNID AttributeKey = "ProjectID"
29+ AttributeKeyClientIP AttributeKey = "ClientIP"
30+ AttributeKeyGeoLocationCity AttributeKey = "GeoLocationCity"
31+ AttributeKeyGeoLocationRegion AttributeKey = "GeoLocationRegion"
32+ AttributeKeyGeoLocationCountry AttributeKey = "GeoLocationCountry"
33+ AttributeKeyGeoLocationLatitude AttributeKey = "GeoLocationLatitude"
34+ AttributeKeyGeoLocationLongitude AttributeKey = "GeoLocationLongitude"
35+ AttributeKeyWorkspace AttributeKey = "WorkspaceID"
36+ AttributeKeySubscriptionID AttributeKey = "SubscriptionID"
37+ AttributeKeyProjectEnvironment AttributeKey = "ProjectEnvironment"
38+ AttributeKeyWorkspaceAPIKeyID AttributeKey = "WorkspaceAPIKeyID"
39+ AttributeKeyProjectAPIKeyID AttributeKey = "ProjectAPIKeyID"
3840)
3941
4042func AttrIdentityID [V string | uuid.UUID ](val V ) otelattr.KeyValue {
@@ -73,6 +75,12 @@ func AttrGeoLocation(val httpx.GeoLocation) []otelattr.KeyValue {
7375 if val .Region != "" {
7476 geoLocationAttributes = append (geoLocationAttributes , otelattr .String (AttributeKeyGeoLocationRegion .String (), val .Region ))
7577 }
78+ if val .Latitude != nil {
79+ geoLocationAttributes = append (geoLocationAttributes , otelattr .Float64 (AttributeKeyGeoLocationLatitude .String (), * val .Latitude ))
80+ }
81+ if val .Longitude != nil {
82+ geoLocationAttributes = append (geoLocationAttributes , otelattr .Float64 (AttributeKeyGeoLocationLongitude .String (), * val .Longitude ))
83+ }
7684
7785 return geoLocationAttributes
7886}
0 commit comments