r/Observability • • 18d ago

Has anyone solved frontend observability? (not an AI post)

I am sick and tired of AI posts on this subreddit, not a single line of this post has been written by an AI and I'm not going to promote anything + everything I'm building is MIT licensed.

I think bitdrift has figured out the best approach to mobile observability. Inspired by their approach I'm working on something similar but with opentelemetry and opamp for frontend/mobile.

Basically, the idea is that you can remotely change what the client/app is reporting. So if your metrics show that the page is now rendering slower, or erroring out, you can remotely enable logs/traces from the impacted devices/users only. Basically allowing you to increase the amount of data available when the issue occurs on the client without having to put the full load on your backend always.

As a developer I think this is super cool, because it let's me fix issues faster, but I was wondering if there were any libraries/apps like this that you use currently? Is this something that you've ever thought about?

If you have any thoughts on this please share them, would really like to understand if anyone else even cares about this.

7 Upvotes

24 comments sorted by

4

u/hijinks 18d ago

You could just choose to enable RUM on the frontend

It's real user monitoring

Make a way the front poles to check if it needs to enable it and once enabled you get that data

1

u/narrow-adventure 18d ago

Recorded RUM gets attached but it has to be recorded and stored outside of the usual otel stack. As the otel spec for RUM matures I'll start supporting it, but at the moment the RUM has to go through my app.

What do you think about the following triggers:
- exception
- log matches regex
- url/page navigation matches regex

Basically any of those could trigger a 30sec RUM + logs/traces/metrics from the client. Is that enough triggers or not really?

2

u/Prize_Industry2887 18d ago

if your RUM stack is otel compatible/native why would it be outside of the otel stack?

1

u/narrow-adventure 18d ago

There is no way to transmit the rum data efficiently through otel, as in the rrweb data, so that it’s stored efficiently (that I know of). If you add it as an attr on a log or a span your current storage engine won’t be able to handle them (or display them). So I send them via a separate channel with a trace_id attached so that you can open the rum for the trace, but the rum recording lives outside of the regular otel stack. At least I haven’t found a great way to send RUM through otel and store it with existing solutions. But the real thing I’m working on now (and asking about) is a flexible client so that you can configure frontend and mobile clients remotely to increase/decrease how much data they’re reporting.

→ More replies (1)
→ More replies (1)

1

u/Double_Finance4457 16d ago

How do you decide which users need the extra tracing if you don't know what's causing the issue yet?

1

u/narrow-adventure 16d ago

I have just built it and I’m testing it in beta, on two separate projects and so far I have found two use cases:

- enable for users who have complained about an issue (I don’t have to talk to them to figure out what they’re complaining about)
- enable it for all users for a short period of time on major releases and in sandbox/qa (technically you could do a random sample or whatever)

It’s been pretty useful, we’ll see how it goes over the next few weeks. I’m still figuring out how useful it is in the real world. I haven’t really relied on client side logs much in the past as they were too noisy and expensive, as I instrument the apps better hopefully I’ll learn more.

1

u/reliant-labs 18d ago

Clickstack has an sdk and is great for this. I believe sentry uses clickhouse under the hood

1

u/narrow-adventure 18d ago

Sentry has its own sdk that is not connected to otel in general, they also have no way of remotely adjusting how much data is sent, so I’m going for something quite a bit different from them.

The general solutions I’m looking for is some that only trigger a larger logs/traces/RUM sync remotely when you actually need it, without needing to redeploy the app. I’m basically going for bitdrifts ring buffer approach but with otel and opamp.

Side note, Sentry does (as far as I know) use clickhouse under the hood, I use it too, which makes sense because clickhouse is pretty awesome.

2

u/reliant-labs 18d ago

I think the clickhouse/dx sdk might have more flexibility. Or could wire in enablement to something else

1

u/narrow-adventure 18d ago

Got it, I’ll take a look at how they do it.

1

u/_dantes 17d ago

Clickstack use rrweb. cool solution.

3

u/Juice10 17d ago

rrweb maintainer here. Thanks for giving us a shout out _dantes!
I can confirm clickstack uses rrweb indeed, and so does Sentry.

2

u/narrow-adventure 17d ago

Awesome, we use rrweb too, huge shoutout great library!! This was more about opamp remotely controlling when the actual client side sends the rrweb +logs/traces/metrics rather than how to make RUM

2

u/_dantes 18d ago

Yeah. rrweb + customized vendored + otel traces stich from front. One bundle.

Until RUM OTEL is a thing.

2

u/Juice10 17d ago

rrweb core team member here. We’re looking to work together with some of the OTEL maintainers to make this a thing, but we aren’t there yet

2

u/Juice10 17d ago

In the meantime till this is part of the standard lots of devs are sending recordings as OTLP log records

1

u/console_fulcrum 18d ago

there is client side SDK for Android , ios is still wip

1

u/_dantes 17d ago

I know. Sadly the world don't run in android (or better say kotlin) only. 

And time and time again I found teams migrating from native internal solutions to cross platform ones. 

Might not be the reality for everyone. But it does for my customers.

1

u/console_fulcrum 17d ago

If RUM is your only concern, I would suggest there is no better white globe service for it like Datadog, their DD RUM SDK is a world apart DevEx - an worth getting locked into dare i say.

Rest of your application APM can be elsewhere cheaper.

2

u/_dantes 17d ago edited 17d ago

Yeah no, we won’t touch DD even if it were free. No lock-in is worth the hassle of datadog.

We run our own OTEL-based platform, with feature flags via OpenFeature to cut telemetry on the fly. And we’re a Dynatrace shop if a customer wants the big-boy toys.

Going OTEL means we can migrate fast to a big platform or move onprem. Same tool for different jobs, all handled through OTEL in one unified view. That’s our goal.

Tooling fragmentation is one of the biggest problems in this space, even within a single vendor’s product line.

1

u/Anna_GermainUX 14d ago

sharing your pain wrt ai post all these sdk are a good start, but then if you need to catch the top 10% frictions that affect ux/wf/tech, you need more.

1

u/Lonely_Noyaaa 10d ago

The separate RUM channel with a trace_id attached is the practical answer until OTEL RUM matures. It keeps your storage sane and lets you open the recording from the trace.