Skip to content
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

Remove MessageBroker metric for ActiveJob #1811

Merged
merged 4 commits into from
Feb 9, 2023

Conversation

hannahramadan
Copy link
Contributor

@hannahramadan hannahramadan commented Feb 8, 2023

ActiveJob isn't considered a MessageBroker. This PR cleans up naming and associated tests.

Closes #1151

@hannahramadan hannahramadan changed the title Replace 'MessageBroker/' with 'ActiveSupport/' Replace 'MessageBroker/' with 'ActiveJob/' Feb 8, 2023
@hannahramadan hannahramadan changed the title Replace 'MessageBroker/' with 'ActiveJob/' Remove MessageBroker metric for ActiveJob Feb 8, 2023
@hannahramadan hannahramadan marked this pull request as ready for review February 8, 2023 22:12
Copy link
Contributor

@tannalynn tannalynn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a changelog entry for this before we get this merged?

@@ -71,7 +71,7 @@ def self.perform(job, block)
end

def self.run_in_trace(job, block, event)
trace_execution_scoped("MessageBroker/#{adapter}/Queue/#{event}/Named/#{job.queue_name}",
trace_execution_scoped("ActiveJob/#{adapter}/Queue/#{event}/Named/#{job.queue_name}",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the resulting change:

- MessageBroker/ActiveJob::Inline/Queue/Produce/MyQueueName
+ ActiveJob/ActiveJob::Inline/Queue/Produce/MyQueueName

I'm questioning the double ActiveJob string appearances. Maybe we should trim the leading ActiveJob:: string off of the adapter:

adapter.sub(/^ActiveJob::/, '')

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this! The repetition isn't necessary. I've made this edit - thanks for providing the regex.

CHANGELOG.md Outdated Show resolved Hide resolved
spelling fix
@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2023

SimpleCov Report

Coverage Threshold
Line 93.94% 93%
Branch 85.37% 84%

@hannahramadan hannahramadan merged commit 70fed2a into major-release-9 Feb 9, 2023
@hannahramadan hannahramadan deleted the activejob_metric_rename branch February 9, 2023 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants