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

Sum aggregation with CumulativeTemporality shows as delta in metric explorer #518

Closed
ktong opened this issue Oct 13, 2022 · 8 comments
Closed
Labels
bug Something isn't working

Comments

@ktong
Copy link

ktong commented Oct 13, 2022

The metric data metricdata.Sum[N]{DataPoints: points, Temporality: metricdata.CumulativeTemporality} is generated by opencensus bridge at https://github.com/open-telemetry/opentelemetry-go/blob/main/bridge/opencensus/internal/ocmetric/metric.go#L95. But it shows as delta metric so the value is stacked.
Screen Shot 2022-10-13 at 4 09 52 PM

@dashpole dashpole added the bug Something isn't working label Oct 14, 2022
@dashpole
Copy link
Contributor

Hey @ktong, thanks for reporting the issue.

A few questions about your setup:

  • What is the graph above showing? Can you share the query you ran to get that graph?
  • How is the OpenCensus metric being recorded (e.g. which package, or what instrument is being used to record it)?
  • What version of opentelemetry-go and this repository are you using?
  • Do you think this is an issue with this repository (something about our exporters), or with the bridge itself, or are you not sure?

Thanks!

@dashpole
Copy link
Contributor

This may be related to open-telemetry/opentelemetry-go#3278, in which async counter values were treated as delta instead of cumulative.

@ktong
Copy link
Author

ktong commented Oct 18, 2022

Yes, it’s more likely caused by the issue.

@ktong
Copy link
Author

ktong commented Oct 18, 2022

Hey @ktong, thanks for reporting the issue.

A few questions about your setup:

  • What is the graph above showing? Can you share the query you ran to get that graph?
    MQL
fetch k8s_container
| metric 'workload.googleapis.com/grpc.io/server/completed_rpcs'
| group_by 1m, [value_completed_rpcs_mean: mean(value.completed_rpcs)]
| every 1m
  • How is the OpenCensus metric being recorded (e.g. which package, or what instrument is being used to record it)?

The View is defined at https://github.com/census-instrumentation/opencensus-go/blob/master/plugin/ocgrpc/server_metrics.go#L68

  • What version of opentelemetry-go and this repository are you using?
go.opentelemetry.io/otel/metric v0.32.3
go.opentelemetry.io/otel/sdk v1.11.0
go.opentelemetry.io/otel/sdk/metric v0.32.3
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.34.1
  • Do you think this is an issue with this repository (something about our exporters), or with the bridge itself, or are you not sure?
    Not sure

Thanks!

@ktong
Copy link
Author

ktong commented Oct 20, 2022

The issue still exists while I upgrade go.opentelemetry.io/otel/sdk/metric to v0.33.0 which includes the fix of open-telemetry/opentelemetry-go#3278.

@ktong
Copy link
Author

ktong commented Oct 21, 2022

reported another issue in opentelemetry-go: open-telemetry/opentelemetry-go#3388

@dashpole
Copy link
Contributor

Great. Looks like you found the problem

@dashpole
Copy link
Contributor

dashpole commented Nov 1, 2022

Since the fix was merged upstream, i'm going to go ahead and close this issue. Feel free to reopen if you think there is more to be done.

@dashpole dashpole closed this as completed Nov 1, 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
Projects
None yet
Development

No branches or pull requests

2 participants