spandex-project / spandex

A platform agnostic tracing library
MIT License
335 stars 53 forks source link

How to properly configure host and port? #31

Closed lucaspolonio closed 6 years ago

lucaspolonio commented 6 years ago

Hi there,

I'm trying to test this library as replacement to a custom monitoring that uses Elixometer/Exometer + Dogstatsd, but I'm confused about how to configure Datadog here.

Should I have the Datadog Agent running locally and set host to localhost and port to 8126 as the example in the docs does? I have tried this and I keep getting:

[debug] Trace response: {:error, %HTTPoison.Error{id: nil, reason: :econnrefused}}

Based on the error it looks like the library is trying to do HTTP calls, so maybe it's trying to use Datadog's HTTP API instead of the Datadog Agent? If so, where should I configure my Datadog API key? And what should be the appropriate host and port?

Thanks in advance!

zachdaniel commented 6 years ago

Can I see your config? You'll also need to ensure that APM is enabled on your agent. It uses HTTP to communicate with the agent. I believe APM is off by default on the agent.

zachdaniel commented 6 years ago

Reading your issue again, I think there may potentially be a misunderstanding as to what this library is for. This library utilizes Datadog's APM (Application Performance Monitoring) platform, which behaves differently than just reporting metrics over Elixometer/Exometer + Dogstatsd. With that said, we've found it to be more useful than simple metric reporting, but it does utilize different features from Datadog and, I believe, involves separate pricing.

zachdaniel commented 6 years ago

Closing this issue as I have not heard back.

lucaspolonio commented 6 years ago

Hi @zachdaniel, sorry it took me forever to respond. Your answers helped make things more clear, thanks!

Also, for future reference, what was throwing me off is that I was trying to test locally on MacOS, and I didn't realize the datadog-trace-agent is not included by default in the Datadog Agent as it does on Linux. So even though I had apm_enabled: true in my datadog.conf, it had no effect because it was missing the trace agent.