Enable integration with open tracing & micrometer libraries
I'm submitting a
- [ ] bug report
- [x] feature request
Background info
Enable support for Integration with open tracing & micrometer libraries to enable visibility.
Expected behavior
Some of the goals of this integration
- enable spans for outgoing calls by SDK to Okta host.
- enable metrics for datastore (caching) as well as outgoing calls.
What went wrong?
Without a means to integrate with open tracing & micrometer, we are forced to meddle with internals in order to provide visibility. This is not sustainable as new releases of SDK can break it.
SDK Version
4.0.0
@gpradeepkrishna
Thanks for bringing this to our attention! I've added an item to our backlog for prioritization (internal ref: OKTA-385625). Our Java devs will review it further. We'll comment here when there is additional information to share.
Thanks for using Okta!
@gpradeepkrishna Thanks for posting!
Can you let us know what specific metrics are you interested in tracking?
I think it would be best to expose the underlining httpclient, so we can add our own instrumentation or integrate with micrometer and customize it
Any updates on this?
Thanks for checking in on this issue. We already have a ticket logged and are currently prioritizing this integration with our Java SDKs. We will try to keep this issue updated when we have more information. You are always welcome to ping us again for an update!
Sorry for the delay in getting to this ticket.
Here is the summary of my findings:
- Micrometer tracing integrates well with Spring framework and we do not use Spring framework in our SDK and do not intend to do so in future due to the transitive dependencies that it would bring (maintaining those dependencies would be an unnecessary overhead for the use case of the SDK). Having said that, Micrometer IMHO is not a great integration for our SDK at this time.
- Open Tracing project is archived and this means there is no active support going forward. Given this, we would not want to integrate with this archived framework. We could potentially consider evaluating OpenTelemetry as an alternative to this.
As mentioned above in one of the comments, we've actually made it possible for a user to supply their own HttpClient reference while instantiating the SDK's ApiClient which opens up the possibility of the user adding their own instrumentation.
Let me know if this helps!