Skip to content

Commit

Permalink
fix(generic-metrics): Use floating point as sample weight (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-z-yang authored Aug 6, 2024
1 parent 0475794 commit b11ccf7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/snuba-metrics/1/snuba-metrics-sampled.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"value": [324234, 345345, 456456, 567567],
"retention_days": 22,
"sample_weight": 100,
"sample_weight": 100.1,
"mapping_meta": {
"c": {
"10": "tag-1",
Expand Down
4 changes: 3 additions & 1 deletion schemas/ingest-metrics.v1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@
"maximum": 18446744073709551615
},
"sample_weight": {
"type": "integer"
"type": "number",
"minimum": 1,
"maximum": 18446744073709551615
}
},
"required": [
Expand Down
4 changes: 3 additions & 1 deletion schemas/snuba-generic-metrics.v1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,9 @@
"type": "string"
},
"sample_weight": {
"type": "integer"
"type": "number",
"minimum": 1,
"maximum": 18446744073709551615
}
},
"required": [
Expand Down

0 comments on commit b11ccf7

Please sign in to comment.