End to End Transaction in Azure with Temporal.io

Kessler, Oded 20 Reputation points
2023-11-21T10:53:04.7+00:00

Hello all,

we are using applicationinsights-agent-3.4.18.jar as an agent to collect telemetry for our application.

our app is written/depended with the following:

  1. Java (SDK 17)
  2. SpringBoot(3.1.4)
  3. Temporal (temporal.io 1.21.2)
  4. postgres
  5. SLF4J as a logger

the app calls Activities that are Temporal requests (Async requests) , before & after each activity we create a log (trace)

with springBoot AOP. we also create log entry with in the activity (method)

when I enter the end to end transaction search - isee my log records but I don't see the entire flow ..

see pic :

in this example we entering the method logging some info , creating DTO and saving it to the postgres db ... then calling an http http request(pic1)

but when i search to : "setAbr - workflow....." string i see that i have only the specific record without the whole flow.(pic2 /pic 3 )

I can that i have a trace record with no End-to-end transaction (I saw that on version 3.4.xxx of the agent there was a change )

  • is there a problem with the agent collecting/ sending telemetry ? does it collect Async operations ?
  • do we need to implement our own telemetry event records ?

pic1:User's image

pic2 :

User's image

User's image

I hope you can help me

Thank you ,

Oded Kessler

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
3,658 questions
{count} votes

Accepted answer
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2023-11-27T18:23:58.7333333+00:00

    Hi @Kessler, Oded apologies for the delayed response. I have received some information though.

    As far as temporal.io, that is not supported for auto instrumentation, as it is not listed on https://learn.microsoft.com/en-us/azure/azure-monitor/app/opentelemetry-add-modify?tabs=java#included-instrumentation-libraries.

    However, one suggestion is to follow the steps outlined in Configure Azure Monitor Application Insights for Spring Boot - Azure Monitor | Microsoft Learn for inline instrumentation. If you're still continuing to see issues, then we'll need to work with you offline.


    EDIT 29 Nov 2023

    You were able to resolve your issue by running your application with App Insights java agent 3.4.18 via JVM options javaagent:"applicationinsights-agent-3.4.18.jar. You edit your pom.xml to include the following dependencies and wrapped each activity with @WithSpan attribute.

    <dependency>    
        <groupId>io.opentelemetry</groupId> 
        <artifactId>opentelemetry-api</artifactId>  
        <version>1.32.0</version>
    </dependency>
    
    <dependency> 
        <groupId>io.opentelemetry.instrumentation</groupId> 
        <artifactId>opentelemetry-instrumentation-annotations</artifactId>
        <version>1.32.0</version>
    </dependency>
    

    Running the full flow shows the end-to-end transaction as expected. Your steps are very similar to the documentation, which uses an older version of the opentelemetry-instrumentation-annotations.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.