This module contains a set of examples on how to use the telemetry SDK. They are full examples, which should compile and be runnable as-is.
You will need to provide your Insights Insert Key and the New Relic Metric API endpoint as command-line parameters to the programs.
This is an example of how to write Gauge metrics to New Relic using the SDK.
This is an example of how to write Summary metrics to New Relic using the SDK.
This is an example of how to write Count metrics to New Relic using the SDK.
This is an example of pushing the boundaries of what is accepted by the New Relic APIs, and how you can see what happens when things go wrong.
This example shows you how you can send spans to the New Relic trace ingest api.
It demonstrates how to use the SimpleSpanBatchSender
to easily create a SpanBatchSender
that can be fed a SpanBatch
.
This is an example of how to use the provided com.newrelic.telemetry.TelemetryClient
to handle
errors in the recommended way.