-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Track const config values in analytics #10120
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
Conversation
d58a337
to
f3e8b8b
Compare
// Note: this doesn't handle additionalProperties, so if a config contains properties that are not | ||
// explicitly declared in the schema, they will be ignored. |
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.
Would it be worth reporting the names of additionalProperties
not declared in the schema instead of ignoring them?
If we studied the metadata sent to segment on those, we could have a sense of what's missing in the connector specs maybe?
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.
realized that I might as well just handle additionalProperties in a smarter way, can you take a look at this? e74066d#diff-8ef120819d2dd157a1e8d1838a49917772872273fefb9719b56aa303174581abL235-R261
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.
LGTM!
What
Closes #9618
How
JobTracker now uses the config spec to determine which values are
const
, and inserts them into the event metadata appropriately.Notably:
properties
fieldoneOf
schemas are manually matched against the config. This is pretty inefficient - a deeply-nested config with manyoneOf
s would match the "leaf" nodes many times. But that doesn't seem likely to actually happen.Recommended reading order
mergeMaps
,flatten
, and then the twoconfigToMetadata
methods. Then read the rest of the filetestConfigToMetadata
; everything else is just to fix the mocked ConfigRepository objects🚨 User Impact 🚨
Nope