Skip to content

fix: skip egress tracking if content found in multiple spaces#199

Merged
fforbeck merged 2 commits intomainfrom
fix/dont-track-egress-if-mult-spaces
Nov 25, 2025
Merged

fix: skip egress tracking if content found in multiple spaces#199
fforbeck merged 2 commits intomainfrom
fix/dont-track-egress-if-mult-spaces

Conversation

@fforbeck
Copy link
Member

@fforbeck fforbeck commented Nov 24, 2025

When the same content is found in 2+ different spaces, we now skip egress tracking to avoid ambiguous billing.

The content is still served normally using the first authorized space, but ctx.space is set to undefined to prevent the egress tracker from recording it.

This prevents billing conflicts when content is duplicated across spaces. This problem will be solved later when we enable the authTokens strategy.

if space is null or undefined, the Egress Tracking handler won't generate egress events.

Closes storacha/project-tracking#602

@fforbeck fforbeck self-assigned this Nov 24, 2025
@travis
Copy link
Contributor

travis commented Nov 24, 2025

looks like a test needs to be updated but otherwise g2g!

@fforbeck
Copy link
Member Author

looks like a test needs to be updated but otherwise g2g!

Yeah. Just fixed that. Thanks

@fforbeck fforbeck merged commit 9a8089f into main Nov 25, 2025
1 check passed
@fforbeck fforbeck deleted the fix/dont-track-egress-if-mult-spaces branch November 25, 2025 12:26
fforbeck pushed a commit that referenced this pull request Nov 25, 2025
🤖 I have created a release *beep* *boop*
---


##
[2.34.0](v2.33.0...v2.34.0)
(2025-11-25)


### Features

* add a stripped down server for debugging
([#196](#196))
([bd7adb2](bd7adb2))
* bump egress tracking traffic to 5%
([#200](#200))
([5b97f6f](5b97f6f))


### Bug Fixes

* disable FF_TELEMETRY_ENABLED in wrangler.toml
([#197](#197))
([b63d3c3](b63d3c3))
* skip egress tracking if content found in multiple spaces
([#199](#199))
([9a8089f](9a8089f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't charge egress fees for content that has been uploaded to multiple spaces

2 participants