electric icon indicating copy to clipboard operation
electric copied to clipboard

Better Tracing

Open balegas opened this issue 1 year ago • 4 comments

We have set up basic Tracing for Electric but we want to continue improving what we become more successful investigating issues.

  • We're following our intuition a bit and we will continue. Having real traces that we need to investigar help us focus on the things that need more observability
  • in some cases we're abusing the use of spans which migh lead to high volumes of traces (these are billed). We should try to replace some traces for attributes and reserve the finer details for a TRACE mode that we can activate to increase the level of details to investigate incidents

balegas avatar Nov 22 '24 15:11 balegas

note https://github.com/electric-sql/electric/issues/1738

balegas avatar Nov 24 '24 22:11 balegas

in some cases we're abusing the use of spans which migh lead to high volumes of traces (these are billed). We should try to replace some traces for ...

Screenshot 2024-11-25 at 09 13 24

We want to be able to turn-on this level of detail if we need to investigate any occurrences, but during normal execution we should zoom out on some of the details and put more details into the attributes. I'm not sure if there is any pattern to do that with OTEL, otherwise we could put them behind a flag.

For the top-level number of transactions we handle, the developer can setup sampling

balegas avatar Nov 25 '24 09:11 balegas

We should try to replace some traces for attributes and reserve the finer details for a TRACE mode that we can activate to increase the level of details to investigate incidents

Beware of making the code complicated in order to achieve this!

A great way to reduce the number of traces is Sampling: https://opentelemetry.io/docs/concepts/sampling/ You can reduce traffic 10/100 fold while not losing detail.

robacourt avatar Nov 25 '24 10:11 robacourt

@balegas more work needed here?

KyleAMathews avatar Dec 12 '24 02:12 KyleAMathews

@icehaunter let's add the Electric metrics to honeycomb.

balegas avatar Dec 16 '24 14:12 balegas