Skip to content

Commit b085617

Browse files
authored
Telemetry updates (#828)
1 parent 7b93e76 commit b085617

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/main/java/com/auth0/client/mgmt/core/ClientOptions.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
*/
44
package com.auth0.client.mgmt.core;
55

6+
import com.auth0.net.Telemetry;
67
import java.util.HashMap;
78
import java.util.Map;
89
import java.util.Optional;
@@ -33,13 +34,12 @@ private ClientOptions(
3334
this.environment = environment;
3435
this.headers = new HashMap<>();
3536
this.headers.putAll(headers);
36-
this.headers.putAll(new HashMap<String, String>() {
37-
{
38-
put("X-Fern-Language", "JAVA");
39-
put("X-Fern-SDK-Name", "com.auth0.fern:api-sdk");
40-
put("X-Fern-SDK-Version", "0.0.938");
41-
}
42-
});
37+
38+
Telemetry telemetry =
39+
new Telemetry("auth0-java", Telemetry.class.getPackage().getImplementationVersion());
40+
if (telemetry.getValue() != null) {
41+
this.headers.put("Auth0-Client", telemetry.getValue());
42+
}
4343
this.headerSuppliers = headerSuppliers;
4444
this.httpClient = httpClient;
4545
this.timeout = timeout;

0 commit comments

Comments
 (0)