Skip to content

Commit

Permalink
Merge branch 'main' of github.com:BrianEstrada/otel-extension
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/kotlin/com/monta/otel/extension/Customizer.java
  • Loading branch information
BrianEstrada committed Sep 25, 2023
2 parents 0b94101 + 24499a9 commit 4282870
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @monta-app/backend
* @monta-app/guild-tooling
7 changes: 3 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ repositories {
}

dependencies {
// Tracing
val otelVersion = "1.27.0"
implementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:${otelVersion}-alpha")
implementation("io.opentelemetry:opentelemetry-semconv:${otelVersion}-alpha")
val otelVersion = "1.30.0"
implementation("io.opentelemetry:opentelemetry-sdk-extension-autoconfigure:${otelVersion}")
implementation("io.opentelemetry.semconv:opentelemetry-semconv:1.2.1-alpha")
implementation("io.opentelemetry.contrib:opentelemetry-samplers:${otelVersion}-alpha")
}

Expand Down
9 changes: 5 additions & 4 deletions src/main/kotlin/com/monta/otel/extension/Customizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import io.opentelemetry.sdk.autoconfigure.spi.AutoConfigurationCustomizerProvider;
import io.opentelemetry.sdk.resources.Resource;
import io.opentelemetry.sdk.trace.samplers.Sampler;
import io.opentelemetry.semconv.resource.attributes.ResourceAttributes;
import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
import io.opentelemetry.semconv.ResourceAttributes;
import io.opentelemetry.semconv.SemanticAttributes;

import java.util.UUID;

Expand Down Expand Up @@ -38,8 +38,9 @@ public void customize(AutoConfigurationCustomizer autoConfiguration) {
sdkTracerProviderBuilder.setSampler(
Sampler.parentBased(
RuleBasedRoutingSampler.builder(SpanKind.SERVER, getSampler())
.drop(SemanticAttributes.HTTP_TARGET, "/health*")
.drop(SemanticAttributes.HTTP_TARGET, "/prometheus*")
.drop(SemanticAttributes.URL_PATH, "/health*")
.drop(SemanticAttributes.URL_PATH, "/prometheus*")
.drop(SemanticAttributes.URL_PATH, "/metrics*")
.build()
)
)
Expand Down

0 comments on commit 4282870

Please sign in to comment.