-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(metrics): initialise MULTIPLEXED_METRIC_ROUTING_KEY for routing #19096
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
base: develop
Are you sure you want to change the base?
feat(metrics): initialise MULTIPLEXED_METRIC_ROUTING_KEY for routing #19096
Conversation
|
Hi @chargome, the PR is ready to review. Thanks ! |
chargome
left a comment
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.
Nice, thanks for opening the PR! I left some comments. Also, we definitely want to test this behaviour somehow in a browser integration test.
| const container = Array.isArray(item) ? (item[1] as SerializedMetricContainer) : undefined; | ||
| const containerItems = container?.items; | ||
| if (containerItems) { | ||
| metric = containerItems[0]; |
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.
Wouldn't this mean we always just pull the first metric?
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.
yes it would mean we pull the first metric. What I'm thinking now after your comment is that I can add a logic which will check if all metrics and route to same or multiple destinations. Whats your opinion ?
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| * The release of the Sentry project to send the metric to. | ||
| */ | ||
| release?: string; | ||
| } |
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.
New MetricRoutingInfo type not exported from package
Low Severity
The new MetricRoutingInfo interface is defined and used in MetricOptions.routing (as Array<MetricRoutingInfo>), but it's not exported from the package's main entry point (packages/core/src/index.ts). Users can use the routing option but cannot import MetricRoutingInfo to properly type their routing configuration. Other metric types like Metric, MetricType, and SerializedMetric are exported, so this appears to be an oversight.


Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint) & (yarn test).Closes #18913
What changed
metricsMetricRoutingInfowith dsn and release as its fieldMetricOptionsand enabledcaptureMetricto inject routing info into attributesInternalCaptureMetricOptions_stripRoutingAttributesfunction which removes routing info before sending to sentry