Skip to content

Commit

Permalink
fix(2777): use option_env for trackers (#2778)
Browse files Browse the repository at this point in the history
  • Loading branch information
neo773 authored Sep 1, 2024
1 parent 30a323f commit d473af2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ jobs:
pull-requests: write
env:
GITHUB_TOKEN: ${{secrets.GITHUBTOKEN}}
GA_API_SECRET: ${{secrets.GA_API_SECRET}}
GA_MEASUREMENT_ID: ${{secrets.GA_MEASUREMENT_ID}}
APP_VERSION: ${{ needs.draft_release.outputs.create_release_name }}

steps:
Expand Down
12 changes: 10 additions & 2 deletions tailcall-tracker/src/tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@ use super::Result;
use crate::check_tracking::check_tracking;
use crate::event::Event;

const API_SECRET: &str = "GVaEzXFeRkCI9YBIylbEjQ";
const MEASUREMENT_ID: &str = "G-JEP3QDWT0G";
const API_SECRET: &str = match option_env!("GA_API_SECRET") {
Some(val) => val,
None => "dev",
};

const MEASUREMENT_ID: &str = match option_env!("GA_MEASUREMENT_ID") {
Some(val) => val,
None => "dev",
};

const BASE_URL: &str = "https://www.google-analytics.com";

///
Expand Down

1 comment on commit d473af2

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running 30s test @ http://localhost:8000/graphql

4 threads and 100 connections

Thread Stats Avg Stdev Max +/- Stdev
Latency 7.05ms 3.10ms 73.89ms 72.02%
Req/Sec 3.59k 194.83 4.21k 89.92%

428415 requests in 30.01s, 2.15GB read

Requests/sec: 14274.76

Transfer/sec: 73.27MB

Please sign in to comment.