Need help implementing metrics. I get the error "error reading server preface: http2: frame too large". #3945
-
I'm having trouble sending metrics to my OpenTelemetry endpoint. This is the first time I use OpenTelemetry for metrics. I'm looking to send metrics to the OTEL endpoint directly, I don't want a collector since my program will be running in a GitLab CI pipeline and I want to keep the Docker image size small, but also reduce the running time to a maximum. I don't want another service running beside it. I also don't need a collector's features like retries. I read online that the OTEL endpoint expects a certain format, so I can't use Prometheus because it uses its own, thus I solely use the OpenTelemetry Go SDK. Here's a copy of my code:
This is the output with debugging activated:
There seems to be a timeout and it says the HTTP2 frame is too large, although the previous messages indicate a length of 0 from my understanding. I think my implementation is flawed. Any help getting this to work is greatly appreciated. Regards |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This code will work. All you have to do is remove |
Beta Was this translation helpful? Give feedback.
This code will work. All you have to do is remove
otlpmetricgrpc.WithInsecure(),
because your endpoint requires HTTPS.