-
Hi! We've been having an issue with our Ocelot gateway. We want to add metrics to it but we're unable to make the endpoint "/metrics" work. We're using the OpenTelemetry Prometheus exporter package, as explained here https://learn.microsoft.com/en-us/dotnet/core/diagnostics/observability-prgrja-example#5-configure-opentelemetry-with-the-correct-providers But the mapped "/metrics" endpoint always responds with a 404. Is there a way to let Ocelot know it shouldn't run requests to that metrics endpoint through the pipeline and rather delegate to the exporter? I tried mapping the endpoint (with MapPrometheusScrapingEndpoint) first in the pipeline, last in the pipeline, to no avail. It's very much like this issue here #2183 where the OP added their GET mapping before UseOcelot and after UseOcelot, still didn't work in either case. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Dear @fetchezar ! What's your full name and LinkedIn? You haven't forked the Ocelot repository into your account repos, so it doesn't seem like you're a C# developer. Why should I answer your question? About #2183... have you attempted implementing the C# recipes mentioned in it? To continue this discussion, you must upload the solution or at least show complete
Ocelot+OpenTelementry+MS.NET
So, if I understand correctly, you're looking to consume the service directly? Then what's the purpose of Ocelot in this setup? If you prefer a direct connection, just connect straight to the service from the client! 😉
It seems that the OpenTelemetry library is currently incompatible with the Ocelot pipeline. Fixing this issue might require understanding the internal implementation of the OpenTelemetry library. You may need to explore their code or reach out to the OpenTelemetry team for assistance. |
Beta Was this translation helpful? Give feedback.
-
We currently don't support OpenTelemetry, but we're open to accepting pull requests from contributors for integration. |
Beta Was this translation helpful? Give feedback.
We currently don't support OpenTelemetry, but we're open to accepting pull requests from contributors for integration.
Please stick to the officially supported logging and tracing methods.