Skip to content

Commit 294afe9

Browse files
committed
Faro: enable configuration of version and environment app settings
1 parent 2b43e49 commit 294afe9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/web/src/hooks.client.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ function setupFaro() {
99
const url = config.faro_url;
1010
const faroAppName = config.faro_app_name || 'QuickPizza';
1111
const faroAppNamespace = config.faro_app_namespace || 'quickpizza';
12+
const faroAppVersion = config.faro_app_version || '1.0.0';
13+
const faroAppEnvironment = config.faro_app_environment || 'production';
1214

1315
if (!url) {
1416
console.warn('Grafana Faro is not configured.');
@@ -20,8 +22,8 @@ function setupFaro() {
2022
app: {
2123
name: faroAppName,
2224
namespace: faroAppNamespace,
23-
version: '1.0.0',
24-
environment: 'production'
25+
version: faroAppVersion,
26+
environment: faroAppEnvironment
2527
},
2628
instrumentations: [
2729
// Mandatory, overwriting the instrumentations array would cause the default instrumentations to be omitted

0 commit comments

Comments
 (0)