-
Notifications
You must be signed in to change notification settings - Fork 658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
where are valuerecorders? #2680
Comments
@nerdvegas that's based on the old branch which used for some benchmarks. The correct docs lives at here https://opentelemetry-python.readthedocs.io/en/latest/. This is the new equivalent for value recorder. |
hi @srikanthccv, back then i used to use vr = meter.create_valuerecorder(...)
vr.record(value, label) but now.. how can i replicate the code above? meter.create_observable_counter(
"system.cpu.time",
callbacks=[cpu_time_callback({"user", "system"})],
unit="s",
description="CPU time"
) using vrmap = {
"metric1": meter.create_valuerecorder(...),
"metric2": meter.create_valuerecorder(...),
"metric3": meter.create_valuerecorder(...),
}
#payload = from_api_call()
payload = {
"metric1": 1,
"metric2": 2,
"metric3": 3,
}
for k,v in payload.items():
vrmap[k].record(v, label) how can we do this now? |
@CrashLaker I guess the equivalent for use case is to use sync gauge which is yet to be added #3462 |
Hi,
I'm new to opentelem and trying to get to grips.
I looked here: https://open-telemetry.github.io/opentelemetry-python/api/metrics.html#opentelemetry.metrics.BoundValueRecorder
..but that doesn't seem to match the code at all. What's going on? I can't tell what version those docs are generated from, it doesn't say anywhere. I am thoroughly confused. Are those docs for an older version? If so, what's the new equivalent of a value recorder?
Thanks
Allan
The text was updated successfully, but these errors were encountered: