Skip to content

Commit

Permalink
Removed useless metric dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
ptoffy committed Aug 28, 2024
1 parent 8d9ee35 commit a285407
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Sources/Queues/QueueWorker.swift
Original file line number Diff line number Diff line change
Expand Up @@ -126,20 +126,17 @@ public struct QueueWorker: Sendable {
Timer(
label: "\(id.string).jobDurationTimer",
dimensions: [
("success", "true"),
("success", error == nil ? "true" : "false"),
("id", id.string),
],
preferredDisplayUnit: .seconds
).recordNanoseconds(DispatchTime.now().uptimeNanoseconds - startTime)

// Adds the completed job to a different counter depending on its result
if let error = error {
if error != nil {
Counter(
label: "error.completed.jobs.counter",
dimensions: [
("id", id.string),
("error", error.localizedDescription),
]
dimensions: [("queueName", queue.queueName.string)]
).increment()
} else {
Counter(
Expand Down

0 comments on commit a285407

Please sign in to comment.