Skip to content
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

Observable Gauge does not reflect updated values, and send the old value always #1588

Closed
tauseef-ah opened this issue Sep 1, 2022 · 0 comments · Fixed by #1641 or #1651
Closed

Observable Gauge does not reflect updated values, and send the old value always #1588

tauseef-ah opened this issue Sep 1, 2022 · 0 comments · Fixed by #1641 or #1651
Assignees
Labels
bug Something isn't working priority:p1 Issues that are blocking

Comments

@tauseef-ah
Copy link

Describe your environment
https://github.com/open-telemetry/opentelemetry-cpp; main branch

Steps to reproduce
Modify https://github.com/open-telemetry/opentelemetry-cpp/blob/main/examples/common/metrics_foo_library/foo_library.cc:71 to change observable counter to observable gauge. and accordingly modify the view in https://github.com/open-telemetry/opentelemetry-cpp/blob/main/examples/metrics_simple/metrics_ostream.cc :58 to display Gauge value. and run the sample test

What is the expected behavior?
What did you expect to see?
the Gauge value updates as per the updated value sent in the callback.

What is the actual behavior?
What did you see instead?
The value always remain the same, "1" is the initial value, and then it changes to 2,3,4,...
2{
scope name : ostream_metric_example
schema url :
version : 1.2.0
start time : Thu Sep 1 06:54:33 2022
end time : Thu Sep 1 06:54:34 2022
instrument name : ostream_metric_example_observable_counter
description :
unit :
type : LastValuePointData
timestamp : 0
valid : true
value : 1
attributes :
resources :
service.name: unknown_service
telemetry.sdk.language: cpp
telemetry.sdk.name: opentelemetry
telemetry.sdk.version: 1.6.0
}
3{
scope name : ostream_metric_example
schema url :
version : 1.2.0
start time : Thu Sep 1 06:54:34 2022
end time : Thu Sep 1 06:54:35 2022
instrument name : ostream_metric_example_observable_counter
description :
unit :
type : LastValuePointData
timestamp : 0
valid : true
value : 1
attributes :
resources :
service.name: unknown_service
telemetry.sdk.language: cpp
telemetry.sdk.name: opentelemetry
telemetry.sdk.version: 1.6.0
}

Additional context
Add any other context about the problem here.

@tauseef-ah tauseef-ah added the bug Something isn't working label Sep 1, 2022
@lalitb lalitb self-assigned this Sep 1, 2022
@lalitb lalitb added this to the Metrics v1.0.0 (GA) milestone Sep 5, 2022
@lalitb lalitb added the priority:p1 Issues that are blocking label Sep 12, 2022
lalitb added a commit that referenced this issue Oct 2, 2022
yxue pushed a commit to yxue/opentelemetry-cpp that referenced this issue Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:p1 Issues that are blocking
Projects
None yet
2 participants