Skip to content

Commit

Permalink
Fix Credo, add moduledocs to all new modules
Browse files Browse the repository at this point in the history
  • Loading branch information
bglusman committed May 22, 2020
1 parent 621b06e commit 28061f8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/companies_web/historical_data.ex
@@ -1,4 +1,11 @@
defmodule CompaniesWeb.HistoricalData do
@moduledoc """
Single source of truth to gather all individual modules that provide historical
data to live dashboard and merge their seperate history maps into one. If adding
a new source of metric history for LiveDashboard, it only needs to implement
it's own signatures/0 method as the other modules here do, and be added the the
list of signatures below.
"""
alias CompaniesWeb.{RepoMetricsHistory, ViewingStats}

def signatures do
Expand Down
5 changes: 5 additions & 0 deletions lib/companies_web/repo_metrics_history.ex
@@ -1,4 +1,9 @@
defmodule CompaniesWeb.RepoMetricsHistory do
@moduledoc """
GenServer to handle historical data for Ecto queries and rebroadcast to
LiveDashboard under seperate history-focused telemetry namespace.
"""

use GenServer

@telemetry_event [:companies, :repo, :query]
Expand Down
5 changes: 5 additions & 0 deletions lib/companies_web/viewing_stats.ex
@@ -1,4 +1,9 @@
defmodule CompaniesWeb.ViewingStats do
@moduledoc """
GenServer to handle aggregating simple app stats and history for telemetry_poller
to pass on to LiveDashboard.
"""

use GenServer

@telemetry_event [:page_views, :count_events]
Expand Down

0 comments on commit 28061f8

Please sign in to comment.