Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.3k stars 1.96k forks source link

[BUG] Cosmos SDK timeout exceptions missing the Open Telemetry trace details #32692

Closed Neha-Sharma0-WM closed 1 year ago

Neha-Sharma0-WM commented 1 year ago

Describe the bug Cosmos SDK timeout exception traces missing the Open Telemetry trace details. Probable similar issue - GA OpenTelemetry tracing plugin · Issue #30557 · Azure/azure-sdk-for-java (github.com).

Exception or Stack Trace Add the exception log and stack trace if available

To Reproduce

<!-- [https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-api](https://urldefense.com/v3/__https://mvnrepository.com/artifact/io.opentelemetry/opentelemetry-api__;!!IfjTnhH9!VGe8BgXkoxnLr5X9_50iQmw_GrcKgU9HHIfe2W8s-ZHmej-A7hx1cpXVsHg6gS3U7lRUCL7TwAa1tWrS2bhBa6mgLreQhA$) -->
<dependency>
    <groupId>io.opentelemetry</groupId>
    <artifactId>opentelemetry-api</artifactId>
    <version>1.15.0</version>
</dependency>

Code Snippet Here's how we're using SDK. We have a soft timeout of 600 ms on the read call (using block) i.e. if no response from SDK within 600ms, we force timeout -


CosmosItemResponse<POJO> response = CosmosAsyncContainer.readItem(itemId, new PartitionKey(<requestKey>), POJO.class)
                        .block(Duration.ofMillis(ccmService.getCosmosConfig().getRequestTimeOut()));

Expected behavior The exception from SDK should have trace ID.

Screenshots If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:

Additional context Add any other context about the problem here.

Information Checklist Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report

lmolkova commented 1 year ago

@Neha-Sharma0-WM, thank you for reporting this!

We're looking at it, but need the following information:

Thank you!

lmolkova commented 1 year ago

/cc @simplynaveen20

ghost commented 1 year ago

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @kushagraThapar, @TheovanKraay

Neha-Sharma0-WM commented 1 year ago

Hey @lmolkova,

Thanks for taking a look at this. Here are the details you requested -

Hope this helps, thanks

kushagraThapar commented 1 year ago

cc @FabianMeiswinkel / @sourabh1007

kushagraThapar commented 1 year ago

This has been done.