THere was a YC backed company here that was supposedly "Open Source DataDog" [0] . But looks like they got acquired by Gitlab and seems like technically they are still running that project [1]. I haven't used them personally but worth a look.
In general APM/observability tools are expensive. The good news is that there are a lot of choices including open source tooling like opentelemetry, sentry, vector.
You can reduce the cost somewhat by sampling traces, and by only shipping logs of Info or above (ie remove debug logs)