Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Instrument bundler version #3283
Instrument bundler version #3283
Changes from all commits
c3071cf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Thoughts on keeping track of event names here as constants?
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.
I dig it!
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.
Hmm, it does make it harder to remove the instrumentation. When this is just a string, we can keep the
subscribe
call in the calling code while we remove all of the instrumentation code, the calling code will just noop. Now we need to be careful to not remove the constant because it would break upstream usageThere 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.
In this single scenario I don't think ^ matters much, but when thinking about a generic system that lets us instrument all sort of things, I feel like optimizing to make it easy to add/delete notifications without friction is something to strive for. Thoughts?
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.
Good point, maybe doesn't make sense to add all notifications as constants but seems ok for ones that we care more about routing to specific places, for this one we'll probably want to end up persisting on update jobs directly whereas other ones we might just want to pass straight through to datadog?
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.
I agree that ideally it would be easier to add more, but I'm very mildly paranoid that core, as a public library, could have instrumentation added to it that we might not want to relay through our runner to instrumentation services.
Having a list of constants in Dependabot Core allows us to programmatically filter events as we can, by default relay all constants in Dependabot::Notifications.
We'd have to consciously bump dependabot-core in our runner to allow new notification to relay which would decouple a core upgrade from a sudden surge of new events hitting our instrumentation layer.
</tinfoil-hat>
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.
Good point @brrygrdn, my thinking was that we would only subscribe to specific events and not relay anything, but I can definitely see us moving towards that approach