Open
Conversation
AndrewDryga
commented
May 29, 2017
| @@ -0,0 +1,17 @@ | |||
| defmodule Annon.Monitoring.TraceCollector do | |||
| 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)) |
Member
Author
There was a problem hiding this comment.
Use a function call when a pipeline is only one function long
| @@ -0,0 +1,5 @@ | |||
| defmodule Annon.Monitoring.Trace.BinaryAnnotation do | |||
| @@ -0,0 +1,5 @@ | |||
| defmodule Annon.Monitoring.Trace.Annotation do | |||
| 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}, |
Member
Author
There was a problem hiding this comment.
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) |
Member
Author
There was a problem hiding this comment.
Use a function call when a pipeline is only one function long
| @@ -0,0 +1,63 @@ | |||
| defmodule Annon.Monitoring.Trace do | |||
Member
Author
|
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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is WIP on improving traceability and monitoring features of PR.