Skip to content

Commit

Permalink
change metrics namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
castaneai committed Mar 13, 2024
1 parent 825088b commit 5a793b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ minimatch Backend exposes metrics in OpenTelemetry format to help monitor perfor

| Metrics Name | Type | Description |
|:--------------------------------------------|:--------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `minimatch.backend.tickets.count` | UpDownCounter | Total number of tickets. **Do not sum** this counter, as a single backend counts all tickets. |
| `minimatch.store.tickets.count` | UpDownCounter | Total number of tickets. **Do not sum** this counter, as a single backend counts all tickets. |
| `minimatch.backend.tickets_fetched` | Counter | Number of times Ticket has been fetched by backends. |
| `minimatch.backend.tickets_assigned` | Counter | Number of times match has been assigned to a Ticket by backends. If this value is extremely less than `minimatch.backend.tickets_fetched`, the matchmaking logic may be undesirable. |
| `minimatch.backend.fetch_tickets_latency` | Histogram | Latency of the time the Ticket has been fetched by backends. If this value is slow, you may have a Redis performance problem or a lock conflict with assign tickets or other backends. |
Expand Down
2 changes: 1 addition & 1 deletion metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func newBackendMetrics(provider metric.MeterProvider) (*backendMetrics, error) {
assignerLatency: assignerLatency,
assignToRedisLatency: assignToRedisLatency,
}
ticketCount, err := meter.Int64ObservableUpDownCounter("minimatch.backend.tickets.count",
ticketCount, err := meter.Int64ObservableUpDownCounter("minimatch.store.tickets.count",
metric.WithDescription("Total number of tickets. Do not sum this counter, as a single backend counts all tickets."),
metric.WithInt64Callback(func(ctx context.Context, o metric.Int64Observer) error {
o.Observe(metrics.ticketCountActive.Load(), metric.WithAttributes(attributeActiveTicket))
Expand Down

0 comments on commit 5a793b0

Please sign in to comment.