Run build without warnings (#1387)

This commit is contained in:
Nikita Salnikov-Tarnovski 2020-10-16 02:10:22 +03:00 committed by GitHub
parent 30e75c6d6d
commit 15e0b2ff32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
29 changed files with 60 additions and 405 deletions

View File

@ -3,11 +3,38 @@ name: PR build
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11 for running checks
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build
uses: burrunan/gradle-cache-action@v1.5
with:
job-id: jdk11
arguments: build --stacktrace -x :smoke-tests:test
- name: Aggregate test reports with ciMate
if: always()
continue-on-error: true
env:
CIMATE_PROJECT_ID: mz1jo49x
CIMATE_CI_KEY: "PR / jdk11"
run: |
wget -q https://get.cimate.io/release/linux/cimate
chmod +x cimate
./cimate -v "**/TEST-*.xml"
test:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 15 ]
java: [ 8, 15 ]
fail-fast: false
steps:
- uses: actions/checkout@v2
@ -16,17 +43,13 @@ jobs:
with:
java-version: ${{ matrix.java }}
- name: Set JDK ${{ matrix.java }} home
run: echo "::set-env name=JAVA_${{ matrix.java }}_HOME::${{ env.JAVA_HOME }}"
run: echo JAVA_${{ matrix.java }}_HOME=${{ env.JAVA_HOME }} >> $GITHUB_ENV
- name: Set up JDK 11 for running Gradle
if: matrix.java != 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Debug space
run: df -h
- name: Test
uses: burrunan/gradle-cache-action@v1.5
with:
@ -102,7 +125,7 @@ jobs:
run: ./gradlew ${{ matrix.module }}:muzzle --no-daemon
accept-pr:
needs: [ test, smoke-test, muzzle ]
needs: [ build, test, smoke-test, muzzle ]
runs-on: ubuntu-latest
steps:
- name: Success

View File

@ -1,36 +0,0 @@
apply plugin: 'checkstyle'
dependencies {
checkstyle 'com.puppycrawl.tools:checkstyle:8.20'
}
def checkstyleConfigDir = file("${buildscript.sourceFile.parentFile}/enforcement/checkstyle")
checkstyle {
configDirectory = checkstyleConfigDir
configProperties.checkstyleConfigDir = checkstyleConfigDir
maxWarnings = 500
}
plugins.withType(GroovyBasePlugin) {
sourceSets.all { sourceSet ->
tasks.register("${sourceSet.getTaskName('checkstyle', 'groovy')}", Checkstyle) {
configFile = new File(checkstyleConfigDir, "checkstyle-groovy.xml")
source(allGroovy)
classpath = sourceSet.compileClasspath
reports.xml.destination = new File(reportsDir, "${sourceSet.name}-groovy.xml")
}
}
}
def checkstyleTasks = tasks.withType(Checkstyle)
tasks.register("checkstyle") {
dependsOn checkstyleTasks
}
check.dependsOn checkstyleTasks
tasks.withType(Test).configureEach {
mustRunAfter checkstyleTasks
}

View File

@ -1,24 +0,0 @@
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="SuppressionFilter">
<property name="file" value="${checkstyleConfigDir}/suppressions.xml"/>
</module>
<module name="JavadocPackage"/>
<module name="TreeWalker">
<module name="JavadocStyle">
<property name="checkEmptyJavadoc" value="true"/>
</module>
<module name="JavadocType">
<property name="scope" value="package"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="package"/>
</module>
</module>
</module>

View File

@ -1,14 +0,0 @@
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
<module name="Checker">
<module name="SuppressionFilter">
<property name="file" value="${checkstyleConfigDir}/suppressions.xml"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="File \| Settings \| File Templates"/>
</module>
<module name="RegexpSingleline">
<property name="format" value="Created with IntelliJ IDEA"/>
</module>
</module>

View File

