Skip to content

Commit

Permalink
Update more config property names (#1786)
Browse files Browse the repository at this point in the history
  • Loading branch information
trask committed Nov 28, 2020
1 parent b683c2f commit 083651a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public abstract class AbstractExecutorInstrumentation implements TypeInstrumenta
"otel.instrumentation.executors.include";

private static final String EXECUTORS_INCLUDE_ALL_PROPERTY_NAME =
"otel.instrumentation.executors.includeAll";
"otel.instrumentation.executors.include-all";

// hopefully these configuration properties can be static after
// https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/1345
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public static HystrixTracer tracer() {
private final boolean extraTags;

private HystrixTracer() {
extraTags = Config.get().getBooleanProperty("otel.hystrix.tags.enabled", false);
extraTags = Config.get().getBooleanProperty("otel.instrumentation.hystrix.tags", false);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class HystrixObservableChainTest extends AgentTestRunner {
}

static final PREVIOUS_CONFIG = ConfigUtils.updateConfig {
it.setProperty("otel.hystrix.tags.enabled", "true")
it.setProperty("otel.instrumentation.hystrix.tags", "true")
}

def cleanupSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class HystrixObservableTest extends AgentTestRunner {
}

static final PREVIOUS_CONFIG = ConfigUtils.updateConfig {
it.setProperty("otel.hystrix.tags.enabled", "true")
it.setProperty("otel.instrumentation.hystrix.tags", "true")
}

def cleanupSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class HystrixTest extends AgentTestRunner {
}

static final PREVIOUS_CONFIG = ConfigUtils.updateConfig {
it.setProperty("otel.hystrix.tags.enabled", "true")
it.setProperty("otel.instrumentation.hystrix.tags", "true")
}

def cleanupSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
public final class KafkaClientConfiguration {

public static boolean isPropagationEnabled() {
return Config.get().getBooleanProperty("otel.kafka.client.propagation.enabled", true);
return Config.get().getBooleanProperty("otel.instrumentation.kafka.client-propagation", true);
}

private KafkaClientConfiguration() {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
* SPDX-License-Identifier: Apache-2.0
*/

import static io.opentelemetry.api.trace.Span.Kind.CONSUMER
import static io.opentelemetry.api.trace.Span.Kind.PRODUCER
import static io.opentelemetry.instrumentation.test.utils.ConfigUtils.setConfig
import static io.opentelemetry.instrumentation.test.utils.ConfigUtils.updateConfig
import static io.opentelemetry.instrumentation.test.utils.TraceUtils.basicSpan
import static io.opentelemetry.instrumentation.test.utils.TraceUtils.runUnderTrace
import static io.opentelemetry.api.trace.Span.Kind.CONSUMER
import static io.opentelemetry.api.trace.Span.Kind.PRODUCER

import io.opentelemetry.api.trace.attributes.SemanticAttributes
import io.opentelemetry.instrumentation.api.config.Config
import io.opentelemetry.instrumentation.test.AgentTestRunner
import io.opentelemetry.api.trace.attributes.SemanticAttributes
import java.util.concurrent.LinkedBlockingQueue
import java.util.concurrent.TimeUnit
import org.apache.kafka.clients.consumer.ConsumerConfig
Expand Down Expand Up @@ -613,7 +613,7 @@ class KafkaClientTest extends AgentTestRunner {
private static Config setPropagation(boolean propagationEnabled) {
return updateConfig {
it.setProperty("otel.kafka.client.propagation.enabled", Boolean.toString(propagationEnabled))
it.setProperty("otel.instrumentation.kafka.client-propagation", Boolean.toString(propagationEnabled))
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class TracerInstaller {
private static final Logger log = LoggerFactory.getLogger(TracerInstaller.class);

private static final String EXPORTER_JAR_CONFIG = "otel.exporter.jar";
private static final String EXPORTERS_CONFIG = "otel.exporter";
private static final String PROPAGATORS_CONFIG = "otel.propagators";
private static final String EXPORTERS_CONFIG = "otel.exporter"; // this name is from spec
private static final String PROPAGATORS_CONFIG = "otel.propagators"; // this name is from spec
private static final String JAVAAGENT_ENABLED_CONFIG = "otel.javaagent.enabled";
private static final List<String> DEFAULT_EXPORTERS = Collections.singletonList("otlp");

Expand Down

0 comments on commit 083651a

Please sign in to comment.