Skip to content

Commit

Permalink
Merge branch 'cc/NH-36453' into cc/NH-36453-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverchuk committed Mar 28, 2023
2 parents 216496b + 4bdabdd commit e386c63
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
12 changes: 11 additions & 1 deletion custom/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
id "java"
id "com.github.jarmstrong.buildconfig" version "1.9.0"
}

dependencies {
Expand All @@ -8,7 +9,7 @@ dependencies {
compileOnly("io.opentelemetry.javaagent:opentelemetry-javaagent-tooling:${versions.opentelemetryJavaagentAlpha}")
compileOnly("io.opentelemetry.instrumentation:opentelemetry-instrumentation-api:${versions.opentelemetryJavaagent}")
compileOnly("io.opentelemetry:opentelemetry-semconv:${versions.opentelemetryAlpha}")
compileOnly('org.checkerframework:checker-qual:3.21.2')
compileOnly('org.checkerframework:checker-qual:3.32.0')
compileOnly project(path: ":bootstrap")

compileOnly 'org.slf4j:slf4j-api:2.0.6'
Expand All @@ -17,4 +18,13 @@ dependencies {

compileOnly "com.google.auto.service:auto-service-annotations:1.0.1"
annotationProcessor 'com.google.auto.service:auto-service:1.0.1'
}

buildConfig {
buildConfigField('String', 'OTEL_AGENT_VERSION', "\"${versions.opentelemetry}\"")
buildConfigField('String', 'SOLARWINDS_AGENT_VERSION', "\"${versions.agent}\"" )
}

tasks.withType(Checkstyle) {
exclude '**/BuildConfig.java'
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.sdk.autoconfigure.AutoConfiguredOpenTelemetrySdk;
import otel_custom_distro.custom.BuildConfig;

import java.io.File;
import java.io.FileInputStream;
Expand Down Expand Up @@ -97,9 +98,11 @@ public class Initializer {
}

public static void initialize() throws InvalidConfigException {
LOGGER.info(String.format("Otel agent version: %s", BuildConfig.OTEL_AGENT_VERSION));
LOGGER.info(String.format("Solarwinds agent version: %s", BuildConfig.SOLARWINDS_AGENT_VERSION));
initializeConfig();
registerShutdownTasks();

registerShutdownTasks();
String serviceKey = (String) ConfigManager.getConfig(ConfigProperty.AGENT_SERVICE_KEY);
LOGGER.info("Successfully initialized SolarwindsAPM OpenTelemetry extensions with service key " + ServiceKeyUtils.maskServiceKey(serviceKey));
}
Expand Down

0 comments on commit e386c63

Please sign in to comment.