Transactions using OpenAPI C# is not showing up

Thanks for the reply @kaushas,

ok, so I think we have an explanation for this, which is that the agent did not have enough time to send the data.

This is a known issue and it's on our radar. First of all here is a GitHub issue that you can follow - we plan to come up with a good solution for this problem long term - but that's not something that helps you now.

What you can do now is to tweak some settings. The agent has the FlushInterval setting - the easiest is to set the environment variable ELASTIC_APM_FLUSH_INTERVAL and make sure it's visible to your process with the agent. You can set it to either 0 - with that the agent will send data immediately, or to some low value. I'd be careful with this in web application, but if this is a short living batch process that generates 1 transaction with a couple of spans then it's fine to set it to either 0 or to a low value. Keep in mind that this won't mean that the agent holds up the application - so if the app terminates before the agent is able to send the data, then the data won't be sent, so you'll still need to make sure the app does not terminate immediately. But with setting this to 0 you can make sure that the agent immediately starts sending the data. With that 1 sec sounds realistic.