-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Exporter version 0.32.0 and higher is not compatible with opentelemetry-collector-contrib #3394
Comments
Can you clarify your "steps to reproduce" with code? I'm very confused by this issue. Are you wondering why a counter that you created with this repository, https://github.com/open-telemetry/opentelemetry-go, doesn't export any data if you don't record any values? |
https://github.com/krupyansky/otel-bug
|
It looks like you have an "unsupported protocol scheme" in your collector configuration. I would recommend correcting your configured endpoint. |
Yes, thanks for the note @MrAlias Made changes in https://github.com/krupyansky/otel-bug. Steps:
|
If we returned opentelemetry-go/sdk/metric/internal/sum.go Line 149 in 49b62ae
Instead of a value, then this: opentelemetry-go/sdk/metric/pipeline.go Lines 134 to 135 in 49b62ae
Would drop the empty aggregation and the data would not be sent. I think this is appropriate. I was considering if this current behavior is desirable because it signals the instrument exists and no measurements have been made. But that is not important. It is only important to signal that existing measurements already made have had no increment. |
Description
The library opentelemetry-collector-contrib along the path pkg/translator/prometheusremotewrite/metrics_to_prw.go has a method FromMetrics():
Due to the fact that an invalid metric comes to the opentelemetry-collector-contrib (in my case, SUM with len(DataPoints) == 0), I get error "invalid temporality and type combination" when exporting data into prometheusremotewrite from opentelemetry-collector-contrib.
Before version 0.32.0 we had at least one DataPoint.
func sumPoint(record export.Record, num number.Number, start, end time.Time, temporality aggregation.Temporality, monotonic bool) (*metricpb.Metric, error) {}
After 0.32.0 we have zero or more DataPoint into grpc request to opentelemetry-collector.
Environment
Steps To Reproduce
Expected behavior
On the one hand, I expect this error to not occur.
On the other hand, I want the metric with the current value to be sent to opentelemetry-collector-contrib
and then to victoria metrics by prometheusremotewrite method.
The text was updated successfully, but these errors were encountered: