-
Notifications
You must be signed in to change notification settings - Fork 26
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
OpenTracing #249
base: master
Are you sure you want to change the base?
OpenTracing #249
Conversation
@@ -0,0 +1,17 @@ | |||
defmodule Annon.Monitoring.TraceCollector do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modules should have a @moduledoc tag.
|
||
conn | ||
|> Conn.register_before_send(&write_metrics(&1, api)) | ||
|> Conn.register_before_send(&assign_latencies(&1, request_start_time)) | ||
|> Conn.register_before_send(&track_latencies(&1, request_id, request_start_time, collector_opts)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a function call when a pipeline is only one function long
@@ -0,0 +1,5 @@ | |||
defmodule Annon.Monitoring.Trace.BinaryAnnotation do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modules should have a @moduledoc tag.
@@ -0,0 +1,5 @@ | |||
defmodule Annon.Monitoring.Trace.Annotation do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modules should have a @moduledoc tag.
enabled?: {:system, :boolean, "METRICS_COLLECTOR_ENABLED", true}, | ||
send_tags: {:system, :boolean, "METRICS_COLLECTOR_SEND_TAGS", true}, | ||
host: {:system, :string, "METRICS_COLLECTOR_HOST", "localhost"}, | ||
port: {:system, :number, "METRICS_COLLECTOR_PORT", 32768}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Large numbers should be written with underscores: 32_768
|
||
def start_span(%Conn{} = conn, opts \\ []) do | ||
request_id = get_request_id(conn, Ecto.UUID.generate()) | ||
timestamp = System.monotonic_time() |> System.convert_time_unit(:native, :microseconds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a function call when a pipeline is only one function long
@@ -0,0 +1,63 @@ | |||
defmodule Annon.Monitoring.Trace do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Modules should have a @moduledoc tag.
Ebert has finished reviewing this Pull Request and has found:
But beware that this branch is 134 commits behind the You can see more details about this review at https://ebertapp.io/github/Nebo15/annon.api/pulls/249. |
This PR is WIP on improving traceability and monitoring features of PR.