-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
feat: add geolocation to trace events #724
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is even more headers that might come in handy, e.g. cf-region
. Do we really want to make this a slice? I think that will make it quite hard to use for queries, e.g. query by country. What if (for whatever reason) only the cf-city
header is set but not cf-country
? Or the other way around? What if we want to add the region later?
Copypasta from https://github.com/ory/kratos/blob/159c13142a11d4a9cd006da5d0afdda9e0f94ca9/session/session.go#L272-L278 We could factor our this functionality and put it in ory/x. 🤷 |
I still think it makes more sense to put city and country in different attributes. For sessions, it is fine to produce a human-readable string instead, as the information is only a hint for users to distinguish sessions. In event attributes however, we want to query by the attribute, which in turn is hard when multiple attributes are mixed into one slice. |
I don't disagree. Up to @mszekiel. I just wanted to show him where to add this data. |
Okay, I'll take this PR with me as Arne mentioned that's an intro and will continue changing the data structure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few minor improvements and FYIs.
70e529b
to
2f44f73
Compare
No description provided.