From a4924ee0607f17bfe5ba61742e035af19c381785 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Fri, 9 Oct 2015 14:31:20 +0100 Subject: + newrelic: add ssl support to agent Use kamon.newrelic.ssl = true to send metrics over https --- .../src/test/scala/kamon/newrelic/AgentSpec.scala | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'kamon-newrelic/src/test/scala/kamon/newrelic/AgentSpec.scala') diff --git a/kamon-newrelic/src/test/scala/kamon/newrelic/AgentSpec.scala b/kamon-newrelic/src/test/scala/kamon/newrelic/AgentSpec.scala index e4289231..063755a8 100644 --- a/kamon-newrelic/src/test/scala/kamon/newrelic/AgentSpec.scala +++ b/kamon-newrelic/src/test/scala/kamon/newrelic/AgentSpec.scala @@ -48,6 +48,7 @@ class AgentSpec extends BaseKamonSpec("metric-reporter-spec") with RequestBuildi | license-key = 1111111111 | connect-retry-delay = 1 second | max-connect-retries = 3 + | ssl = true | } | | modules.kamon-newrelic.auto-start = no @@ -85,14 +86,15 @@ class AgentSpec extends BaseKamonSpec("metric-reporter-spec") with RequestBuildi | "host": "$host", | "identifier": "java:kamon", | "language": "java", - | "pid": $pid + | "pid": $pid, + | "ssl": "true" | } | ] """.stripMargin.parseJson)(sprayJsonMarshaller(JsValueFormat)) }) // Receive the runID - EventFilter.info(message = "Configuring New Relic reporters to use runID: [161221111] and collector: [collector-8.newrelic.com]", occurrences = 1).intercept { + EventFilter.info(message = "Configuring New Relic reporters to use runID: [161221111] and collector: [collector-8.newrelic.com] over: [https]", occurrences = 1).intercept { httpManager.reply(jsonResponse( """ | { @@ -143,7 +145,8 @@ class AgentSpec extends BaseKamonSpec("metric-reporter-spec") with RequestBuildi | "host": "$host", | "identifier": "java:kamon", | "language": "java", - | "pid": $pid + | "pid": $pid, + | "ssl": "true" | } | ] """.stripMargin.parseJson)(sprayJsonMarshaller(JsValueFormat)) @@ -151,7 +154,7 @@ class AgentSpec extends BaseKamonSpec("metric-reporter-spec") with RequestBuildi // Receive the runID EventFilter.info( - message = "Configuring New Relic reporters to use runID: [161221112] and collector: [collector-8.newrelic.com]", occurrences = 1).intercept { + message = "Configuring New Relic reporters to use runID: [161221112] and collector: [collector-8.newrelic.com] over: [https]", occurrences = 1).intercept { httpManager.reply(jsonResponse( """ @@ -202,7 +205,7 @@ class AgentSpec extends BaseKamonSpec("metric-reporter-spec") with RequestBuildi } def rawMethodUri(host: String, methodName: String): Uri = { - Uri(s"http://$host/agent_listener/invoke_raw_method").withQuery( + Uri(s"https://$host/agent_listener/invoke_raw_method").withQuery( "method" -> methodName, "license_key" -> "1111111111", "marshal_format" -> "json", -- cgit v1.2.3