Way to get caller client ip address in RouterRequest #1212
-
Is there a way to get the callers client ip address from the RouterRequest??? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 7 replies
-
This is a great idea! As part of our efforts to stabilize the extensions api, we're going to think of a way to expose this, possibly using ConnectInfo. |
Beta Was this translation helpful? Give feedback.
-
The reason i ask is because I have written custom logging to "mimick" a tomcat access log that we are consuming in datadog.. the first part of the output is the caller ip address.. you can see the progressions to downstream services `0:0:0:0:0:0:0:1 - - [10/Jun/2022:10:31:48.780 -0400] "POST /localhost:9080/api/v4/graphql/shpst_favoritesSearch?cashback=0&inStock=true&limit=2&offset=0&userId=23425584 HTTP/1.1" 200 1297 "ff99705d-ee79-48ee-ba88-aa745509bae3" "1654871508548051000" "GraphQLRestGateway#@US25020249" 232 0:0:0:0:0:0:0:1 - - [10/Jun/2022:10:31:48.957 -0400] "POST /localhost:9090/api/v4/graphql/shpst_favoritesSearch/entity/Product?id=920196886&curatorUserId=23425584&productIndexTs=1653464915000&favCount=21&imageId=d8c670167646f48c7dbb22bbb211d0cb&userHasFav=true&queryLocale=en_US&id=818503709&curatorUserId=23425584&productIndexTs=1653463312000&favCount=30&imageId=48adeba416ae0fedb3a96df3014f60a8&userHasFav=true&queryLocale=en_US HTTP/1.1" 200 7825 "ff99705d-ee79-48ee-ba88-aa745509bae3" "1654871508781815000" "GraphQLRestGateway#@US25020249" 175 0:0:0:0:0:0:0:1 - - [10/Jun/2022:10:31:48.984 -0400] "POST /localhost:9095/api/v4/graphql/shpst_favoritesSearch/entity/MetadataUser?id=23425584 HTTP/1.1" 200 134 "ff99705d-ee79-48ee-ba88-aa745509bae3" "1654871508781851000" "GraphQLRestGateway#@US25020249" 202 0:0:0:0:0:0:0:1 - - [10/Jun/2022:10:31:48.988 -0400] "POST /shpst_favoritesSearch?cashback=0&inStock=true&limit=2&offset=0&userId=23425584 HTTP/1.1" 200 8695 "ff99705d-ee79-48ee-ba88-aa745509bae3" "1654871508487110000" "GraphQLRestGateway#@US25020249" 501` |
Beta Was this translation helpful? Give feedback.
-
answered in other issue about getting server name |
Beta Was this translation helpful? Give feedback.
answered in other issue about getting server name