-
Notifications
You must be signed in to change notification settings - Fork 126
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
RUMM-3460 feat: Add "Batch Closed" telemetry #1386
RUMM-3460 feat: Add "Batch Closed" telemetry #1386
Conversation
Datadog ReportBranch report: ✅ |
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.
💯 test cases, nice work.
@@ -92,3 +93,23 @@ internal enum BatchDeletedMetric { | |||
} | |||
} | |||
} | |||
|
|||
/// Definition of "Batch Closed" telemetry. | |||
internal enum BatchClosedMetric { |
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.
non blocking, but would have preferred this as struct with method toAttributes() -> expected type
which makes it easier handle any conversion.
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 have been thinking of it, but I decided to keep it bare simple, as we introduce a new concept here and not yet sure which direction it will go. Moving from "static constants" model to a "type" won't cost much in the future.
For instance, one idea I had was to define Metric
protocol that enforces common fields: name
, metric_type
and attributes
. That could be passed directly to telemetry.metric(_:)
in a type-safer way, instead of broad telemetry.metric(name:attributes:)
introduced by this PR.
With few options in hand and no foresight future, I bet on simplicity for now, so will keep it as it is.
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.
👌
What and why?
📦⏱️ Adding "Batch Closed" metric.
See (internal) RFC Batching & Upload Observability.
How?
Leveraged metrics API added earlier in #1384.
With this PR, I'm adding full unit tests coverage for both metrics creation in
FilesOrchestrator
.Review checklist
Custom CI job configuration (optional)