Skip to content

Commit 3cf4c58

Browse files
fix(adoption-insights): mark the app-config app.analytics.adoptionInsights option as optional (#2005)
Signed-off-by: Christoph Jerolimov <[email protected]>
1 parent 562dcc6 commit 3cf4c58

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-analytics-module-adoption-insights': patch
3+
'@red-hat-developer-hub/backstage-plugin-adoption-insights-backend': patch
4+
---
5+
6+
Mark the app-config `app.analytics.adoptionInsights` option as optional. It was already read with getOptional<Number/Boolean> so there is no code change or configuration change needed, this just reflect the status quo better.

workspaces/adoption-insights/plugins/adoption-insights-backend/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ backend.add(
2323

2424
## Configuration
2525

26+
The following optional configuration parameters are available to fine tune adoption analytics events:
27+
2628
```yaml
2729
app:
2830
analytics:
2931
adoptionInsights:
30-
maxBufferSize: 25
31-
flushInterval: 6000
32-
debug: false # enable this to debug
32+
maxBufferSize: 20 # Optional: Maximum buffer size for event batching (default: 20)
33+
flushInterval: 5000 # Optional: Flush interval in milliseconds for event batching (default: 5000ms)
34+
debug: false # Optional: Enable debug mode to log every event in the browser console (default: false)
3335
licensedUsers: 100 # Administrators can set this value to see the user adoption metrics.
3436
```
3537

workspaces/adoption-insights/plugins/adoption-insights-backend/config.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
export interface Config {
1818
app?: {
19-
analytics: {
20-
adoptionInsights: {
19+
analytics?: {
20+
adoptionInsights?: {
2121
/**
2222
* Maximum buffer size for event batching.
2323
* default 20

workspaces/adoption-insights/plugins/analytics-module-adoption-insights/README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ export const apis: AnyApiFactory[] = [AdoptionInsightsAnalyticsApiFactory];
4747

4848
## Configuration
4949

50-
### Available Configuration Options
51-
52-
The following is the optional configuration required to fine tune adoption analytics events:
50+
The following optional configuration parameters are available to fine tune adoption analytics events:
5351

5452
```yaml
5553
# app-config.yaml

workspaces/adoption-insights/plugins/analytics-module-adoption-insights/config.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
export interface Config {
1818
app?: {
19-
analytics: {
20-
adoptionInsights: {
19+
analytics?: {
20+
adoptionInsights?: {
2121
/**
2222
* Maximum buffer size for event batching.
2323
* default 20

0 commit comments

Comments
 (0)