Fix typos (#6961)
This commit is contained in:
parent
93175522d4
commit
3911cacfdc
|
|
@ -9,7 +9,7 @@ dependencies {
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
// Gradle sets scala compiler version to toolchain vesion, not target version
|
// Gradle sets scala compiler version to toolchain version, not target version
|
||||||
// https://github.com/gradle/gradle/issues/18211
|
// https://github.com/gradle/gradle/issues/18211
|
||||||
withType<ScalaCompile>().configureEach {
|
withType<ScalaCompile>().configureEach {
|
||||||
scalaCompileOptions.apply {
|
scalaCompileOptions.apply {
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,10 @@ Executor pool = Executors.newFixedThreadPool(10)
|
||||||
|
|
||||||
public void doGet(HttpServletRequest request, HttpServletResponse response) {
|
public void doGet(HttpServletRequest request, HttpServletResponse response) {
|
||||||
Future f1 = pool.submit(() -> {
|
Future f1 = pool.submit(() -> {
|
||||||
return userRepository.queryShippingAddress(requet)
|
return userRepository.queryShippingAddress(request)
|
||||||
})
|
})
|
||||||
Future f2 = pool.submit(() -> {
|
Future f2 = pool.submit(() -> {
|
||||||
return warehouse.currentState(requet)
|
return warehouse.currentState(request)
|
||||||
})
|
})
|
||||||
writeResponse(response, f1.get(), f2.get())
|
writeResponse(response, f1.get(), f2.get())
|
||||||
}
|
}
|
||||||
|
|
@ -23,7 +23,7 @@ Executor pool = Executors.newFixedThreadPool(10)
|
||||||
public void doGet(HttpServletRequest request, HttpServletResponse response) {
|
public void doGet(HttpServletRequest request, HttpServletResponse response) {
|
||||||
final AsyncContext acontext = request.startAsync();
|
final AsyncContext acontext = request.startAsync();
|
||||||
acontext.start(() -> {
|
acontext.start(() -> {
|
||||||
String address = userRepository.queryShippingAddress(requet)
|
String address = userRepository.queryShippingAddress(request)
|
||||||
HttpServletResponse response = acontext.getResponse();
|
HttpServletResponse response = acontext.getResponse();
|
||||||
writeResponse(response, address)
|
writeResponse(response, address)
|
||||||
acontext.complete();
|
acontext.complete();
|
||||||
|
|
@ -52,7 +52,7 @@ on that thread for the duration of the execution. This can be illustrated by the
|
||||||
```
|
```
|
||||||
var job = () -> {
|
var job = () -> {
|
||||||
try(Scope scope = this.context.makeCurrent()) {
|
try(Scope scope = this.context.makeCurrent()) {
|
||||||
return userRepository.queryShippingAddress(requet)
|
return userRepository.queryShippingAddress(request)
|
||||||
}}
|
}}
|
||||||
job.context = Context.current()
|
job.context = Context.current()
|
||||||
Future f1 = pool.submit()
|
Future f1 = pool.submit()
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import io.opentelemetry.semconv.trace.attributes.SemanticAttributes;
|
||||||
* attributes</a>. This class is designed with SQL (or SQL-like) database clients in mind.
|
* attributes</a>. This class is designed with SQL (or SQL-like) database clients in mind.
|
||||||
*
|
*
|
||||||
* <p>It sets the same set of attributes as {@link DbClientAttributesExtractor} plus an additional
|
* <p>It sets the same set of attributes as {@link DbClientAttributesExtractor} plus an additional
|
||||||
* <code>{@linkplain SemanticAttributes#DB_SQL_TABLE db.sql.table}</code> attrubute. The raw SQL
|
* <code>{@linkplain SemanticAttributes#DB_SQL_TABLE db.sql.table}</code> attribute. The raw SQL
|
||||||
* statements returned by the {@link SqlClientAttributesGetter#rawStatement(Object)} method are
|
* statements returned by the {@link SqlClientAttributesGetter#rawStatement(Object)} method are
|
||||||
* sanitized before use, all statement parameters are removed.
|
* sanitized before use, all statement parameters are removed.
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
class CodeAttributesExtractorTest {
|
class CodeAttributesExtractorTest {
|
||||||
|
|
||||||
static final class TestAtttributesGetter implements CodeAttributesGetter<Map<String, String>> {
|
static final class TestAttributesGetter implements CodeAttributesGetter<Map<String, String>> {
|
||||||
@Override
|
@Override
|
||||||
public Class<?> codeClass(Map<String, String> request) {
|
public Class<?> codeClass(Map<String, String> request) {
|
||||||
try {
|
try {
|
||||||
|
|
@ -46,7 +46,7 @@ class CodeAttributesExtractorTest {
|
||||||
Context context = Context.root();
|
Context context = Context.root();
|
||||||
|
|
||||||
CodeAttributesExtractor<Map<String, String>, Void> underTest =
|
CodeAttributesExtractor<Map<String, String>, Void> underTest =
|
||||||
CodeAttributesExtractor.create(new TestAtttributesGetter());
|
CodeAttributesExtractor.create(new TestAttributesGetter());
|
||||||
|
|
||||||
// when
|
// when
|
||||||
AttributesBuilder startAttributes = Attributes.builder();
|
AttributesBuilder startAttributes = Attributes.builder();
|
||||||
|
|
@ -68,7 +68,7 @@ class CodeAttributesExtractorTest {
|
||||||
void shouldExtractNoAttributesIfNoneAreAvailable() {
|
void shouldExtractNoAttributesIfNoneAreAvailable() {
|
||||||
// given
|
// given
|
||||||
CodeAttributesExtractor<Map<String, String>, Void> underTest =
|
CodeAttributesExtractor<Map<String, String>, Void> underTest =
|
||||||
CodeAttributesExtractor.create(new TestAtttributesGetter());
|
CodeAttributesExtractor.create(new TestAttributesGetter());
|
||||||
|
|
||||||
// when
|
// when
|
||||||
AttributesBuilder attributes = Attributes.builder();
|
AttributesBuilder attributes = Attributes.builder();
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ public class JettyHttpClient9TracingInterceptor
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Request.RequestListener proxiedListner =
|
Request.RequestListener proxiedListener =
|
||||||
(Request.RequestListener)
|
(Request.RequestListener)
|
||||||
Proxy.newProxyInstance(
|
Proxy.newProxyInstance(
|
||||||
listenerClass.getClassLoader(),
|
listenerClass.getClassLoader(),
|
||||||
|
|
@ -121,7 +121,7 @@ public class JettyHttpClient9TracingInterceptor
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
iterator.set(proxiedListner);
|
iterator.set(proxiedListener);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ public final class OpenTelemetryMetricsReporter implements MetricsReporter {
|
||||||
private static final List<RegisteredObservable> registeredObservables = new ArrayList<>();
|
private static final List<RegisteredObservable> registeredObservables = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Reset for test by reseting the {@link #meter} to {@code null} and closing all registered
|
* Reset for test by resetting the {@link #meter} to {@code null} and closing all registered
|
||||||
* instruments.
|
* instruments.
|
||||||
*/
|
*/
|
||||||
static void resetForTest() {
|
static void resetForTest() {
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ class TelemetryRetriever {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
previousSize = content.length()
|
previousSize = content.length()
|
||||||
println "Curent content size $previousSize"
|
println "Current content size $previousSize"
|
||||||
TimeUnit.MILLISECONDS.sleep(500)
|
TimeUnit.MILLISECONDS.sleep(500)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -192,7 +192,7 @@ public abstract class InstrumentationExtension
|
||||||
return testRunner.forceFlushCalled();
|
return testRunner.forceFlushCalled();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the {@link OpenTelemetrySdk} initialied for library tests. */
|
/** Returns the {@link OpenTelemetrySdk} initialized for library tests. */
|
||||||
public OpenTelemetrySdk getOpenTelemetrySdk() {
|
public OpenTelemetrySdk getOpenTelemetrySdk() {
|
||||||
if (testRunner instanceof LibraryTestRunner) {
|
if (testRunner instanceof LibraryTestRunner) {
|
||||||
return ((LibraryTestRunner) testRunner).getOpenTelemetrySdk();
|
return ((LibraryTestRunner) testRunner).getOpenTelemetrySdk();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue