-
Notifications
You must be signed in to change notification settings - Fork 117
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
Ownership integration #1364
Ownership integration #1364
Conversation
✔️ All good! |
fc609cd
to
64de16d
Compare
@tombruijn I'm interested in any thoughts about the transaction |
ce2844a
to
c90e520
Compare
c90e520
to
aa6f75e
Compare
Add a new `instrument_ownership` configuration option that can be used to toggle off instrumentation for the `ownership` gem.
aa6f75e
to
2132859
Compare
2132859
to
b2b50cb
Compare
Add a configuration option that toggles whether the Ownership gem integration sets namespaces, or only sets tags. It defaults to false, meaning it only sets tags.
Add a hook that allows for blocks of arbitrary code to be applied to modify a transaction after it has been created.
Add a `before_complete` transaction hook, which is executed right before a transaction is completed. Note that, for transactions containing multiple errors, this hook is called once for each of the duplicate transactions that is used to report each of the errors. This allows the context to be customised for each error.
b2b50cb
to
ed09e31
Compare
Hi @unflxw, We've found new issues for this Pull Request. Please see the main comment on this issue for a list of all current warnings. This comment will not be updated to reflect resolved warnings.
|
ed09e31
to
b47ddd9
Compare
Add an instrumentation for the `ownership` gem. When a transaction is created, if an owner has been set in the gem, use the name of the owner as the owner tag for the transaction. Do the same when an owner is set during an active transaction. If more than one owner is set during a transaction, the owner tag will be that of the last owner that was set. When the `ownership_set_namespace` config option is enabled, set the namespace for the transaction to the owner as well.
b47ddd9
to
865b348
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1 similar comment
This is a message from the daily scheduled checks. |
Implements an integration for the
ownership
gem, as discussed on Slack.Commits
Add instrument_ownership config option
Add a new
instrument_ownership
configuration option that can beused to toggle off instrumentation for the
ownership
gem.Add after_create transaction hook
Add a hook that allows for blocks of arbitrary code to be applied to
modify a transaction after it has been created.
Add before_complete transaction hook
Add a
before_complete
transaction hook, which is executed rightbefore a transaction is completed. Note that, for transactions
containing multiple errors, this hook is called once for each of
the duplicate transactions that is used to report each of the
errors. This allows the context to be customised for each error.
Instrument ownership gem
Add an instrumentation for the
ownership
gem. When a transactionis created, if an owner has been set in the gem, use the name of
the owner as the namespace for the transaction. Do the same when an
owner is set during an active transaction.
If more than one owner is set during a transaction, the namespace
will be that of the last owner that was set.
Notes
@thijsc mentioned it would be nice to contribute this to the gem itself. I took a look at that, but I noticed we'd need something like the
after_create
andbefore_complete
hooks in this PR to make it work. That said, now that those hooks exist, it should be possible to make them part of the public API, discard the instrumentation in this PR, and instead contribute an instrumentation as a PR to the gem.@matsimitsu suggested using the owner information to automatically assign errors (and performance issues?) to teams, instead of setting the owner as the namespace. At the moment, this PR uses namespaces, but we could use team assignments instead, or alongside it. Beyond this gem, customers might find it useful to be able to set metadata on their transactions and traces that causes them to automatically be assigned to a team or person. I'm unsure how much work that would be, though.
Regarding testing it, I attempted to use a mock to test it, like we do for several other dependencies. It is possible, but I found myself re-implementing the gem and doubting whether my implementation was an accurate representation of the original, so I decided to add a gemfile instead. I'm happy to reconsider this if we want to avoid the additional gemfile and its corresponding CI runs.