-
Notifications
You must be signed in to change notification settings - Fork 130
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
[Help needed] Deploying opentelemetry-sqlcommenter-java to maven central #205
Comments
hi @sjs994! what do you think about splitting the sqlcommenter components across the various language contrib repos? that would be the easiest way to benefit from existing / shared build infrastructure and language expertise |
Hi @trask, Thanks for the reply! To give more context: open-telemetry/community#783 (comment). This is what we are trying to achieve. As of now we are planning to have it as part of a separate monorepo project and publish packages from here. This will help us deprecate the google-cloud repository: https://github.com/google/sqlcommenter. After an initial version release, we are planning to start discussion on merging each language based library to the proper opentelemetry-contrib/instrumentation repositories. Does that make sense ? |
Hi @sjs994 - I think we won't be very comfortable distributing out publishing credentials across various repositories because it will become quite hard for us to track. The reality of package managers is they still generally require personal credentials for publishing to. I suspect other language maintainers will have a similar sentiment. From my reading of the google repo, it seems the implementations are all independent. Even if putting the java folder in this repo, your team can still have approval rights to it while also making sure all the OTel Java components are under the technical stewardship of the Java maintainers. Would you be blocked from deprecating your google repo even if the four implementations were distributed among the OTel language teams? |
Hi @anuraaga, I agree, getting a token with full scope to deploy changes to any repository is not acceptable. We will be unblocked when we will have some versions published from opentelemetry org. But have a few queries regarding putting java-sqlcommenter folder in contrib repo:
|
hey @sjs994,
moving into the contrib repo doesn't trigger any special spec requirements (maybe I misunderstand this question?). it does require following this repo's conventions (which we need to document better, but we will help you through these)
the release process applies to the whole repo for simplicity (one set of tags across all components), but we can kick off (repo-wide) patch releases as needed. see the patch release policy in the java-instrumentation repo, I will update the docs in this repo to explicitly mention the same (other components in this repo are also used by customers and have similar needs)
contrib repos support both production ready and experimental components |
I took a closer look through the code. I found a bit of context propagation logic that overlaps with our existing instrumentation and then a very small amount of code to append it to an sql string. I don't see much point in a separate repo or even a folder in this repo given how small this is. How about we just add the SQL injection behind a flag in our existing instrumentation? Work in the spec to define the formatting could happen in parallel with this if it's flag guarded. |
@sjs994 I discussed with the other Java maintainers and there is consensus that we will not accept publishing Java artifacts outside of our maintained three repos. That gives two options
Judging from open-telemetry/opentelemetry-python-contrib#845 (comment) on the Python issue, it seems like the primary motivation here is to deprecate the |
Hi @sjs994 - @jsuereth has summed up his thoughts on incorporating sqlcommenter into instrumentation in open-telemetry/community#783 (comment) I am excited especially by the 2) there of getting tracing-through-SQL spec'd out and formulated to an open standard. For Java, I do still strongly recommend adding sqlcommenter functionality to our existing instrumentation, I suspect it will be relatively easy for all of us and the quickest/simplest way to get this into the hands of OTel users. We have JDBC instrumentation which will work in almost all apps, with a single interception point here We can tweak the method signature to accept a For an initial version I recommend just dealing with traceparent and tracestate and think about controller/action/framework later. During the specification process it will be good to understand how this interacts with OpenTelemetry baggage or the semantic convention attributes for example. While I don't think the JDBC instrumentation currently references any configuration, you can see this example, you just need to statically call to retrieve a flag value (jdbc instrumentation is itself statically initialized which makes things simpler for us here). If we guard SQL mutation using Context behind Does this provide enough info to get started in our repo? Let us know if anything is unclear or you are still blocked on anything. PS: When bringing the injection logic in, you will probably refer to the existing code. Please make sure to remove |
Thank you very much @anuraaga! As now we have clarity, we can go forward on trying to integrate things into opentelemetry. Thanks for the code points where to integrate. I think this provides enough info to start. We are looking at opentelemetry-python first and have some progress with POCs there. After a document for that with few possible approaches is complete, we will start on the java side.
Does that work ? I do have few queries:
|
I suppose this flag: |
Yup until the spec is complete we would need a flag like that.
In Java I think so since many if not most users use it. The instrumentation is the same for both so this shouldn't be something to worry about though. I suspect it is the same situation in Python. |
Thanks, Got it! |
Hey @sjs994, any update on this? |
SQLCommenter is a library donated by Google to OpenTelemetry. We are in a process to of migrating the source code from google-cloud-sqlcommenter to opentelemetry-sqlcommenter.
SQLCommenter contains middleware/plugins that adds the capability of instrumenting SQL queries with code that executes the queries i.e. information like
action
,controller
,dbdriver
, etc andopentelemetry-trace
(if present). More Details hereOne of the supported language is Java, which includes spring framework and hibernate ORM (https://github.com/open-telemetry/opentelemetry-sqlcommenter/tree/main/java/sqlcommenter-java).
For the process of migration, we have moved in the code, documentation and renamed the packages to point to
opentelemetry
instead ofgoogle-cloud
. Now our next task is to publish the packages to maven central. We had similar requirements from Python team and the suggestion was to create a ticket for that so that they can share a limited scope token (to only deploy packages for our repo into opentelemetry organization in PyPi): link.Need help to understand the process followed for
opentelemetry-java-*
libraries and how they are published. Also if we need any access to publishopentelemetry-sqlcommenter-java
to maven central under opentelemetry org.cc: @jsuereth
The text was updated successfully, but these errors were encountered: