-
-
Notifications
You must be signed in to change notification settings - Fork 445
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
Auto instrumentation doesn't work + JDBC metrics doesn't send #2465
Comments
For sending
Tried separately and together. |
Hello @NDruce I presume you're using Spring Boot 3 in combination with |
Thank you for help and updating documentation. Tried
Possibly reason is those lines:
But have no idea what is cause of it |
Help with it please |
@NDruce can you please share a reproducible sample. I'm unable to reproduce your issue so far. Putting your properties in |
With settings inside pom.xml: hastebin |
Can you try updating your
Having an old version here might be causing issues. Do other settings, that are not Sentry specific but spring specific in your |
After updating My
|
Things you can try:
|
Wow. I was removed
(What does all this ^ means?) And contain debug about which data sent in envelops to Sentry:
|
And how to take current transaction inside controller? To create spans inside controller method |
Have you looked at https://docs.sentry.io/platforms/java/guides/spring-boot/performance/instrumentation/custom-instrumentation/ . It explains how you can do it. Please let me know if you have any more questions. |
How to deal with console output above? It doesn't match reference you published to compare |
|
Tried to clean restart of application, even with devtools livereload disabled in I fount that other guy having the same issue, but his thread name is |
Maybe this helps. Found it here: https://docs.spring.io/spring-boot/docs/current/reference/html/using.html#using.devtools I'm still unable to reproduce. Please provide a sample that allows me to help you if you need my assistance. |
Option to disable devtools is worked via run arg, thread name now "main", but still the same problems with Beans are displayed in log. Can you send please working example of application for reference? |
You can find a sample here: https://github.com/getsentry/sentry-java/tree/main/sentry-samples/sentry-samples-spring-boot-jakarta There's more in the parent directory if it's not the one you need. |
I getting this error: I was patched it with this method to work:
But seems like it's wrong way. Tried to run app with this error, it's started, but Beans problem in log still exist and no any JDBC metric in Sentry. In app code all is like in example. |
Did you try starting the sample with your own DSN to verify that's working? |
Yes |
So the problem only shows up in your own application but not our sample, correct? I'm still unable to help you without a sample that reproduces this. If you can tell me how I need to modify our sample to get your error to show up, I might be able to help. |
Invited to https://github.com/NDruce/testapp |
Hello @NDruce. Thank you for the sample. I tested and it sends events to Sentry. After adding an The log messages seem to be linked to using I still haven't figured out how to fix it. I also haven't found any broken features due to this either. |
-------------------------------> Full log <------------------------------- |
Hope this helps. |
But what if in one time app will handle multiple requests? Maybe about 64 in one time? It will be 64 threads? I guess one thread utilizing one CPU core, but cores amount is 4-16 at all, so some requests possibly can unite/hook into one thread (so 64 queries / 8 cpu cores = 8 requests in one thread, causing getting wrong transaction object). Are my assumptions correct or wrong? |
Also have this error when stopping application:
|
In Spring WebMVC requests are handled in a blocking manner. Number of threads can be controlled using config properties like I'll take a look at the |
Closing this now as all questions seem to have been answered and the PR has been merged. Feel free to reopen if you need more assistance. |
Integration
sentry-spring-boot-starter
Java Version
17
Version
6.0.0
Steps to Reproduce
Followed official tutorials, rereading them ~30 times, searching a lot of Internet for week, and now I decided to create issue.
I have all Maven dependencies, Sentry Exceptions are successfully sending (but settings in application.properties wasn't work so I wasted 1-2 days to make just work anything). But no one Spring Boot MVC requests was traced:
https://docs.sentry.io/platforms/java/guides/spring-boot/performance/instrumentation/automatic-instrumentation/
(all written in instruction I was made and this Bean was told me via System.out.println that it was called). But no Transactions in Sentry. My
sentry.properties
config:I made custom instrumentation:
https://hastebin.com/uwulijeput.php
But I think it's kind of crutch and just a desperation, because no other (and more correct) way of tracing requests doesn’t want to work, and therefore I write the entire implementation myself...
With my instrumentation I have no ability to get all detailed stack trace of calling functions where each submethod call is new child span. And I forced to manually declare spans for each submethod in code.
I just want to understand why automatic instrumentation don't working. Because now I have to take time for write each separate span for a lot of method calls.
When with automatic instrumentation, having code like
, I can leave this code as is and see in Sentry this:
==========================================================
==========================================================
I want see this look of Trace ^
And to don't to write a lot of times this:
Expected Result
Described above.
Also JDBC tracing is not working, I don't see anything in Sentry, but configured that by instruction. My
application.properties
:Maven:
Actual Result
No any transaction for any controller request was created. Only with instrumentation coded on my own... As the latest way and the only possible (and single working) way
The text was updated successfully, but these errors were encountered: