simple.c
/*
* Copyright 2020 New Relic Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#include "newrelic-telemetry-sdk.h"
#include <stdio.h>
#include <stdlib.h>
/*
* A dummy example that needs to be replaced once this library can actually do
* something.
*/
int main() {
const char* api_key = getenv("NEW_RELIC_API_KEY");
if (!api_key) {
fprintf(stderr, "NEW_RELIC_API_KEY not set\n");
exit(1);
}
/* Initialize a configuration. */
/* Initialize a new client with the given API key. */
/* Wait for the batch to be sent and shut down the client. */
nrt_client_shutdown(&client);
}
struct _nrt_client_config_t nrt_client_config_t
A configuration object used to initialize a nrt_client_t.
Definition: newrelic-telemetry-sdk.h:28
This is a helper library that supports sending New Relic data from within your C/C++ application.
struct _nrt_client_t nrt_client_t
A Client is capable of both queuing and sending span and metrics batches to a configured New Relic co...
Definition: newrelic-telemetry-sdk.h:34
nrt_client_config_t * nrt_client_config_new(const char *key)
Create a new client configuration with an Insights API key.
Generated on Wed Sep 16 2020 23:07:29 for New Relic C Telemetry SDK by
