Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG-FRONTIER.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 8.19.0

- Render the primary Grail tag values on `window.dtinfo`, next to `appName`, so a per-frontend Dynatrace RUM capture rule can copy them onto user events as `event_properties.*`
- `window.dtinfo.sid` is `<blueprint>/<system>/<service>` from `FS_BLUEPRINT_NAME`, `FS_SYSTEM_NAME` and `FS_SERVICE_NAME`, derived as `@fs/startup` 4.4.0 derives it for the dyno's processes so RUM and back-end records match. It stops at the first missing or malformed segment and is not set when the blueprint is missing
- `window.dtinfo.environment` is `FS_ENVIRONMENT_NAME`, or else `FS_SYSTEM_NAME` mapped `int→dev`, `beta→test`, `prod→prod`. An unmapped system leaves it unset rather than mislabelled. `TARGET_ENV` is never read
- Each global is set only when its value is non-empty, in the same unconditional block as `appName` (not behind `NODE_ENV` or the RUM flag)
- Each frontend still needs its own capture rule per key before the values reach Grail. `fsetgrp_id` is not rendered yet: the project group is not on the Heroku deploy path

## 8.17.0

- Migrate to the Dynatrace New RUM Experience (RUM on Grail) and load the agent `async`
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions packages/react-scripts/layout/views/layout.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,25 @@
// unconditionally and as early as possible. Both RUM Classic and the New RUM Experience can
// read it via their own (separately configured) capture rules; gating it on the agent being
// loaded meant the async treatments never set it at all.
// Keys: appName, sid (`<blueprint>/<system>/<service>`) and environment (dev|test|prod), the
// primary Grail tag values, derived exactly as @fs/startup derives them for the dyno's
// processes so RUM events and back-end records match. Each frontend needs its own capture
// rule per key to copy it onto events. sid and environment come from the FS_* config vars
// only (never TARGET_ENV); a sid is positional, so it stops at the first missing or malformed
// segment; an unmapped system leaves environment unset rather than mislabelled.
if (!window.dtinfo) window.dtinfo = {}
window.dtinfo.appName = SERVER_DATA.appName
<%
const dtinfoSidSegments = []
for (const segment of [process.env.FS_BLUEPRINT_NAME, process.env.FS_SYSTEM_NAME, process.env.FS_SERVICE_NAME]) {
if (!segment || !/^[a-z](?:[-a-z0-9]*[a-z0-9])?$/.test(segment)) break
dtinfoSidSegments.push(segment)
}
const dtinfoSid = dtinfoSidSegments.join('/')
const dtinfoEnvironment = process.env.FS_ENVIRONMENT_NAME || ({ int: 'dev', beta: 'test', prod: 'prod' })[process.env.FS_SYSTEM_NAME] || ''
%>
<% if (dtinfoSid) { %>window.dtinfo.sid = "<%= dtinfoSid %>"<% } %>
<% if (dtinfoEnvironment) { %>window.dtinfo.environment = "<%= dtinfoEnvironment %>"<% } %>

// enableManualPageDetection is a RUM Classic API with no New RUM equivalent — New RUM models
// navigations / page summaries / view summaries instead. Defer it until dtrum exists rather
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fs/react-scripts",
"version": "8.17.0",
"version": "8.19.0",
"upstreamVersion": "5.0.1",
"description": "Configuration and scripts for Create React App.",
"repository": {
Expand Down
Loading