-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Telemetry format and allow to customize it #195
Conversation
42c55b6
to
f54e185
Compare
public Telemetry(String name, String version, String core) { | ||
this.name = name; | ||
this.version = version; | ||
this.core = core; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is core
here? If it's used to extend this SDK's telemetry, let's put the SDK name instead to be more clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
core
for this library is nothing (null). But those libs that use this internally, would expose as core
the version of auth0-java (this sdk). In other SDKs we named it "libraryVersion", I can change to that if you agree. Remember though env
includes core
as per the RFC.
e.g. on android https://github.com/auth0/Lock.Android/blob/eeff3594786520d50ba3938fc9f7ebf2f80588b8/lib/src/main/java/com/auth0/android/lock/Lock.java#L232
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RFC mentioned core
long ago (mostly in the context of libs using auth0.js) but it's not there now. Let's use the library name itself, that will be much clearer when pulling reports. I'l add that to the RFC now.
|
||
public String getValue() { | ||
Map<String, String> values = new HashMap<>(); | ||
Map<String, Object> values = new HashMap<>(); | ||
if (name != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we ever send telemetry if the name was null? Or the version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only scenario this would happen is if the user overrides it and sets an explicit null for them. I don't think we should send the telemetry in that case. But then we should change that on the android side as well (PR had the same diff and you approved it) auth0/Auth0.Android#209. Side note, env will always have at least the java version regardless. But again, without name and version it wouldn't make sense. Your call!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what the behavior in the reports would be with a blank name or version. Name is the most critical, without that we have nothing to go off of so I would skip sending in that case. For version ... that would likely just be a mistake and if it was a non-Auth0 developer extending for some reason, they wouldn't see the problem. So ... name required, I don't think version needs to be. Thoughts?
Sorry if I missed that in the other library. If there are questions around how the telemetry should behave, can you call that out with a comment next time so it's not missed?
value = tmpValue; | ||
} | ||
|
||
public String getName() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When are these getters used? Just for testing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. I want to expose something so libraries overriding this can check everything is being replaced fine 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See replies
Changes
AuthAPI
andManagementAPI
clients to set a new custom telemetry instance.References
SDK-700
Testing
Checklist