-
Notifications
You must be signed in to change notification settings - Fork 13
feat: egress client - ucanto integration #123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
4a43520 to
95f0331
Compare
Peeja
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🫵🥫➡️❗
Looks great! One suggestion:
travis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! agree with Petra but happy to see this ship with or without the change
5488285 to
5136925
Compare
Peeja
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Suggestions and thoughts below. Looks like this needs some type love and some npm run lint:fixing too.
Signed-off-by: Felipe Forbeck <[email protected]>
010162b to
a15f8a6
Compare
🤖 I have created a release *beep* *boop* --- ## [2.22.0](v2.21.0...v2.22.0) (2024-12-19) ### Features * egress client - ucanto integration ([#123](#123)) ([22bed68](22bed68)) * enable egress tracking in production env ([#135](#135)) ([ad43b62](ad43b62)) * **indexer:** probabilistic feature flag ([#136](#136)) ([dca2b35](dca2b35)) * ucan invocation handler ([#133](#133)) ([b199bfa](b199bfa)) * Use Indexing Service when feature flag is present ([#132](#132)) ([fa3f480](fa3f480)) ### Bug Fixes * **config:** staging kv bidding ([#134](#134)) ([7a523d5](7a523d5)) * **egress-client:** set nonce, expire and fix servedAt ([#130](#130)) ([b135643](b135643)) * enable open telemetry for all envs ([#131](#131)) ([c822465](c822465)) --- 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>
Egress Client - UCanto Integration
Context
This PR introduces
EgressClientto the application context, enabling capability invocations such asSpace.egressRecordfor logging egress directly to the UCanto Server (Upload API). With this integration, the previous Accounting Service is now replaced by a method inEgressClientfor egress logging.Key Changes
Middleware Integration: Added
withEgressClientmiddleware to simplify capability invocations across the application.EgressClient Creation: Introduced a
createfunction to instantiateUCantoClient, establishing a secure connection to the UCanto Server based on environment configurations.Egress Recording: Refactored
EgressClient.recordfunction to use theSpace.egressRecordcapability, allowing for efficient egress byte tracking in our infrastructure.Connection Management: Added a
connectfunction to handle connection setup with the UCanto Server.Environment Variables: Updated the environment variables, including service Web DIDs and service URLs.
Enhanced Context: Added the
delegationProofsto the application context, so we can use that information to invoke theegressRecordcapabilities. Also added theGatewayIdentityto the application context.Accounting Service: There is no Accounting Service anymore. Instead, we use the EgressClient to record the egress event.
Wrangler: Updated the configs for all environments and the wrangler lib to the latest version.
Telemetry: Added a feature flag for Open Telemetry - if enabled, the Egress Record call will fail to execute the
this.fetchfunction call. See Fix opentelemetry issue caused in the execution of the invocation project-tracking#176 for more details.