Skip to content

Commit 16ee86b

Browse files
Merge pull request #29 from microsoftgraph/mobilal/telemetry
Updated telemetry header to include java version at runtime
2 parents 2a30957 + 0311255 commit 16ee86b

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ mavenGroupId = com.microsoft.graph
2727
mavenArtifactId = microsoft-graph-core
2828
mavenMajorVersion = 1
2929
mavenMinorVersion = 0
30-
mavenPatchVersion = 0
30+
mavenPatchVersion = 1
3131
mavenArtifactSuffix =
3232
nightliesUrl = http://dl.bintray.com/MicrosoftGraph/Maven
3333

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ repository {
1919
2020
dependency {
2121
// Include the sdk as a dependency
22-
compile('com.microsoft.graph:microsoft-graph-core:1.0.0')
22+
compile('com.microsoft.graph:microsoft-graph-core:1.0.1')
2323
}
2424
```
2525

@@ -29,7 +29,7 @@ Add the dependency in `dependencies` in pom.xml
2929
<dependency>
3030
<groupId>com.microsoft.graph</groupId>
3131
<artifactId>microsoft-graph-core</artifactId>
32-
<version>1.0.0</version>
32+
<version>1.0.1</version>
3333
</dependency>
3434
```
3535

src/main/java/com/microsoft/graph/httpcore/TelemetryHandler.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
public class TelemetryHandler implements Interceptor{
1212

1313
public static final String SDK_VERSION = "SdkVersion";
14-
public static final String VERSION = "v1.0.0";
14+
public static final String VERSION = "v1.0.1";
1515
public static final String GRAPH_VERSION_PREFIX = "graph-java-core";
16+
public static final String JAVA_VERSION_PREFIX = "java";
1617
public static final String CLIENT_REQUEST_ID = "client-request-id";
1718

1819
@Override
@@ -25,7 +26,8 @@ public Response intercept(Chain chain) throws IOException {
2526
telemetryOptions = new TelemetryOptions();
2627

2728
String featureUsage = "(featureUsage=" + telemetryOptions.getFeatureUsage() + ")";
28-
String sdkversion_value = GRAPH_VERSION_PREFIX + "/" + VERSION + " " + featureUsage;
29+
String javaVersion = System.getProperty("java.version");
30+
String sdkversion_value = GRAPH_VERSION_PREFIX + "/" + VERSION + " " + featureUsage + " " + JAVA_VERSION_PREFIX + "/" + javaVersion;
2931
telemetryAddedBuilder.addHeader(SDK_VERSION, sdkversion_value);
3032

3133
if(request.header(CLIENT_REQUEST_ID) == null) {

0 commit comments

Comments
 (0)