Skip to content

Commit

Permalink
Update to OTel 1.5 (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
Anuraag Agrawal authored Sep 6, 2021
1 parent b26bb07 commit efc9952
Show file tree
Hide file tree
Showing 15 changed files with 444 additions and 471 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import com.google.auto.service.AutoService;
import io.opentelemetry.sdk.autoconfigure.ConfigProperties;
import io.opentelemetry.sdk.autoconfigure.OpenTelemetrySdkAutoConfiguration;
import io.opentelemetry.sdk.autoconfigure.OpenTelemetryResourceAutoConfiguration;
import io.opentelemetry.sdk.autoconfigure.spi.ConfigurableSamplerProvider;
import io.opentelemetry.sdk.trace.samplers.Sampler;
import java.util.Map;
Expand All @@ -17,7 +17,8 @@ public class AwsXrayRemoteSamplerProvider implements ConfigurableSamplerProvider
@Override
public Sampler createSampler(ConfigProperties config) {
AwsXrayRemoteSamplerBuilder builder =
AwsXrayRemoteSampler.newBuilder(OpenTelemetrySdkAutoConfiguration.getResource());
AwsXrayRemoteSampler.newBuilder(
OpenTelemetryResourceAutoConfiguration.configureResource(config));

Map<String, String> params = config.getCommaSeparatedMap("otel.traces.sampler.arg");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ void emptyConfig() {

@Test
void setEndpoint() {
when(config.getCommaSeparatedMap("otel.resource.attributes"))
.thenReturn(Collections.emptyMap());
when(config.getCommaSeparatedMap("otel.traces.sampler.arg"))
.thenReturn(Collections.singletonMap("endpoint", "http://localhost:3000"));
try (AwsXrayRemoteSampler sampler =
Expand Down
4 changes: 2 additions & 2 deletions dependencyManagement/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ val DEPENDENCY_BOMS = listOf(
"org.junit:junit-bom:5.7.2",
"com.linecorp.armeria:armeria-bom:1.9.1",
"io.grpc:grpc-bom:1.39.0",
"io.opentelemetry:opentelemetry-bom:1.4.1",
"io.opentelemetry:opentelemetry-bom-alpha:1.4.1-alpha",
"io.opentelemetry:opentelemetry-bom:1.5.0",
"io.opentelemetry:opentelemetry-bom-alpha:1.5.0-alpha",
"org.testcontainers:testcontainers-bom:1.16.0"
)

Expand Down
Loading

0 comments on commit efc9952

Please sign in to comment.