Last active
September 12, 2018 20:14
-
-
Save ellispritchard/3e58c052b525748af82c2196ca617290 to your computer and use it in GitHub Desktop.
Patch troublesome dependencies:
This file contains 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
diff --git a/lib/graphql/clients/prometheus_clients.ex b/lib/graphql/clients/prometheus_clients.ex | |
index 37e211f..f41f4ab 100644 | |
--- a/lib/graphql/clients/prometheus_clients.ex | |
+++ b/lib/graphql/clients/prometheus_clients.ex | |
@@ -4,6 +4,7 @@ defmodule Graphql.Clients.Prometheus do | |
require Prometheus.Metric.Gauge | |
require Prometheus.Metric.Histogram | |
require Prometheus.Contrib.HTTP | |
+ require Prometheus.Error | |
@client_duration_metric_name :http_client_request_duration_microseconds | |
@client_inprogress_metric_name :http_client_requests_inprogress | |
@@ -30,12 +31,10 @@ defmodule Graphql.Clients.Prometheus do | |
def observe_duration(service, operation, fun) when is_function(fun, 0) do | |
Prometheus.Metric.Gauge.track_inprogress( | |
[name: @client_inprogress_metric_name, labels: [service, operation]], | |
- fn -> | |
Prometheus.Metric.Histogram.observe_duration( | |
[name: @client_duration_metric_name, labels: [service, operation]], | |
- fun | |
+ fun.() | |
) | |
- end | |
) | |
end | |
end | |
diff --git a/mix.exs b/mix.exs | |
index cea1305..dd26bf9 100644 | |
--- a/mix.exs | |
+++ b/mix.exs | |
@@ -65,7 +65,7 @@ defmodule Graphql.Mixfile do | |
{:deferred_config, github: "Financial-Times/deferred_config", override: true}, | |
{:prometheus_plugs, "~> 1.1"}, | |
# NB v2.x has breaking changes | |
- {:prometheus_ex, "~> 1.4"}, | |
+ {:prometheus_ex, "~> 3.0", override: true}, | |
{:recon, "~> 2.3"}, | |
# {:xprof, "~> 1.3"}, | |
# {:lager_logger, github: "PSPDFKit-labs/lager_logger"}, | |
diff --git a/mix.lock b/mix.lock | |
index 9c56ea4..5f00c21 100644 | |
--- a/mix.lock | |
+++ b/mix.lock | |
@@ -1,5 +1,5 @@ | |
%{ | |
- "absinthe": {:hex, :absinthe, "1.4.12", "50e7a70088e5896fe3581958f36f6b6bd9e6f36b9626d85db42f1283bbdd5d86", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"}, | |
+ "absinthe": {:hex, :absinthe, "1.4.13", "81eb2ff41f1b62cd6e992955f62c22c042d1079b7936c27f5f7c2c806b8fc436", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0", [hex: :decimal, repo: "hexpm", optional: true]}], "hexpm"}, | |
"absinthe_plug": {:hex, :absinthe_plug, "1.4.5", "f63d52a76c870cd5f11d4bed8f61351ab5c5f572c5eb0479a0137f9f730ba33d", [:mix], [{:absinthe, "~> 1.4.11", [hex: :absinthe, repo: "hexpm", optional: false]}, {:plug, "~> 1.3.2 or ~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm"}, | |
"accept": {:hex, :accept, "0.3.3", "548ebb6fb2e8b0d170e75bb6123aea6ceecb0189bb1231eeadf52eac08384a97", [:rebar3], [], "hexpm"}, | |
"benchee": {:hex, :benchee, "0.13.1", "bd93ca05be78bcb6159c7176230efeda2f724f7ffd485515175ca411dff4893e", [:mix], [{:deep_merge, "~> 0.1", [hex: :deep_merge, repo: "hexpm", optional: false]}], "hexpm"}, | |
@@ -42,8 +42,8 @@ | |
"plug": {:hex, :plug, "1.6.1", "c62fe7623d035020cf989820b38490460e6903ab7eee29e234b7586e9b6c91d6", [:mix], [{:cowboy, "~> 1.0.1 or ~> 1.1 or ~> 2.4", [hex: :cowboy, repo: "hexpm", optional: true]}, {:mime, "~> 1.0", [hex: :mime, repo: "hexpm", optional: false]}], "hexpm"}, | |
"poison": {:hex, :poison, "3.1.0", "d9eb636610e096f86f25d9a46f35a9facac35609a7591b3be3326e99a0484665", [:mix], [], "hexpm"}, | |
"pre_commit": {:hex, :pre_commit, "0.3.4", "e2850f80be8090d50ad8019ef2426039307ff5dfbe70c736ad0d4d401facf304", [:mix], [], "hexpm"}, | |
- "prometheus": {:hex, :prometheus, "3.5.1", "12139025b942743206a315f31c78d6557dd6848ffde1023f7e93f62ec93352db", [:mix, :rebar3], [], "hexpm"}, | |
- "prometheus_ex": {:hex, :prometheus_ex, "1.4.1", "5e08decec6f925c296b99eb136b40e8dacdedd9f03553575ee88a38a23ce9601", [:mix], [{:prometheus, "~> 3.4", [hex: :prometheus, repo: "hexpm", optional: false]}], "hexpm"}, | |
+ "prometheus": {:hex, :prometheus, "4.2.0", "06c58bfdfe28d3168b926da614cb9a6d39593deebde648a5480e32dfa3c370e9", [:mix, :rebar3], [], "hexpm"}, | |
+ "prometheus_ex": {:hex, :prometheus_ex, "3.0.3", "5d722263bb1f7a9b1d02554de42e61ea672b4e3c07c3f74e23ce35ab5e111cfa", [:mix], [{:prometheus, "~> 4.0", [hex: :prometheus, repo: "hexpm", optional: false]}], "hexpm"}, | |
"prometheus_plugs": {:hex, :prometheus_plugs, "1.1.5", "25933d48f8af3a5941dd7b621c889749894d8a1082a6ff7c67cc99dec26377c5", [:mix], [{:accept, "~> 0.1", [hex: :accept, repo: "hexpm", optional: false]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}, {:prometheus_ex, "~> 1.1 or ~> 2.0 or ~> 3.0", [hex: :prometheus_ex, repo: "hexpm", optional: false]}, {:prometheus_process_collector, "~> 1.1", [hex: :prometheus_process_collector, repo: "hexpm", optional: true]}], "hexpm"}, | |
"ranch": {:hex, :ranch, "1.3.2", "e4965a144dc9fbe70e5c077c65e73c57165416a901bd02ea899cfd95aa890986", [:rebar3], [], "hexpm"}, | |
"recon": {:hex, :recon, "2.3.6", "2bcad0cf621fb277cabbb6413159cd3aa30265c2dee42c968697988b30108604", [:rebar3], [], "hexpm"}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment