Skip to content

Commit 41c2a1d

Browse files
committed
feat: Track backup policy type usage anonymously
1 parent e59489e commit 41c2a1d

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub struct Args {
4747
pub concurrency: usize,
4848
}
4949

50-
async fn run(args: Args) -> Result<(), Error> {
50+
async fn run(args: Args, session: &Session) -> Result<(), Error> {
5151
let config = config::Config::try_from(&args)?;
5252

5353
let github_repo =
@@ -78,6 +78,7 @@ async fn run(args: Args) -> Result<(), Error> {
7878

7979
for policy in config.backups.iter() {
8080
let _policy_span = info_span!("backup.policy", policy = %policy).entered();
81+
let _page = session.record_new_page(format!("/backup/{}", policy));
8182

8283
match policy.kind.as_str() {
8384
k if k == GitHubArtifactKind::Repo.as_str() => {
@@ -163,7 +164,7 @@ async fn main() {
163164
.with_battery(OpenTelemetry::new(""))
164165
.with_battery(Medama::new("https://analytics.sierrasoftworks.com"));
165166

166-
let result = run(args).await;
167+
let result = run(args, &session).await;
167168

168169
if let Err(e) = result {
169170
session.record_error(&e);

0 commit comments

Comments
 (0)