@ -1,261 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
"https://checkstyle.org/dtds/configuration_1_3.dtd">
<!--
Checkstyle configuration that checks the Google coding conventions from Google Java Style
that can be found at https://google.github.io/styleguide/javaguide.html.
Checkstyle is very configurable. Be sure to read the documentation at
http://checkstyle.sf.net (or in your downloaded distribution).
To completely disable a check, just comment it out or delete it from the file.
Authors: Max Vetrenko, Ruslan Diachenko, Roman Ivanov.
-->
<module name = "Checker">
<property name="charset" value="UTF-8"/>
<property name="severity" value="warning"/>
<property name="fileExtensions" value="java, properties, xml"/>
<!-- Excludes all 'module-info.java' files -->
<!-- See https://checkstyle.org/config_filefilters.html -->
<module name="BeforeExecutionExclusionFileFilter">
<property name="fileNamePattern" value="module\-info\.java$"/>
</module>
<!-- Checks for whitespace -->
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
<module name="FileTabCharacter">
<property name="eachLine" value="true"/>
</module>
<module name="TreeWalker">
<module name="OuterTypeFilename"/>
<module name="IllegalTokenText">
<property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
<property name="format"
value="\\u00(09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
<property name="message"
value="Consider using special escape sequence instead of octal value or Unicode escaped value."/>
</module>
<module name="AvoidEscapedUnicodeCharacters">
<property name="allowEscapesForControlCharacters" value="true"/>
<property name="allowByTailComment" value="true"/>
<property name="allowNonPrintableEscapes" value="true"/>
</module>
<module name="LineLength">
<property name="max" value="100"/>
<property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>
</module>
<module name="AvoidStarImport"/>
<module name="OneTopLevelClass"/>
<module name="NoLineWrap"/>
<module name="EmptyBlock">
<property name="option" value="TEXT"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE, LITERAL_SWITCH"/>
</module>
<module name="NeedBraces"/>
<module name="LeftCurly"/>
<module name="RightCurly">
<property name="id" value="RightCurlySame"/>
<property name="tokens"
value="LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_IF, LITERAL_ELSE,
LITERAL_DO"/>
</module>
<module name="RightCurly">
<property name="id" value="RightCurlyAlone"/>
<property name="option" value="alone"/>
<property name="tokens"
value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, STATIC_INIT,
INSTANCE_INIT"/>
</module>
<module name="WhitespaceAround">
<property name="allowEmptyConstructors" value="true"/>
<property name="allowEmptyLambdas" value="true"/>
<property name="allowEmptyMethods" value="true"/>
<property name="allowEmptyTypes" value="true"/>
<property name="allowEmptyLoops" value="true"/>
<message key="ws.notFollowed"
value="WhitespaceAround: ''{0}'' is not followed by whitespace. Empty blocks may only be represented as '{}' when not part of a multi-block statement (4.1.3)"/>
<message key="ws.notPreceded"
value="WhitespaceAround: ''{0}'' is not preceded with whitespace."/>
</module>
<module name="OneStatementPerLine"/>
<module name="MultipleVariableDeclarations"/>
<module name="ArrayTypeStyle"/>
<module name="MissingSwitchDefault"/>
<module name="FallThrough"/>
<module name="UpperEll"/>
<module name="ModifierOrder"/>
<module name="EmptyLineSeparator">
<property name="allowNoEmptyLineBetweenFields" value="true"/>
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapDot"/>
<property name="tokens" value="DOT"/>
<property name="option" value="nl"/>
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapComma"/>
<property name="tokens" value="COMMA"/>
<property name="option" value="EOL"/>
</module>
<module name="SeparatorWrap">
<!-- ELLIPSIS is EOL until https://github.com/google/styleguide/issues/258 -->
<property name="id" value="SeparatorWrapEllipsis"/>
<property name="tokens" value="ELLIPSIS"/>
<property name="option" value="EOL"/>
</module>
<module name="SeparatorWrap">
<!-- ARRAY_DECLARATOR is EOL until https://github.com/google/styleguide/issues/259 -->
<property name="id" value="SeparatorWrapArrayDeclarator"/>
<property name="tokens" value="ARRAY_DECLARATOR"/>
<property name="option" value="EOL"/>
</module>
<module name="SeparatorWrap">
<property name="id" value="SeparatorWrapMethodRef"/>
<property name="tokens" value="METHOD_REF"/>
<property name="option" value="nl"/>
</module>
<module name="PackageName">
<property name="format" value="^[a-z]+(\.[a-z][a-z0-9]*)*$"/>
<message key="name.invalidPattern"
value="Package name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="TypeName">
<message key="name.invalidPattern"
value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MemberName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9]*$"/>
<message key="name.invalidPattern"
value="Member name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ParameterName">
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="LambdaParameterName">
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Lambda parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="CatchParameterName">
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Catch parameter name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="LocalVariableName">
<property name="tokens" value="VARIABLE_DEF"/>
<property name="format" value="^[a-z]([a-z0-9][a-zA-Z0-9]*)?$"/>
<message key="name.invalidPattern"
value="Local variable name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="ClassTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Class type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MethodTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Method type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="InterfaceTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<message key="name.invalidPattern"
value="Interface type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="NoFinalizer"/>
<module name="GenericWhitespace">
<message key="ws.followed"
value="GenericWhitespace ''{0}'' is followed by whitespace."/>
<message key="ws.preceded"
value="GenericWhitespace ''{0}'' is preceded with whitespace."/>
<message key="ws.illegalFollow"
value="GenericWhitespace ''{0}'' should followed by whitespace."/>
<message key="ws.notPreceded"
value="GenericWhitespace ''{0}'' is not preceded with whitespace."/>
</module>
<module name="Indentation">
<property name="basicOffset" value="2"/>
<property name="braceAdjustment" value="0"/>
<property name="caseIndent" value="2"/>
<property name="throwsIndent" value="4"/>
<property name="lineWrappingIndentation" value="4"/>
<property name="arrayInitIndent" value="2"/>
</module>
<module name="AbbreviationAsWordInName">
<property name="ignoreFinal" value="false"/>
<property name="allowedAbbreviationLength" value="1"/>
</module>
<module name="OverloadMethodsDeclarationOrder"/>
<module name="VariableDeclarationUsageDistance"/>
<module name="CustomImportOrder">
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="separateLineBetweenGroups" value="true"/>
<property name="customImportOrderRules" value="STATIC###THIRD_PARTY_PACKAGE"/>
</module>
<module name="MethodParamPad"/>
<module name="NoWhitespaceBefore">
<property name="tokens"
value="COMMA, SEMI, POST_INC, POST_DEC, DOT, ELLIPSIS, METHOD_REF"/>
<property name="allowLineBreaks" value="true"/>
</module>
<module name="ParenPad"/>
<module name="OperatorWrap">
<property name="option" value="NL"/>
<property name="tokens"
value="BAND, BOR, BSR, BXOR, DIV, EQUAL, GE, GT, LAND, LE, LITERAL_INSTANCEOF, LOR,
LT, MINUS, MOD, NOT_EQUAL, PLUS, QUESTION, SL, SR, STAR, METHOD_REF "/>
</module>
<module name="AnnotationLocation">
<property name="id" value="AnnotationLocationMostCases"/>
<property name="tokens"
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF"/>
</module>
<module name="AnnotationLocation">
<property name="id" value="AnnotationLocationVariables"/>
<property name="tokens" value="VARIABLE_DEF"/>
<property name="allowSamelineMultipleAnnotations" value="true"/>
</module>
<module name="NonEmptyAtclauseDescription"/>
<module name="JavadocTagContinuationIndentation"/>
<module name="SummaryJavadoc">
<property name="forbiddenSummaryFragments"
value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
</module>
<module name="JavadocParagraph"/>
<module name="AtclauseOrder">
<property name="tagOrder" value="@param, @return, @throws, @deprecated"/>
<property name="target"
value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingThrowsTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="minLineCount" value="2"/>
<property name="allowedAnnotations" value="Override, Test"/>
<property name="allowThrowsTagsForSubclasses" value="true"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-z0-9][a-zA-Z0-9_]*$"/>
<message key="name.invalidPattern"
value="Method name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="SingleLineJavadoc">
<property name="ignoreInlineTags" value="false"/>
</module>
<module name="EmptyCatchBlock">
<property name="exceptionVariableName" value="expected"/>
</module>
<module name="CommentsIndentation"/>
</module>
</module>

View File

@ -1,11 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE suppressions PUBLIC
"-//Puppy Crawl//DTD Suppressions 1.1//EN"
"http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions>
<suppress checks="RegexpHeader" files=".*MimeParse.java"/>
</suppressions>

View File

@ -5,7 +5,6 @@ apply plugin: 'groovy'
apply plugin: 'org.gradle.test-retry'
apply from: "$rootDir/gradle/spotless.gradle"
apply from: "$rootDir/gradle/checkstyle.gradle"
apply from: "$rootDir/gradle/codenarc.gradle"
apply from: "$rootDir/gradle/spotbugs.gradle"

View File

@ -10,8 +10,6 @@ package io.opentelemetry.instrumentation.api.log;
* instrumentations.
*
* @see org.slf4j.MDC
* @see org.apache.logging.log4j.ThreadContext
* @see org.apache.log4j.MDC
*/
public final class LoggingContextConstants {
/** Key under which the current trace id will be injected into the context data. */

View File

@ -101,7 +101,7 @@ public abstract class HttpServerTracer<REQUEST, RESPONSE, CONNECTION, STORAGE> e
}
/**
* Convenience method. Delegates to {@link #endExceptionally(Span, Throwable, RESPONSE)}, passing
* Convenience method. Delegates to {@link #endExceptionally(Span, Throwable, Object)}, passing
* {@code response} value of {@code null}.
*/
@Override
@ -110,7 +110,7 @@ public abstract class HttpServerTracer<REQUEST, RESPONSE, CONNECTION, STORAGE> e
}
/**
* Convenience method. Delegates to {@link #endExceptionally(Span, Throwable, RESPONSE, long)},
* Convenience method. Delegates to {@link #endExceptionally(Span, Throwable, Object, long)},
* passing {@code timestamp} value of {@code -1}.
*/
public void endExceptionally(Span span, Throwable throwable, RESPONSE response) {
@ -119,7 +119,8 @@ public abstract class HttpServerTracer<REQUEST, RESPONSE, CONNECTION, STORAGE> e
/**
* If {@code response} is {@code null}, the {@code http.status_code} will be set to {@code 500}
* and the {@link Span} status will be set to {@link io.opentelemetry.trace.Status#INTERNAL}.
* and the {@link Span} status will be set to {@link
* io.opentelemetry.trace.StatusCanonicalCode#ERROR}.
*/
public void endExceptionally(Span span, Throwable throwable, RESPONSE response, long timestamp) {
onError(span, unwrapThrowable(throwable));
@ -138,7 +139,7 @@ public abstract class HttpServerTracer<REQUEST, RESPONSE, CONNECTION, STORAGE> e
/**
* Returns context stored to the given request-response-loop storage by {@link
* #attachServerContext(Context, STORAGE)}.
* #attachServerContext(Context, Object)}.
*/
@Nullable
public abstract Context getServerContext(STORAGE storage);

View File

@ -3,7 +3,7 @@
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.api.jdbc;
package io.opentelemetry.javaagent.instrumentation.jdbc;
import java.util.Objects;

View File

@ -14,8 +14,6 @@ import static net.bytebuddy.matcher.ElementMatchers.returns;
import static net.bytebuddy.matcher.ElementMatchers.takesArgument;
import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.instrumentation.api.jdbc.DBInfo;
import io.opentelemetry.javaagent.instrumentation.api.jdbc.JDBCConnectionUrlParser;
import io.opentelemetry.javaagent.tooling.Instrumenter;
import java.sql.Connection;
import java.util.Map;

View File

@ -3,10 +3,11 @@
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.instrumentation.api.jdbc;
package io.opentelemetry.javaagent.instrumentation.jdbc;
import static io.opentelemetry.javaagent.instrumentation.api.jdbc.DBInfo.DEFAULT;
import static io.opentelemetry.javaagent.instrumentation.jdbc.DBInfo.DEFAULT;
import io.opentelemetry.javaagent.instrumentation.api.jdbc.DbSystem;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLDecoder;

View File

@ -8,7 +8,6 @@ package io.opentelemetry.javaagent.instrumentation.jdbc;
import static io.opentelemetry.javaagent.instrumentation.api.WeakMap.Provider.newWeakMap;
import io.opentelemetry.javaagent.instrumentation.api.WeakMap;
import io.opentelemetry.javaagent.instrumentation.api.jdbc.DBInfo;
import java.sql.Connection;
import java.sql.PreparedStatement;

View File

@ -10,8 +10,6 @@ import static io.opentelemetry.javaagent.instrumentation.jdbc.JDBCUtils.connecti
import io.opentelemetry.instrumentation.api.tracer.DatabaseClientTracer;
import io.opentelemetry.javaagent.instrumentation.api.CallDepthThreadLocalMap;
import io.opentelemetry.javaagent.instrumentation.api.CallDepthThreadLocalMap.Depth;
import io.opentelemetry.javaagent.instrumentation.api.jdbc.DBInfo;
import io.opentelemetry.javaagent.instrumentation.api.jdbc.JDBCConnectionUrlParser;
import io.opentelemetry.trace.Span;
import java.net.InetSocketAddress;
import java.sql.Connection;

View File

@ -3,9 +3,9 @@
* SPDX-License-Identifier: Apache-2.0
*/
import static io.opentelemetry.javaagent.instrumentation.api.jdbc.JDBCConnectionUrlParser.parse
import static io.opentelemetry.javaagent.instrumentation.jdbc.JDBCConnectionUrlParser.parse
import io.opentelemetry.javaagent.instrumentation.api.jdbc.DBInfo
import io.opentelemetry.javaagent.instrumentation.jdbc.DBInfo
import spock.lang.Shared
import spock.lang.Specification

View File

@ -15,8 +15,7 @@ import java.lang.reflect.Method;
import net.bytebuddy.asm.Advice;
/**
* Instrumentation for methods annotated with {@link
* io.opentelemetry.extensions.auto.annotations.WithSpan} annotation.
* Instrumentation for methods annotated with {@link WithSpan} annotation.
*
* @see WithSpanAnnotationInstrumentation
*/

View File

@ -11,6 +11,7 @@ import static net.bytebuddy.matcher.ElementMatchers.isAnnotatedWith;
import static net.bytebuddy.matcher.ElementMatchers.named;
import static net.bytebuddy.matcher.ElementMatchers.not;
import application.io.opentelemetry.extensions.auto.annotations.WithSpan;
import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.tooling.Instrumenter;
import java.util.Map;
@ -19,10 +20,7 @@ import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;
/**
* Instrumentation for methods annotated with {@link
* io.opentelemetry.extensions.auto.annotations.WithSpan} annotation.
*/
/** Instrumentation for methods annotated with {@link WithSpan} annotation. */
@AutoService(Instrumenter.class)
public final class WithSpanAnnotationInstrumentation
extends AbstractTraceAnnotationInstrumentation {

View File

@ -13,7 +13,7 @@ import java.time.Duration;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Configuration for {@link JaegerSpanExporter}
* Configuration for {@link io.opentelemetry.exporters.jaeger.JaegerGrpcSpanExporter}
*
* <p>Get Exporter Service Name
*

View File

@ -7,7 +7,7 @@ package io.opentelemetry.instrumentation.spring.autoconfigure.exporters.logging;
import org.springframework.boot.context.properties.ConfigurationProperties;
/** Configuration for {@link LoggingSpanExporter} */
/** Configuration for {@link io.opentelemetry.exporters.logging.LoggingSpanExporter} */
@ConfigurationProperties(prefix = "opentelemetry.trace.exporter.logging")
public final class LoggingSpanExporterProperties {
private boolean enabled = true;

View File

@ -12,7 +12,7 @@ import java.time.Duration;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Configuration for {@link OtlpGrpcSpanExporter}
* Configuration for {@link io.opentelemetry.exporters.otlp.OtlpGrpcSpanExporter}
*
* <p>Get Exporter Service Name
*

View File

@ -11,9 +11,9 @@ import static io.opentelemetry.exporters.zipkin.ZipkinSpanExporter.DEFAULT_SERVI
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Configuration for {@link ZipkinSpanExporter}
* Configuration for {@link io.opentelemetry.exporters.zipkin.ZipkinSpanExporter}
*
* <p>Get Exporter Service Name {@link getServiceName()}
* <p>Get Exporter Service Name {@link #getServiceName()}
*
* <p>Get Exporter Endpoint
*/

View File

@ -14,7 +14,7 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.OncePerRequestFilter;
/** Configures {@link WebMVCFilter} for tracing. */
/** Configures {@link WebMvcTracingFilter} for tracing. */
@Configuration
@EnableConfigurationProperties(WebMvcProperties.class)
@ConditionalOnProperty(prefix = "opentelemetry.trace.web", name = "enabled", matchIfMissing = true)

View File

@ -3,6 +3,9 @@ group = 'io.opentelemetry.javaagent'
apply from: "$rootDir/gradle/java.gradle"
apply from: "$rootDir/gradle/publish.gradle"
project.ext.minimumBranchCoverage = 0.0
project.ext.minimumInstructionCoverage = 0.0
dependencies {
api deps.opentelemetryApi
compileOnly deps.opentelemetrySdk

View File

@ -1,10 +0,0 @@
`db.system`
The latest specification for `db.system` is [database.md].
[database.md]: https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/database.md
| Value for `db.system` | Product name | Note |
| :-------------------- | :------------------------ | :----------------------------- |
| `"h2"` | H2 Database | not on [database.md] |
| `"hsqldb"` | Hyper SQL Database | not on [database.md] |

View File

@ -227,13 +227,13 @@ public interface Instrumenter {
/** @return A type matcher used to match the class under transform. */
public abstract ElementMatcher<? super TypeDescription> typeMatcher();
/** @return A map of matcher->advice */
/** @return A map of matcher to advice */
public abstract Map<? extends ElementMatcher<? super MethodDescription>, String> transformers();
/**
* Context stores to define for this instrumentation.
*
* <p>A map of {class-name -> context-class-name}. Keys (and their subclasses) will be
* <p>A map of {@code class-name to context-class-name}. Keys (and their subclasses) will be
* associated with a context of the value.
*/
public Map<String, String> contextStore() {

View File

@ -45,7 +45,7 @@ public class Utils {
}
}
/** com.foo.Bar -> com/foo/Bar.class */
/** com.foo.Bar to com/foo/Bar.class */
public static String getResourceName(String className) {
if (!className.endsWith(".class")) {
return className.replace('.', '/') + ".class";
@ -54,12 +54,12 @@ public class Utils {
}
}
/** com/foo/Bar.class -> com.foo.Bar */
/** com/foo/Bar.class to com.foo.Bar */
public static String getClassName(String resourceName) {
return resourceName.replaceAll("\\.class\\$", "").replace('/', '.');
}
/** com.foo.Bar -> com/foo/Bar */
/** com.foo.Bar to com/foo/Bar */
public static String getInternalName(String resourceName) {
return resourceName.replaceAll("\\.class\\$", "").replace('.', '/');
}

View File

@ -32,7 +32,7 @@ import net.bytebuddy.pool.TypePool;
* There two core parts to the cache...
* <li>a cache of ClassLoader to WeakReference&lt;ClassLoader&gt;
* <li>a single cache of TypeResolutions for all ClassLoaders - keyed by a custom composite key of
* ClassLoader & class name
* ClassLoader and class name
* </ul>
*
* <p>This design was chosen to create a single limited size cache that can be adjusted for the

View File

@ -54,7 +54,7 @@ public class ReferenceCollector extends ClassVisitor {
* ByteBuddy plugin.
*
* @param entryPointClassName Starting point for generating references.
* @return Map of [referenceClassName -> Reference]
* @return Map of [referenceClassName to Reference]
* @see io.opentelemetry.javaagent.tooling.muzzle.InstrumentationClassPredicate
*/
public static Map<String, Reference> collectReferencesFrom(String entryPointClassName) {

View File

@ -313,12 +313,6 @@ class TestHttpServer implements AutoCloseable {
resp.setContentLength(body.bytes.length)
resp.writer.print(body)
}
void send(String body, String contentType) {
assert contentType != null
resp.setContentType(contentType)
send(body)
}
}
static class Headers {