dash0hq / otelbin

Web-based tool to facilitate OpenTelemetry collector configuration editing and verification
https://www.otelbin.io
Apache License 2.0
288 stars 13 forks source link

Support better configuration encoding strategies for the URL #271

Open bripkens opened 9 months ago

bripkens commented 9 months ago

Why

We currently have to lock certain features behind the URL shortener. This is because the configuration within the URL can become too long and can thus exhaust Vercel's URL length limitations.

Ideas

We currently encode the configuration using jsurl2 and put it into the URL hash (which does not get sent to the server). This is quite verbose. An alternative could be to compress the config and then to place base64 into the URL.

This has additional benefits:

Size Research

The following is a quick check showing the character count differences between

$ wc -c config.yaml config.yaml.jsurl2 config.yaml.gzip.base64
    9480 config.yaml
   11015 config.yaml.jsurl2
    2809 config.yaml.gzip.base64

Compression API Research

Potential issue: Currently the URL handling is fully synchronous. Some of the APIs linked in these articles would make the process asynchronous.

mmanciop commented 9 months ago

We should not break backwards compatibility though, neither for short links nor for full-path ones, so we probably need an alternative path scheme for the new strategy.