Skip to content

fix(metrics): :impl Atomic<u64> for AtomicU64 - #189

Closed
koushiro wants to merge 1 commit into
prometheus:masterfrom
koushiro-contrib:fix-gauge-u64
Closed

koushiro wants to merge 1 commit into
prometheus:masterfrom
koushiro-contrib:fix-gauge-u64

Conversation

@koushiro

Copy link
Copy Markdown
Contributor

fix the error when using Gauge<u64, AtomicU64> type, revert the impl Atomic<u64> fro AtomicU64 from #105

fix the error when using Gauge<u64, AtomicU64> type,
revert the `impl Atomic<u64> fro AtomicU64` from #105

Signed-off-by: koushiro <koushiro.cqx@gmail.com>
@mxinden

mxinden commented Feb 28, 2024

Copy link
Copy Markdown
Member

If I recall correctly, I removed this implementation, given that the protobuf definition does not support u64, but only i64. With your patch, how would one encode a u64::MAX in a protobuf?

https://github.com/OpenObservability/OpenMetrics/blob/1386544931307dff279688f332890c31b6c5de36/proto/openmetrics_data_model.proto#L100-L107

@koushiro

Copy link
Copy Markdown
Contributor Author

Ok, If the protobuf definition does not support u64, why not add impl Atomic<u32> for AtomicU32, at least we could use Gauge<u32, AtomicU32>

@koushiro koushiro closed this Mar 1, 2024
@koushiro
koushiro deleted the fix-gauge-u64 branch March 1, 2024 05:30
@mxinden

mxinden commented Mar 4, 2024

Copy link
Copy Markdown
Member

Ok, If the protobuf definition does not support u64, why not add impl Atomic<u32> for AtomicU32, at least we could use Gauge<u32, AtomicU32>

Sorry for the late reply. I am fine with adding u32 to Gauge @koushiro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants