okta / okta-sdk-java

A Java SDK for interacting with the Okta management API, enabling server-side code to manage Okta users, groups, applications, and more.
Apache License 2.0
143 stars 136 forks source link

Enable integration with open tracing & micrometer libraries #575

Open gpradeepkrishna opened 3 years ago

gpradeepkrishna commented 3 years ago

I'm submitting a

Background info

Enable support for Integration with open tracing & micrometer libraries to enable visibility.

Expected behavior

Some of the goals of this integration

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

VitaliiTytarenko-okta commented 3 years ago

@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!

arvindkrishnakumar-okta commented 3 years ago

@gpradeepkrishna Thanks for posting!

Can you let us know what specific metrics are you interested in tracking?

ybudweiser commented 2 years ago

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

andyzasl commented 1 year ago

Any updates on this?

arvindkrishnakumar-okta commented 1 year ago

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!

arvindkrishnakumar-okta commented 5 months ago

Sorry for the delay in getting to this ticket.

Here is the summary of my findings:

1) 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. 2) 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!