GoogleCloudPlatform / opentelemetry-operations-java

Apache License 2.0
71 stars 38 forks source link

Fix cloudfunctions test #270

Closed dashpole closed 10 months ago

dashpole commented 10 months ago

Fixes https://github.com/GoogleCloudPlatform/opentelemetry-operations-java/issues/268

It uses a synchronous export of spans to ensure spans are delivered before cloud functions reclaims the CPU.

psx95 commented 10 months ago

The reasoning behind this change makes sense to me, but I'm still not a 100% sure why the resource detector test passes. It has the same timeout and consistently passed using the same BatchSpanExporter.

Any thoughts on it ?

dashpole commented 10 months ago

My theory was that maybe it had something to do with test ordering? If the basic test always runs last, that could be why it is the one that has the CPU taken away from it.

psx95 commented 10 months ago

My theory was that maybe it had something to do with test ordering? If the basic test always runs last, that could be why it is the one that has the CPU taken away from it.

No, I think basicTest is always the first to run as per the logs. Do you think increasing the timeout along with this change would be better to improve flakiness ?

dashpole commented 10 months ago

we can see... It seems to consistently pass with this change

psx95 commented 10 months ago

we can see... It seems to consistently pass with this change

Ok, I think I'm ok to merge this. If the flakiness continues we can dig deeper.