-
Notifications
You must be signed in to change notification settings - Fork 202
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
The "Parent Id" & "Operation Id" fields of trace logs are displayed as "00000000000000000000000000000000" #2432
Comments
hi @bvahdat, thanks for reporting this! This looks like an issue with "standalone" logs (logs that aren't part of a request). Previously "standalone" logs would each generate their own "operation id" ("trace id"). As we are aligning more and more with OpenTelemetry, and standalone logs don't have any "span context" (distributed trace), there is not really an operation id / parent id anymore for standalone logs. I have sent #2440 to not report any operation id / parent id now in this case (we definitely should not have been reporting |
Hi @trask Thanks for your feedback.
The logs belong to an application listening on a Azure ServiceBus topic which was triggered using: https://docs.microsoft.com/en-us/azure/service-bus-messaging/explorer Do you think we should not expect to see the |
hi @bvahdat, Is Application Insights auto-capturing a request telemetry record for the Azure ServiceBus listener? If it is, then I would expect the log to be tied to that "request". If it isn't, then it makes sense that the log is standalone, and probably the underlying issue is Azure/azure-sdk-for-java#26269. |
Yes, it does both in case of
Which unfortunately is not the case using |
@bvahdat can you help me reproduce this behavior? I tested with /~https://github.com/trask/azure-sdk-examples/blob/main/servicebus/src/main/java/com/example/servicebus/Receiver.java, and I got the request telemetry and the correlated log telemetry and I test with /~https://github.com/trask/azure-sdk-examples/blob/main/servicebus/src/main/java/com/example/servicebus/ReceiverAsyncClient.java and /~https://github.com/trask/azure-sdk-examples/blob/main/servicebus/src/main/java/com/example/servicebus/ReceiverAsyncClientAlt.java, and I didn't get the request telemetry, and I did get the "standalone" log telemetry (both 3.2.11 and 3.3.1), which is due to the ServiceBus tracing issue linked above |
Please give this reproducer a try: /~https://github.com/bvahdat/test-app |
@bvahdat thx! from the screenshot it looks like in 3.2.11 the "Operation Id" and "Parent Id" are the same, which means it's a standalone log record and not correlated with the Service Bus transaction, which would explain zeros in 3.3.0 (and once 3.3.2 is released it the "Operation Id" and "Parent Id" for those will be empty, since they are not correlated with any operation). |
Thanks, how can I force the Service Bus Explorer to correlate it's pushed message with the Service Bus transaction? |
check out the workaround described in Azure/azure-sdk-for-java#26269 |
@bvahdat since you are using apache camel, you may want to try the apache camel preview instrumentation, it would be great to hear if/how that works out for you
|
Tried it out and pushed that upstream by the reproducer codebase mentioned above with no change by the observed behaviour. But honestly I don't see why the apache camel preview instrumentation support should change anything in the behaviour we are observing here, as the problem is about diagnostic trace logs any application could write. |
hi @bvahdat, I believe you received a build of Service Bus SDK that has fix for Azure/azure-sdk-for-java#26269, does that resolve this issue? thx! |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
We are testing the dev build of the jar. testing will be completed by 07-Sep-2022. |
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment. |
msftbot please don't close. |
@bvahdat were you able to confirm that this issue is resolved? |
Thanks, closing. |
Expected behavior
The displayed
Parent Id
&Operation Id
fields should display the effective real values.Actual behavior
The
Parent Id
&Operation Id
fields are displayed as00000000000000000000000000000000
which is invalid.To Reproduce
The release
3.2.11
doesn't have this issue, however using3.3.0
or3.3.1
we came across this problem. We are making use of Spring-Boot and write a log through SLF4J which gets collected through App-Insights as a trace log:org.slf4j.Logger.info("this is my log message");
Looking into the corresponding trace logs in portal for it the
Parent Id
&Operation Id
fields are displayed as zeros on the right hand side of the screen.Sample Application
If applicable, provide a sample application which reproduces the issue.
System information
Please provide the following information:
3.3.0
and3.3.1
have got this issue,3.2.11
however works fine.2.7.1
3.18.0
Logs
Turn on SDK logs and attach/paste them to the issue. If using an application server, also attach any relevant server logs.
The
Turn on SDK logs
link above doesn't work for me.Screenshots
See the comparison below between
3.2.11
versus3.3.1
:The text was updated successfully, but these errors were encountered: