File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
main/java/com/google/cloud/logging
test/java/com/google/cloud/logging Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -10,3 +10,5 @@ branches:
1010 handleGHRelease : true
1111 releaseType : java-backport
1212 branch : 3.7.x
13+ extraFiles :
14+ - src/main/java/com/google/cloud/logging/Instrumentation.java
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ public final class Instrumentation {
3737 public static final String INSTRUMENTATION_NAME_KEY = "name" ;
3838 public static final String INSTRUMENTATION_VERSION_KEY = "version" ;
3939 public static final String JAVA_LIBRARY_NAME_PREFIX = "java" ;
40- public static final String DEFAULT_INSTRUMENTATION_VERSION = "UNKNOWN" ;
40+ // {x-version-update-start:google-cloud-logging:current}
41+ public static final String DEFAULT_INSTRUMENTATION_VERSION = "1.0.0" ;
42+ // {x-version-update-end}
4143 public static final String INSTRUMENTATION_LOG_NAME = "diagnostic-log" ;
4244 public static final int MAX_DIAGNOSTIC_VALUE_LENGTH = 14 ;
4345 public static final int MAX_DIAGNOSTIC_ENTIES = 3 ;
@@ -220,8 +222,8 @@ static boolean setInstrumentationStatus(boolean value) {
220222 * Returns a library version associated with given class
221223 *
222224 * @param libraryClass {Class<?>} The class to be used to determine a library version
223- * @return The version number string for given class or "UNKNOWN" if class library version cannot
224- * be detected
225+ * @return The version number string for given class or DEFAULT_INSTRUMENTATION_VERSION if class
226+ * library version cannot be detected
225227 */
226228 public static String getLibraryVersion (Class <?> libraryClass ) {
227229 String libraryVersion = GaxProperties .getLibraryVersion (libraryClass );
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public class InstrumentationTest {
4141 private static final LogEntry STRING_ENTRY = LogEntry .newBuilder (STRING_PAYLOAD ).build ();
4242 private static final String JAVA_OTHER_NAME = "java-other" ;
4343 private static final String JAVA_INVALID_NAME = "no-java-name" ;
44- private static final String JAVA_OTHER_VERSION = "1 .0.0" ;
44+ private static final String JAVA_OTHER_VERSION = "0 .0.0" ;
4545
4646 @ Test
4747 public void testInstrumentationGenerated () {
You can’t perform that action at this time.
0 commit comments