Skip to content

[Metrics] Metric.record without default tag set doesn't error. #13377

@simon-mo

Description

@simon-mo

What is the problem?

The following doesn't throw any error but it should, because metrics without the tag value cannot be recorded:


In [5]: error_counter = metrics.Count( 
   ...:             "fake_serve_backend_error_counter", 
   ...:             description=("The number of exceptions that have " 
   ...:                          "occurred in the backend."), 
   ...:             tag_keys=("backend", ))                             

In [6]: error_counter.record(9003)    

Please feel free to change the priority value
Ray version and other system information (Python version, TensorFlow version, OS):

Reproduction (REQUIRED)

Please provide a short code snippet (less than 50 lines if possible) that can be copy-pasted to reproduce the issue. The snippet should have no external library dependencies (i.e., use fake or mock data / environments):

If the code snippet cannot be run by itself, the issue will be closed with "needs-repro-script".

  • I have verified my script runs in a clean environment and reproduces the issue.
  • I have verified the issue also occurs with the latest wheels.

Metadata

Metadata

Assignees

Labels

P2Important issue, but not time-criticalbugSomething that is supposed to be working; but isn't

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions