elastic / elastic/elastic-otel-java

document RUM integration for server-side HTML rendering

Open
#819 4 comments 2 reactions 0 assignees View on GitHub
agent-java
Dominant language
Java
Stars
35
Forks
32
Avg merge
1d 8h
Merged PRs (30d)
30

Description

With server-side HTML rendering, the integration of RUM requires to make the generated HTML page include the trace ID, span ID and sampling decision directly into the RUM setup snippet. This is required because the server-side HTTP request is the first transaction created and the RUM agent can't add any header yet, unlike XHR requests in "single-page-applications" (SPA).

With the classic agent this is documented in the public API: https://www.elastic.co/docs/reference/apm/agents/java/public-api#api-ensure-parent-id

This is however possible to do the same with any OpenTelemetry-based agent, but it's not yet documented.

Two things are needed for this:
- adding opentelemetry API to the application (gradle/maven variants).
- modifying the HTML template: as many variants as there are template engines, but we should probably document it for JSP which is the most "basic but standard" one.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.