-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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(generic-metrics): Rename UseCaseKey to MetricPathKey #46575
Conversation
@@ -24,7 +24,7 @@ def get(self, request: Request, organization: Organization) -> Response: | |||
organization_id=organization.id, | |||
start=params["start"], | |||
end=params["end"], | |||
use_case_id=UseCaseKey.PERFORMANCE, | |||
use_case_id=MetricPathKey.PERFORMANCE, |
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.
It's a little confusing that we still call these use_case_id
s everywhere... is the plan to eventually change that too?
Are you also planning on migrating https://github.com/getsentry/sentry-kafka-schemas/blob/cfb239064878bb0a1a33f863da15ee88bb98767d/schemas/snuba-generic-metrics.v1.schema.json#L11 where it is still called use_case_id |
No, this wouldn't change. The message payloads will contain the true use_case_id before being sent to Snuba so this name (use_case_id) is accurate. |
Update: We're going to hold off on making this change until |
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
db9fc62
to
6006600
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #46575 +/- ##
==========================================
+ Coverage 81.12% 81.16% +0.03%
==========================================
Files 4853 4863 +10
Lines 204319 203958 -361
Branches 11130 11159 +29
==========================================
- Hits 165755 165540 -215
+ Misses 38318 38172 -146
Partials 246 246
|
This pull request has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you label it "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
As we expand the generic metrics platform to take on new use cases alongside the existing Performance use case, we will be introducing a new notion of use case. Currently, this
UseCaseKey
is used for configuring and instantiating the metrics (release health) and generic metrics (performance) consumers/indexers. With the introduction of new use cases that will fall under generic metrics, we will need to renameUseCaseKey
to something that will be closer to what it does -- determine which metrics path (metrics or generic metrics) traffic will be flowing into. That's what this PR does.[Future, but related work:]
We would eventually like to rename the
Performance
entry toGenericMetrics
. This will happen once we have a new use case onboarded. The approach for this will need to be decided on, since this enum is currently used to start up the generic metrics consumer, and configure and initialize it. It is also used throughout the message processing pipeline and the indexer.The approach that I'm planning to use:
GenericMetrics
to theMetricPathKey
enum. Update all references toPerformance
in the code to now beGenericMetrics
. In this same PR, add an override in the indexer CLI that will take the CLI input (Performance
, currently) and convert it toGenericMetrics
inside the entrypoint function.GenericMetrics
Performance
from the indexer CLII'm planning on putting the above in separate PRs from this one, once we have a new use case onboarded and are ready to make this switch.