-
Notifications
You must be signed in to change notification settings - Fork 979
Add database connection code in extension to store traces directly to database (mongo) #5647
Replies: 1 comment · 3 replies
-
I am getting following error while building the extension : FAILURE: Build failed with an exception.
BUILD FAILED in 26s due to this i am not getting the custom attributes? Thanks |
Beta Was this translation helpful? Give feedback.
All reactions
-
hi @Yahire3388, can you include more of the compile error you are getting? |
Beta Was this translation helpful? Give feedback.
All reactions
-
Hi @trask PFB the complete compiler error i am getting while building the project using cmd : gradlew build.
FAILURE: Build failed with an exception.
thanks |
Beta Was this translation helpful? Give feedback.
All reactions
-
just checking, have you made any local changes to the extension? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @trask , @mateuszrzeszutek
I am creating an extension to get span processor and add database connection code to it to store the details directly to the database. I had referred https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/examples/extension and used the jar obtained by gradle build, but still the attributes in the traces were not updated.
Also i tried by adding extra attributes but still the attributes were not upadted.
Following is my repo where the extension sourcecode is added, demoextension jar is the extension jar i had created , setenv.bat is the bat file of my tomcat which indicates how i am configuring the agent and extension with my application for auto instrumentation.
https://github.com/Yahire3388/extensionToJavaAgent
I am still not getting extra attributes in the span which are added through extension.
Following are the steps i am performing to add extension :
My intent is to get the span processor and add database connection code in the extension to store the span context to the database.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions