Skip to content

Commit

Permalink
feat: enable observability on search worker (#301)
Browse files Browse the repository at this point in the history
* enable observability logs

Signed-off-by: Diogenes Fernandes <[email protected]>

* 10% of requests are logged

Signed-off-by: Diogenes Fernandes <[email protected]>

---------

Signed-off-by: Diogenes Fernandes <[email protected]>

cloudflare account id

Signed-off-by: Diógenes Fernandes <[email protected]>
  • Loading branch information
diofeher committed Feb 27, 2025
1 parent ecd166f commit 5b5b91d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/deploy-search-worker.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Deploy Search Worker
on:
push
# paths:
# - 'search/worker/**'
push:
branches:
- main
paths:
- 'search/worker/**'

jobs:
deploy:
Expand All @@ -23,7 +25,7 @@ jobs:
run: npm ci
- name: Deploy Wrangler
env:
CLOUDFLARE_ACCOUNT_ID: 919942d1077740aa3cff8c6cf511147a
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
run: |
npm run deploy
4 changes: 4 additions & 0 deletions search/worker/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,9 @@ preview_bucket_name = "registry-ui-dev"
enabled = true
head_sampling_rate = 0.1

[observability]
enabled = true
head_sampling_rate = 0.1 # 10% of requests are logged

[dev]
ip = "0.0.0.0"

0 comments on commit 5b5b91d

Please sign in to comment.