Current section

12 Versions

Jump to

Compare versions

4 files changed
+12 additions
-5 deletions
  @@ -33,4 +33,4 @@
33 33 {<<"optional">>,false},
34 34 {<<"repository">>,<<"hexpm">>},
35 35 {<<"requirement">>,<<"~> 1.2">>}]]}.
36 - {<<"version">>,<<"0.7.0">>}.
36 + {<<"version">>,<<"0.7.1">>}.
  @@ -83,7 +83,7 @@ defmodule ExDatadog.Plug do
83 83
84 84 @doc false
85 85 defp gen_method_tags(_method, false), do: []
86 - defp gen_method_tags(method, true), do: [method]
86 + defp gen_method_tags(method, true), do: ["method:#{method}"]
87 87
88 88 @doc false
89 89 defp gen_query_tags(_query_string, nil), do: []
  @@ -1,13 +1,20 @@
1 1 defmodule ExDatadog.QueryParser do
2 + @moduledoc false
3 +
2 4 import NimbleParsec
3 5
4 6 # a simple parse try to match ["mutation", "updateUser"] for query: "mutation {\n updateUser {\n code\n hash\n }\n}"
5 - space = ascii_string([?\s, ?\t, ?\n], min: 1) |> repeat()
7 + space =
8 + [?\s, ?\t, ?\n]
9 + |> ascii_string(min: 1)
10 + |> repeat()
11 +
6 12 bracket = string("{")
7 13 tag = ascii_string([?a..?z, ?A..?Z], min: 1)
8 14
9 15 query =
10 - choice([tag, string("")])
16 + [tag, string("")]
17 + |> choice()
11 18 |> ignore(space)
12 19 |> ignore(bracket)
13 20 |> ignore(space)
  @@ -1 +1 @@
1 - 0.7.0
1 + 0.7.1