Skip to content

[APPS][WIP] Initialize Datadog Apps backend runtime - #459

Draft
sdkennedy2 wants to merge 1 commit into
masterfrom
sdkennedy2/add-apps-backend-runtime
Draft

[APPS][WIP] Initialize Datadog Apps backend runtime#459
sdkennedy2 wants to merge 1 commit into
masterfrom
sdkennedy2/add-apps-backend-runtime

Conversation

@sdkennedy2

@sdkennedy2 sdkennedy2 commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

What and why?

Initialize the runtime behind @datadog/apps-backend without exposing the jsFunctionWithActions $ context to customer backend functions.

This is the runtime half of DataDog/web-ui#331310, which introduces the published package and its customer-facing getCurrentUser() API.

How?

The Apps plugin conditionally resolves the package's exported runtime/js-function-with-actions adapter subpath. When installed, the generated virtual entry imports the runtime setter and adapter, then installs the runtime from $ at the beginning of main before customer code executes.

Projects without @datadog/apps-backend retain byte-for-byte equivalent runtime behavior aside from the package-resolution check. Focused tests cover conditional imports, initialization ordering, setup from the invocation context, and unchanged dev/production entry generation.

Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sdkennedy2 sdkennedy2 changed the title Add debug_id snippet injection in error tracking plugin [APPS][WIP] Initialize Datadog Apps backend runtime Jul 21, 2026
@sdkennedy2

Copy link
Copy Markdown
Collaborator Author

@codex review
@cursor review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 578e43d3e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant