Skip to content

Commit

Permalink
chore: increase timeout and decrease default sample rate
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed Nov 22, 2023
1 parent 7465467 commit 2305524
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/google/cloud/spanner/pgadapter/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static OpenTelemetry setupOpenTelemetry(OptionsMetadata optionsMetadata) throws
}

TraceConfiguration.Builder builder =
TraceConfiguration.builder().setDeadline(Duration.ofMillis(30000));
TraceConfiguration.builder().setDeadline(Duration.ofSeconds(60L));
String projectId = optionsMetadata.getTelemetryProjectId();

Check warning on line 76 in src/main/java/com/google/cloud/spanner/pgadapter/Server.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/com/google/cloud/spanner/pgadapter/Server.java#L75-L76

Added lines #L75 - L76 were not covered by tests
if (projectId != null) {
builder.setProjectId(projectId);

Check warning on line 78 in src/main/java/com/google/cloud/spanner/pgadapter/Server.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/com/google/cloud/spanner/pgadapter/Server.java#L78

Added line #L78 was not covered by tests
Expand All @@ -95,7 +95,7 @@ static OpenTelemetry setupOpenTelemetry(OptionsMetadata optionsMetadata) throws
TraceExporter traceExporter = TraceExporter.createWithConfiguration(configuration);

Check warning on line 95 in src/main/java/com/google/cloud/spanner/pgadapter/Server.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/com/google/cloud/spanner/pgadapter/Server.java#L87-L95

Added lines #L87 - L95 were not covered by tests
Sampler sampler;
if (optionsMetadata.getOpenTelemetryTraceRatio() == null) {
sampler = Sampler.parentBased(Sampler.alwaysOn());
sampler = Sampler.parentBased(Sampler.traceIdRatioBased(0.05d));

Check warning on line 98 in src/main/java/com/google/cloud/spanner/pgadapter/Server.java

View check run for this annotation

Codecov / codecov/patch

src/main/java/com/google/cloud/spanner/pgadapter/Server.java#L98

Added line #L98 was not covered by tests
} else {
sampler =
Sampler.parentBased(
Expand Down

0 comments on commit 2305524

Please sign in to comment.