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
15 changes: 11 additions & 4 deletions docs/instrumentation-list.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3786,19 +3786,26 @@ libraries:
- com.twitter:finagle-http_2.12:[23.11.0,]
finatra:
- name: finatra-2.9
description: This instrumentation for the Finatra web framework augments the telemetry
generated by the underlying Netty instrumentation. It provides more specific,
high-level context, such as route information, to the spans generated by Netty.
description: |
This instrumentation enriches HTTP server spans with route information, and enables controller spans for the Finatra web framework (controller spans are disabled by default).
library_link: https://github.com/twitter/finatra
features:
- HTTP_ROUTE
- CONTROLLER_SPANS
source_path: instrumentation/finatra-2.9
scope:
name: io.opentelemetry.finatra-2.9
target_versions:
javaagent:
- com.twitter:finatra-http_2.11:[2.9.0,]
- com.twitter:finatra-http_2.12:[2.9.0,]
configurations:
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled
description: Enables the creation of experimental controller spans.
type: boolean
default: false
telemetry:
- when: default
- when: otel.instrumentation.common.experimental.controller-telemetry.enabled=true
spans:
- span_kind: INTERNAL
attributes:
Expand Down
3 changes: 3 additions & 0 deletions instrumentation/finatra-2.9/javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ tasks {
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")

jvmArgs("-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true")

systemProperty("collectMetadata", findProperty("collectMetadata")?.toString() ?: "false")
systemProperty("metadataConfig", "otel.instrumentation.common.experimental.controller-telemetry.enabled=true")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import io.opentelemetry.instrumentation.api.semconv.http.HttpServerRoute;
import io.opentelemetry.instrumentation.api.semconv.http.HttpServerRouteSource;
import io.opentelemetry.instrumentation.api.util.VirtualField;
import io.opentelemetry.javaagent.bootstrap.internal.ExperimentalConfig;

public final class FinatraSingletons {

Expand All @@ -35,6 +36,7 @@ public final class FinatraSingletons {
? ClassNames.simpleName(request.controllerClass())
: "<unknown>")
.addAttributesExtractor(CodeAttributesExtractor.create(codeAttributesGetter))
.setEnabled(ExperimentalConfig.get().controllerTelemetryEnabled())
.buildInstrumenter();
}

Expand Down
12 changes: 11 additions & 1 deletion instrumentation/finatra-2.9/metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
description: This instrumentation for the Finatra web framework augments the telemetry generated by the underlying Netty instrumentation. It provides more specific, high-level context, such as route information, to the spans generated by Netty.
description: >
This instrumentation enriches HTTP server spans with route information, and enables controller
spans for the Finatra web framework (controller spans are disabled by default).
library_link: https://github.com/twitter/finatra
features:
- HTTP_ROUTE
- CONTROLLER_SPANS
configurations:
- name: otel.instrumentation.common.experimental.controller-telemetry.enabled
description: Enables the creation of experimental controller spans.
type: boolean
default: false
Loading