sillsdev / sillsdev/languageforge-lexbox

Stabilize client-side OTEL export

Open
#312 2 comments 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #341 by @myieye — merged
📦 Lexbox OpenTelemetry
Dominant language
C#
Stars
9
Forks
8
Avg merge
2d 13h
Merged PRs (30d)
49

Description

Client-side OTEL uses the Beacon API for exporting traces. That's pretty much what the beacon API is for:

Unlike requests made using XMLHttpRequest or the Fetch API, the browser guarantees to initiate beacon requests before the page is unloaded and to run them to completion.

The main use case for the Beacon API is to send analytics such as client-side events or session data to the server.

but it has limitations that make trace collection flaky (https://github.com/sillsdev/languageforge-lexbox/issues/307, https://github.com/open-telemetry/opentelemetry-js/issues/3489).

Using the fetch API with the keepalive parameter would be more reliable (although it's not implemented yet in FireFox).

Despite the lack of support in FF it still might be worth changing to the fetch API, but the last time this was discussed in OTEL it didn't lead anywhere. There doesn't seem to be an easy way to do it currently. There is a way to use XMLHttpRequest, but that wouldn't be as big of a win.

I was directed to what looks like the most active relevant OTEL issue:

There is some other relevant work, but most of it is somewhat stale:

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked merged pull request 341 and the upstream OpenTelemetry issues 4116 and 3845 to understand what work has already been attempted. The issue is done only when a supported export approach is selected and client-side trace delivery is stabilized, including the browser support trade-offs described here.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
observability, web-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.