Skip to content

Commit 22e6770

Browse files
authored
usage metrics dashboard: ignore hits from content health monitor (#276)
* ignore hits from content health monitor * update changelog
1 parent d2e23a2 commit 22e6770

File tree

4 files changed

+21
-7
lines changed

4 files changed

+21
-7
lines changed

extensions/usage-metrics-dashboard/CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ All notable changes to the Usage Metrics Dashboard extension will be documented
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.0.8]
89

9-
## [Unreleased]
10+
### Added
11+
12+
- Usage Metrics Dashboard now ignores hits from the Content Health Monitor. (#276)
13+
14+
## [1.0.7]
1015

1116
### Added
1217

13-
- Added CHANGELOG.md to the repo
18+
- Added CHANGELOG.md to the repo.
1419
- Added tests for business logic. In support of that, moved source files to `R/` and added a `DESCRIPTION` file.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Package: usage-metrics-dashboard
2-
Version: 1.0.7
2+
Version: 1.0.8

extensions/usage-metrics-dashboard/R/get_usage.R

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,14 @@ get_usage <- function(client, from = NULL, to = NULL) {
3535
)
3636
)
3737
usage_parsed <- connectapi:::parse_connectapi_typed(usage_raw, usage_dtype)
38-
usage_parsed[c("user_guid", "content_guid", "timestamp")]
38+
39+
# Filter out hits from the Content Health Monitor
40+
usage_parsed$user_agent <- vapply(
41+
usage_parsed$data,
42+
function(x) if (!is.null(x$user_agent)) x$user_agent else NA_character_,
43+
FUN.VALUE = character(1)
44+
)
45+
usage_parsed <- filter(usage_parsed, !grepl("^ContentHealthMonitor/", user_agent))
46+
47+
usage_parsed[c("user_guid", "content_guid", "timestamp", "user_agent")]
3948
}

extensions/usage-metrics-dashboard/manifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,7 +2150,7 @@
21502150
"Maintainer": "Kevin Ushey <[email protected]>",
21512151
"Repository": "RSPM",
21522152
"Date/Publication": "2025-03-20 18:10:01 UTC",
2153-
"Built": "R 4.3.3; ; 2025-07-31 15:27:30 UTC; unix"
2153+
"Built": "R 4.3.0; ; 2025-03-21 06:10:06 UTC; unix"
21542154
}
21552155
},
21562156
"rlang": {
@@ -3039,7 +3039,7 @@
30393039
"checksum": "5555b67b7f82d2dbc90b3a36260ceeac"
30403040
},
30413041
"R/get_usage.R": {
3042-
"checksum": "5f1c4eb8903a8179761f5fe94c77bfa1"
3042+
"checksum": "1231f3eece53466dd1ff0867f1019bb0"
30433043
},
30443044
"R/integrations.R": {
30453045
"checksum": "2b495c74b5987a2c318bcd80a0c2be8f"
@@ -3071,6 +3071,6 @@
30713071
"requiredFeatures": [
30723072
"OAuth Integrations"
30733073
],
3074-
"version": "1.0.7"
3074+
"version": "1.0.8"
30753075
}
30763076
}

0 commit comments

Comments
 (0)