Minimal defaults for maximum flexibility. Only the C<service.name> attribute is
populated.
+To also remove the C<service.name> resource attribute, set it to an empty
+string:
+
+ <Resource Generic>
+ Attribute "service.name" ""
+ </Resource>
+
=back
Inside the B<Resource> block, the following configuration options are valid:
#include "utils/common/common.h"
+static bool default_resource_initialized = false;
static label_set_t default_resource;
static void otel_service_name(void) {
}
static void resource_host_init(void) {
- if (default_resource.num != 0) {
+ if (default_resource_initialized) {
return;
}
otel_resource_attributes();
host_name();
machine_id();
+ default_resource_initialized = true;
}
static void resource_generic_init(void) {
- if (default_resource.num != 0) {
+ if (default_resource_initialized) {
return;
}
otel_service_name();
otel_resource_attributes();
+ default_resource_initialized = true;
}
int resource_attributes_init(char const *type) {