Skip to content
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

[BUG] Correct Supervisor Setup Documentation For PromEx #211

Open
conradwt opened this issue Sep 4, 2023 · 1 comment
Open

[BUG] Correct Supervisor Setup Documentation For PromEx #211

conradwt opened this issue Sep 4, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@conradwt
Copy link

conradwt commented Sep 4, 2023

Describe the bug

When running mix prom_ex.gen.config --datasource "Local Prometheus", the generated docs says the following in step 2:

Add this module to your application supervision tree. It should be one of the first
     things that is started so that no Telemetry events are missed. For example, if PromEx
     is started after your Repo module, you will miss Ecto's init events and the dashboards
     will be missing some data points

However, the README.md for the project mentions the following:

PromEx should be started after the Endpoint, to avoid unnecessary error messages

The supervised children for the application look like the following:

    children = [
      # Start the PromEx
      ZeroPhoenix.PromEx,
      # Start the Telemetry supervisor
      ZeroPhoenixWeb.Telemetry,
      # Start the Ecto repository
      ZeroPhoenix.Repo,
      # Start the PubSub system
      {Phoenix.PubSub, name: ZeroPhoenix.PubSub},
      # Start Finch
      {Finch, name: ZeroPhoenix.Finch},
      # Start the Endpoint (http/https)
      ZeroPhoenixWeb.Endpoint
    ]

To Reproduce
Steps to reproduce the behavior:

  1. mix prom_ex.gen.config --datasource "Local Prometheus"
  2. Review prom_ex.ex and project README.md

Expected behavior

I would expect the generated code docs (i.e. prom_ex.ex) and the README.md would be consistent here.

Environment

  • Elixir version: 1.15.5
  • Erlang/OTP version: 26.0.2
  • Grafana version: 10.0.0
  • Prometheus version: 2.46.0

Additional context

Just looking for better clarification within the documentation as to the proper location for the PromEx within the supervision tree.

@conradwt conradwt added the bug Something isn't working label Sep 4, 2023
@tsantero
Copy link

tsantero commented Feb 5, 2024

I came here seeking the same clarification to the documentation inconsistency raised by @conradwt in this unaddressed issue.

In my experience I'm inclined to start the prom_ex supervision tree before all other applications for the exact reason mentioned in the README and quoted by OP.

If any project authors have the time to chime in here it would be greatly appreciated. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants