Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ plugins{
id("io.github.gradle-nexus.publish-plugin") version "2.0.0"
}

val swoAgentVersion = "3.3.0"
val swoAgentVersion = "3.3.1"
extra["swoAgentVersion"] = swoAgentVersion
group = "com.solarwinds"
version = if (System.getenv("SNAPSHOT_BUILD").toBoolean()) "$swoAgentVersion-SNAPSHOT" else swoAgentVersion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public class SolarwindsPropertiesSupplier implements Supplier<Map<String, String
"otel.instrumentation.runtime-telemetry.emit-experimental-jfr-metrics", "true");
PROPERTIES.put("otel.resource.providers.azure.enabled", "true");
PROPERTIES.put("otel.resource.providers.aws.enabled", "true");

PROPERTIES.put(
"otel.java.disabled.resource.providers",
"io.opentelemetry.sdk.autoconfigure.ServiceInstanceIdResourceProvider");

} else {
PROPERTIES.put("otel.sdk.disabled", "true");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import io.opentelemetry.sdk.autoconfigure.spi.ConfigProperties;
import io.opentelemetry.sdk.autoconfigure.spi.ResourceProvider;
import io.opentelemetry.sdk.resources.Resource;
import io.opentelemetry.semconv.ServiceAttributes;
import java.util.UUID;

@AutoService(ResourceProvider.class)
public class ApmResourceProvider implements ResourceProvider {
Expand All @@ -32,7 +34,13 @@ public class ApmResourceProvider implements ResourceProvider {
@Override
public Resource createResource(ConfigProperties configProperties) {
Attributes resourceAttributes =
Attributes.of(moduleKey, "apm", versionKey, BuildConfig.SOLARWINDS_AGENT_VERSION);
Attributes.of(
moduleKey,
"apm",
versionKey,
BuildConfig.SOLARWINDS_AGENT_VERSION,
ServiceAttributes.SERVICE_INSTANCE_ID,
UUID.randomUUID().toString());
Comment thread
cleverchuk marked this conversation as resolved.
Resolved
return Resource.create(resourceAttributes);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import io.opentelemetry.sdk.autoconfigure.spi.internal.DefaultConfigProperties;
import io.opentelemetry.sdk.resources.Resource;
import io.opentelemetry.semconv.ServiceAttributes;
import java.util.Collections;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand All @@ -41,5 +42,6 @@ void testCreateResource() {

assertNotNull(module);
assertNotNull(version);
assertNotNull(resource.getAttribute(ServiceAttributes.SERVICE_INSTANCE_ID));
}
}
Loading