-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Link to repo that use TelemetryMetricsPrometheus #42
Comments
Hey @ebengt. It looks like you're missing some setup still. Of the metrics you have defined, there's not enough definition to capture phoenix events, for instance. Example. For the other metric, you're trying to record metrics for the VM but didn't start telemetry poller which is what emits those events, but maybe it's getting started someplace else? You might want to consider using uplink to simplify and organize things. |
Thank you. I am migrating from prometheus.ex and there prometheus_ecto/prometheus_phoenix did not need a poller. The presence of "vm.memory.total" is mostly due to copy/paste, if it had worked that would have been nice but it is not my main goal. Is there no publicly available repo using TelemetryMetricsPrometheus (and Phoenix, if possible)? |
Greetings, Yes, Uplink works with the Uplink monitors. When creating a new Phoenix app I get a sample file with Telemetry.Metrics.ConsoleReporter as reporter. It says that I can add more reporters, so I tried TelemetryMetricsPrometheus. The metrics for Telemetry.Metrics.ConsoleReporter are all summary/2, and that is not available in Prometheus. I changed to last_value/2 and that works. This way I can use TelemetryMetricsPrometheus without adding Uplink (because Phoenix added a module for me). |
It only accepts integers
…On Sat, Sep 16, 2023, 12:56 PM bengt kleberg ***@***.***> wrote:
Greetings,
Yes, Uplink works with the Uplink monitors.
When creating a new Phoenix app I get a sample file with
Telemetry.Metrics.ConsoleReporter as reporter. It says that I can add more
reporters, so I tried TelemetryMetricsPrometheus. The metrics for
Telemetry.Metrics.ConsoleReporter are all summary/2, and that is not
available in Prometheus. I changed to sum/2. But that gives this error when
testing :
20:38:52.988 mfa=:telemetry.execute/3 [error] Handler {TelemetryMetricsPrometheus.Core.EventHandler, #PID<0.471.0>,
[:excdf, :repo, :query, :total_time]} has failed and has been detached. Class=:error
Reason=:badarg
Stacktrace=[
{:ets, :update_counter,
[
:prometheus_metrics,
{[:excdf, :repo, :query, :total_time], %{}},
1.196542,
{{[:excdf, :repo, :query, :total_time], %{}}, 0}
], [error_info: %{module: :erl_stdlib_errors}]},
{TelemetryMetricsPrometheus.Core.Sum, :handle_event, 4,
[file: ~c"lib/core/sum.ex", line: 62]},
Is there an option to sum/2 that will make this error go away?
—
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLXHVJEF6PKP2L3ZQCYX43X2XY5VANCNFSM6AAAAAA4Z2RTCQ>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
As an example I added TelemetryMetricsPrometheus to my repo https://github.com/ebengt/becomics |
Greetings,
I have read Hex documentation for TelemetryMetricsPrometheus, Telemetry.Metrics, OpentelemetryPhoenix
It probably should be enough, but I fail to get content from localhost:9568/metrics. I get a 200 Response, but 0 content-length.
A link to any repo using TelemetryMetricsPrometheus (and Phoenix, if possible), would be much appreciated.
From my application.ex
The text was updated successfully, but these errors were encountered: