Skip to content

Commit

Permalink
Add grizzly instrumentation as preview (#1830)
Browse files Browse the repository at this point in the history
* Add grizzly instrumentation as preview

* Update lockfiles
  • Loading branch information
trask authored Aug 3, 2021
1 parent c4e0b40 commit 5adcc2c
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ public static class InternalConfiguration {
public static class PreviewInstrumentation {
public DisabledByDefaultInstrumentation azureSdk = new DisabledByDefaultInstrumentation();

public DisabledByDefaultInstrumentation grizzly = new DisabledByDefaultInstrumentation();

// this is just here to detect if using this old setting in order to give a helpful message
@Deprecated
public DisabledByDefaultInstrumentation javaHttpClient = new DisabledByDefaultInstrumentation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ static Config getConfig(Configuration config) {
if (!config.preview.instrumentation.azureSdk.enabled) {
properties.put("otel.instrumentation.azure-core.enabled", "false");
}
if (config.preview.instrumentation.grizzly.enabled) {
// grizzly instrumentation is off by default
// TODO (trask) investigate if grizzly instrumentation can be enabled upstream by default now
properties.put("otel.instrumentation.grizzly.enabled", "true");
}
if (!config.preview.instrumentation.springIntegration.enabled) {
properties.put("otel.instrumentation.spring-integration.enabled", "false");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ enum Feature {
// JAXWS_DISABLED(17), no longer used
RABBITMQ_DISABLED(18),
SPRING_INTEGRATION_DISABLED(19),
LEGACY_PROPAGATION_DISABLED(20);
LEGACY_PROPAGATION_DISABLED(20),
GRIZZLY_DISABLED(21); // preview instrumentation

private static final Map<String, Feature> javaVendorFeatureMap;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ void trackConfigurationOptions(Configuration config) {
if (!config.instrumentation.mongo.enabled) {
featureList.add(Feature.MONGO_DISABLED);
}
if (!config.instrumentation.rabbitmq.enabled) {
featureList.add(Feature.RABBITMQ_DISABLED);
}
if (!config.instrumentation.redis.enabled) {
featureList.add(Feature.REDIS_DISABLED);
}
Expand All @@ -93,8 +96,8 @@ void trackConfigurationOptions(Configuration config) {
if (!config.preview.instrumentation.azureSdk.enabled) {
featureList.add(Feature.AZURE_SDK_DISABLED);
}
if (!config.instrumentation.rabbitmq.enabled) {
featureList.add(Feature.RABBITMQ_DISABLED);
if (!config.preview.instrumentation.grizzly.enabled) {
featureList.add(Feature.GRIZZLY_DISABLED);
}
if (!config.preview.instrumentation.springIntegration.enabled) {
featureList.add(Feature.SPRING_INTEGRATION_DISABLED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class Instrumentations {
INSTRUMENTATION_MAP.put("io.opentelemetry.spring-rabbit-1.0", 66);
INSTRUMENTATION_MAP.put("io.opentelemetry.jaxrs-client-2.0", 67);
INSTRUMENTATION_MAP.put("io.opentelemetry.jaxrs-client-2.0-resteasy-3.0", 68);
INSTRUMENTATION_MAP.put("io.opentelemetry.grizzly-2.0", 69);
}

// encode BitSet to a long
Expand Down
1 change: 1 addition & 0 deletions agent/instrumentation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ dependencies {
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-cassandra-4.0:${otelInstrumentationAlphaVersion}")
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-executors:${otelInstrumentationAlphaVersion}")
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-google-http-client-1.19:${otelInstrumentationAlphaVersion}")
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-grizzly-2.0:${otelInstrumentationAlphaVersion}")
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-grpc-1.6:${otelInstrumentationAlphaVersion}")
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-guava-10.0:${otelInstrumentationAlphaVersion}")
implementation("io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-http-url-connection:${otelInstrumentationAlphaVersion}")
Expand Down
1 change: 1 addition & 0 deletions agent/instrumentation/gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-cassandra-3.0
io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-cassandra-4.0:1.4.0+ai.patch.1-alpha=runtimeClasspath
io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-executors:1.4.0+ai.patch.1-alpha=runtimeClasspath
io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-google-http-client-1.19:1.4.0+ai.patch.1-alpha=runtimeClasspath
io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-grizzly-2.0:1.4.0+ai.patch.1-alpha=runtimeClasspath
io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-grpc-1.6:1.4.0+ai.patch.1-alpha=runtimeClasspath
io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-guava-10.0:1.4.0+ai.patch.1-alpha=runtimeClasspath
io.opentelemetry.javaagent.instrumentation:opentelemetry-javaagent-http-url-connection:1.4.0+ai.patch.1-alpha=runtimeClasspath
Expand Down

0 comments on commit 5adcc2c

Please sign in to comment.