-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: egress client - ucanto integration #123
Conversation
4a43520
to
95f0331
Compare
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:
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
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:fix
ing too.
Signed-off-by: Felipe Forbeck <[email protected]>
010162b
to
a15f8a6
Compare
Egress Client - UCanto Integration
Context
This PR introduces
EgressClient
to the application context, enabling capability invocations such asSpace.egressRecord
for logging egress directly to the UCanto Server (Upload API). With this integration, the previous Accounting Service is now replaced by a method inEgressClient
for egress logging.Key Changes
Middleware Integration: Added
withEgressClient
middleware to simplify capability invocations across the application.EgressClient Creation: Introduced a
create
function to instantiateUCantoClient
, establishing a secure connection to the UCanto Server based on environment configurations.Egress Recording: Refactored
EgressClient.record
function to use theSpace.egressRecord
capability, allowing for efficient egress byte tracking in our infrastructure.Connection Management: Added a
connect
function 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
delegationProofs
to the application context, so we can use that information to invoke theegressRecord
capabilities. Also added theGatewayIdentity
to 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.fetch
function call. See Fix opentelemetry issue caused in the execution of the invocation project-tracking#176 for more details.