Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Differences between C SDK and Agentless API


#1

Hi!

I want to send NewRelic data from Haskell. There isn’t an existing Haskell library (there is one but it’s using the old SDK) so I’ll be writing one myself.

How should I do it? Should I bind to the C SDK or use the Agentless API? I will need to send all the info that existing Ruby agents send: transaction, segments, datastore segments, events, metrics, etc. Does the Agentless API provide all of that? (I can’t find it). Or is it absolutely necessary to use the C SDK?

Or another way to put it: when should one use the Agentless API vs the C SDK?

Thank you!

Edit: I’m also curious to know how the existing agents (Ruby, Go, Node, etc.) communicate with NewRelic. I can’t find C bindings in any of them.


#3

Hello,

That is a great question, thank you for asking it!

If you would like an experience that is closer to the Ruby agent with less effort, we recommend using the C-SDK to implement your solution. The difference between the two APIs (other than the Agentless API being more of a RESTful interface) is the data it sends to New Relic.

As you pointed out, the Agentless API doesn’t have any notions of transactions, segments, etc. The reason for this is that the Agentless API is designed with OpenTelemetry compatibility in mind, and therefore uses data types such as metrics, entities, traces, and logs. Although it doesn’t have segments, it does facilitate span events. In the general case, there is not a better or worse API/SDK choice, but instead, a question of which one lines up with your use case. The SDK abstracts away much of the implementation details, such as HTTP handling when POSTing data to New Relic, as well as automatically creating useful metrics you may be used to with transactions from other New Relic agents. If you want the classic New Relic experience you’re used to, the C SDK is the recommended route. If you want to collect data using external open-source tools that communicate in a standardized way, the Agentless API would be the preferred route.

Hope this helps clear things up, and don’t hesitate to reach out for more clarification!

Thanks,
Kyle