File tree 3 files changed +8
-4
lines changed
main/java/com/google/cloud/logging
test/java/com/google/cloud/logging 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -10,3 +10,5 @@ branches:
10
10
handleGHRelease : true
11
11
releaseType : java-backport
12
12
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 {
37
37
public static final String INSTRUMENTATION_NAME_KEY = "name" ;
38
38
public static final String INSTRUMENTATION_VERSION_KEY = "version" ;
39
39
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}
41
43
public static final String INSTRUMENTATION_LOG_NAME = "diagnostic-log" ;
42
44
public static final int MAX_DIAGNOSTIC_VALUE_LENGTH = 14 ;
43
45
public static final int MAX_DIAGNOSTIC_ENTIES = 3 ;
@@ -220,8 +222,8 @@ static boolean setInstrumentationStatus(boolean value) {
220
222
* Returns a library version associated with given class
221
223
*
222
224
* @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
225
227
*/
226
228
public static String getLibraryVersion (Class <?> libraryClass ) {
227
229
String libraryVersion = GaxProperties .getLibraryVersion (libraryClass );
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public class InstrumentationTest {
41
41
private static final LogEntry STRING_ENTRY = LogEntry .newBuilder (STRING_PAYLOAD ).build ();
42
42
private static final String JAVA_OTHER_NAME = "java-other" ;
43
43
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" ;
45
45
46
46
@ Test
47
47
public void testInstrumentationGenerated () {
You can’t perform that action at this time.
0 commit comments