-
Notifications
You must be signed in to change notification settings - Fork 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
Does Micrometer support GRPC Opentelemetry metrics? #5731
Comments
Hi, OTel supports 3 transports:
According to the specification, clients need to support one of these but backends/collectors must support all. So from the backend perspective, it should not matter which one you use. Micrometer supports HTTP/protobuf. gRPC is not the "format" but the "protocol". gRPC uses protobuf to encode/serialize the data and it uses HTTP/2 to transfer the data. So HTTP/protobuf (what Micrometer uses) is very similar to gRPC (same encoding over HTTP). With this in mind, could you please tell us why you need gRPC and why HTTP/protobuf does not work for you? It also worth to mention that if you already have a gRPC client and Micrometer would bring you another one, that could case issues (as it did in the OTel SDK iirc). |
Hi @jonatan-ivanov thank you for the comment. |
Can you add http to the collector config? receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318 What do you use the collector for? Are you pushing metrics to a backend that Micrometer supports? |
I see your point. It's clear that we can expose the HTTP protocol in the OTEL collector or send the metric directly to the backend, bypassing the OTEl collector. |
This issue is about publishing metrics, with a payload size that should not depend on the throughput of your system, and that by default is published every 60 seconds. I fail to see how gRPC is going to substantially improve the performance of metrics publication, but perhaps I'm missing something. Have you noticed a performance issue with metrics publication that will be solved by gRPC?
We have to consider priorities, maintainability, compatibility, and tradeoffs for all of our users when we choose on what to spend our efforts supporting. You may be interested in #5690 under consideration. Similar to that, we have some ideas we plan to explore about making our |
Hi @shakuzen , I don't have a real performance comparison between gRPC vs HTTP for OTEL metrics. But I expect that gRPC latency will be better due to HTTP/2 optimizations and persistent connections (HTTP/2). I may be wrong :) But anyway it would be good to support OTLP with gRPC. |
I would like to echo what Tommy wrote above and also, I think it worth mentioning that HTTP/1.1 uses persistent connections too (by default). HTTP/2 though allows multiple concurrent requests to be multiplexed over a single connection but this might not be happening in case of Micrometer since we don't send requests concurrently to an OTLP backend.
As I mentioned above, those optimizations might not be applicable in this case so I would expect they being similar. Since publishing metrics is asynchronous to your application, you will not notice slight latency improvements or degradations. Please let us know if you end-up doing a perf test, I asked the OTel community if anyone did such a test before. |
From the conversation with the OTel community (you can find the whole discussion in the OTel Java Slack channel): OTel has its own serialization and This is also an interesting aspect:
OTel recommends using
New Relic also recommends
|
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed. |
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open. |
Hi,
I'm trying to configure Micrometer for metrics to send custom metrics to OTEL collector in GRPC format. Everything works with HTTP protocol, but doesn't work with GRPC.
I even cannot see it documentation https://docs.micrometer.io/micrometer/reference/implementations/otlp.html
The text was updated successfully, but these errors were encountered: