Skip to content
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(runtime): Add new Tracer API #706

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

EmrysMyrddin
Copy link
Collaborator

No description provided.

@EmrysMyrddin EmrysMyrddin marked this pull request as draft February 21, 2025 17:02
Copy link

coderabbitai bot commented Feb 21, 2025

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Introduced enhanced tracing capabilities across GraphQL operations for improved monitoring and debugging.
  • Chores

    • Updated development dependencies to support the new tracing functionality.
    • Refined repository configurations to optimize file management.

Walkthrough

The changes add ignore rules for Helix configuration files and introduce a new graphql-yoga development dependency. Additionally, tracing capabilities are integrated into both the fusion runtime and gateway runtime packages. This is achieved by adding a new Tracer type and updating interfaces and function signatures to accept an optional tracer parameter. The modifications include wrapping subgraph execution with tracing calls and enforcing a single tracing plugin in the gateway runtime setup.

Changes

Files Changes
.gitignore Added ignore patterns: .helix/config.toml (added twice) and .helix/languages.toml.
package.json Added dev dependencies: "graphql-yoga": "5.13.0-alpha-20250221161011-2a41f6a3b66fd9850d356e6c07cf9392344bc1ed", "@envelop/core": "5.1.0-alpha-20250221160025-4035aee544c5d6343c568fa53cc56398e047b852", and "@envelop/types": "5.1.0-alpha-20250221160025-4035aee544c5d6343c568fa53cc56398e047b852".
packages/fusion-runtime/src/unifiedGraphManager.ts
packages/fusion-runtime/src/utils.ts
Introduced a new Tracer type; updated interfaces and function signatures to include an optional tracer for subgraph execution tracing.
packages/runtime/src/createGatewayRuntime.ts
packages/runtime/src/getProxyExecutor.ts
packages/runtime/src/types.ts
Added tracing functionality in gateway runtime by introducing a tracer variable in runtime creation, passing tracer parameters to executors, enforcing a single tracing plugin, and defining a new tracer type alias in the plugin types.

Sequence Diagram(s)

sequenceDiagram
    participant UGM as UnifiedGraphManager
    participant T as Tracer
    participant Exec as Subgraph Executor

    UGM->>UGM: Initialize with optional tracer
    UGM->>T: Call subgraphExecute with payload & callback
    T->>Exec: Execute wrapped subgraph query
    Exec-->>T: Return execution result
    T-->>UGM: Return tracing information
Loading
sequenceDiagram
    participant GW as Gateway Runtime
    participant Plug as Gateway Plugin
    participant GPE as getProxyExecutor

    GW->>GW: Initialize tracer variable
    GW->>Plug: Check for tracer property in plugins
    Plug-->>GW: Provide tracer (if exists)
    GW->>GW: Enforce single tracing plugin rule
    GW->>GPE: Pass tracer to proxy executor
    GPE-->>GW: Proceed with execution
Loading

Suggested reviewers

  • dotansimha

Poem

I'm a rabbit in a field of code so bright,
Hopping through changes in the day and night.
With tracers tracking every little bound,
And configs hidden deep, safe and sound.
Leaping forward with joy as new features ignite!


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@theguild-bot
Copy link
Collaborator

🚀 Snapshot Release (alpha)

The latest changes of this PR are available as alpha on npm (based on the declared changesets):

Package Version Info
@graphql-tools/executor-common 0.0.3-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-tools/executor-graphql-ws 2.0.3-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-tools/executor-http 1.2.8-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-tools/federation 3.1.4-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-mesh/fusion-runtime 0.11.2-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-hive/gateway 1.10.4-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-hive/logger-json 0.0.2-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-hive/logger-winston 1.0.1-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-mesh/hmac-upstream-signature 1.2.21-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-mesh/plugin-opentelemetry 1.3.44-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-mesh/plugin-prometheus 1.3.32-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-hive/gateway-runtime 1.4.17-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-common 0.7.30-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-http 0.6.34-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-http-callback 0.5.21-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎
@graphql-mesh/transport-ws 1.0.4-alpha-ce53311a0a4eb8c65196a0cc3f55e77ed591145d npm ↗︎ unpkg ↗︎

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 7

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 751320b and ce53311.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (7)
  • .gitignore (1 hunks)
  • package.json (1 hunks)
  • packages/fusion-runtime/src/unifiedGraphManager.ts (4 hunks)
  • packages/fusion-runtime/src/utils.ts (5 hunks)
  • packages/runtime/src/createGatewayRuntime.ts (5 hunks)
  • packages/runtime/src/getProxyExecutor.ts (3 hunks)
  • packages/runtime/src/types.ts (3 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
`packages/**`: In this directory we keep all packages releva...

packages/**: In this directory we keep all packages relevant to the gateway.

In most cases, when changes are made to the source code / dependencies in these directories, we also require to have a corresponding changeset file, created using yarn changeset with a full description on the changes with an example.
Also, when new features are added the packages, the changeset file should mention minor semver change. When a bug is fixed, patch needs to be used. The major bump is used for a PR that has breaking changes.

  • packages/runtime/src/getProxyExecutor.ts
  • packages/fusion-runtime/src/unifiedGraphManager.ts
  • packages/fusion-runtime/src/utils.ts
  • packages/runtime/src/types.ts
  • packages/runtime/src/createGatewayRuntime.ts
`**`: For all PRs, we would like to verify that a Linear iss...

**: For all PRs, we would like to verify that a Linear issue is linked. Check if there's a mention for "GW-*" in the PR description, and the us know when it's missing.

In most cases, when a PR adds a new functionality, we would like to make sure it has documentation in the corresponding console project.
Use the global knowledge feature to search for PRs in graphql-hive/console repository that adds documentation. Suggest to create a follow up issue to add the missing documentation.

  • packages/runtime/src/getProxyExecutor.ts
  • package.json
  • packages/fusion-runtime/src/unifiedGraphManager.ts
  • packages/fusion-runtime/src/utils.ts
  • packages/runtime/src/types.ts
  • packages/runtime/src/createGatewayRuntime.ts
🪛 Biome (1.9.4)
packages/fusion-runtime/src/utils.ts

[error] 261-261: Forbidden non-null assertion.

(lint/style/noNonNullAssertion)

⏰ Context from checks skipped due to timeout of 90000ms (21)
  • GitHub Check: E2E / Bun Docker on Ubuntu
  • GitHub Check: E2E / Bun on Ubuntu
  • GitHub Check: E2E / Node Binary on Windows
  • GitHub Check: E2E / Node Binary on Ubuntu
  • GitHub Check: E2E / Node Docker on Ubuntu
  • GitHub Check: E2E / Node 23 on Ubuntu
  • GitHub Check: E2E / Node 22 on Ubuntu
  • GitHub Check: Leaks / Node v23
  • GitHub Check: E2E / Node 20 on Ubuntu
  • GitHub Check: Leaks / Node v22
  • GitHub Check: Leaks / Node v20
  • GitHub Check: E2E / Node 18 on Ubuntu
  • GitHub Check: Leaks / Node v18
  • GitHub Check: Benchmark / bun / 1000 items
  • GitHub Check: Benchmark / bun / 100 items
  • GitHub Check: Snapshot / snapshot
  • GitHub Check: Benchmark / bun / 10 items
  • GitHub Check: Benchmark / node / 1000 items
  • GitHub Check: Bundle
  • GitHub Check: Benchmark / node / 100 items
  • GitHub Check: Benchmark / node / 10 items
🔇 Additional comments (7)
packages/runtime/src/createGatewayRuntime.ts (6)

169-169: LGTM: Tracer variable declaration.

The declaration of the tracer variable at the module level ensures it's accessible throughout the gateway runtime setup.


230-230: LGTM: Consistent tracer propagation.

The tracer is consistently propagated to all relevant functions (getProxyExecutor, getOnSubgraphExecute, and UnifiedGraphManager), ensuring tracing capabilities are available throughout the execution flow.

Also applies to: 451-451, 679-679


800-805: LGTM: Single tracer plugin enforcement.

The implementation correctly enforces that only one tracing plugin can be active at a time, preventing potential conflicts or inconsistencies in tracing behavior.


169-169: LGTM!

The tracer variable is correctly declared with the appropriate type from GatewayPlugin.


230-230: LGTM!

The tracer is consistently integrated at all relevant execution points (proxy executor, subgraph execution, and unified graph manager).

Also applies to: 451-451, 679-679


800-805: LGTM!

The implementation correctly enforces the single tracer plugin constraint with clear error messaging.

package.json (1)

74-74:

❓ Verification inconclusive

Verify the alpha version of graphql-yoga.

The specified version of graphql-yoga is an alpha version with a future date (2025). This could lead to stability issues and should be reviewed.

Please verify:

  1. Why an alpha version is needed instead of a stable release
  2. The correctness of the version string (it contains a future date)

🌐 Web query:

What is the latest stable version of graphql-yoga?

💡 Result:

The latest stable version of GraphQL Yoga is v5.12.0, released two days before February 21, 2025[7]. This information comes directly from its npm registry entry, which lists it as the most recent version available for installation[7].

Key details:

  • Published 2 days ago relative to the current date (2025-02-21)[7]
  • Available via npm using npm i graphql-yoga[7]
  • Part of an active maintenance cycle with frequent updates - there were 279 other projects using this version at time of publication[7]

Earlier versions like v5.10.10 appear in dependency logs[1][2][3][4][5], but these represent previous patch releases rather than the current stable release[7].

Citations:


Action Required: Validate the Use of the Alpha Release for graphql-yoga

The dependency in package.json now specifies an alpha release of graphql-yoga:

"graphql-yoga": "5.13.0-alpha-20250221161011-2a41f6a3b66fd9850d356e6c07cf9392344bc1ed",

Note that this alpha version includes a future date in its version string, while the latest stable release available on npm is v5.12.0 (released just before February 21, 2025). Please verify:

  • Intentional Use: Confirm if using this alpha version is deliberate—are there experimental features or fixes in v5.13.0-alpha that are needed over the stable v5.12.0?
  • Version String Accuracy: Double-check that the version string with a future date is correct and not an accidental error.

@@ -1,5 +1,6 @@
import type {
OnSubgraphExecuteHook,
Tracer,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Add JSDoc documentation for the tracer parameter.

The newly added tracer parameter would benefit from JSDoc documentation explaining its purpose and usage.

Add documentation like this:

+ /**
+  * @param tracer - Optional tracer for monitoring subgraph execution
+  */

Also applies to: 17-17, 24-24, 49-49

Comment on lines +107 to +112
export type Tracer = {
subgraphExecute(
payload: { executionRequest: ExecutionRequest },
wrapped: () => MaybePromise<void>,
): MaybePromise<void>;
};
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Enhance the Tracer type definition.

The Tracer type could be more flexible and better documented.

Consider these improvements:

+/**
+ * Tracer interface for monitoring subgraph execution
+ */
 export type Tracer = {
+  /**
+   * Traces a subgraph execution
+   * @param payload - Contains the execution request details
+   * @param wrapped - The function to execute and trace
+   * @returns A promise that resolves when tracing is complete
+   */
   subgraphExecute(
     payload: { executionRequest: ExecutionRequest },
     wrapped: () => MaybePromise<void>,
   ): MaybePromise<void>;
+  /**
+   * Optional method to clean up tracing resources
+   */
+  dispose?(): MaybePromise<void>;
 };
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export type Tracer = {
subgraphExecute(
payload: { executionRequest: ExecutionRequest },
wrapped: () => MaybePromise<void>,
): MaybePromise<void>;
};
/**
* Tracer interface for monitoring subgraph execution
*/
export type Tracer = {
/**
* Traces a subgraph execution
* @param payload - Contains the execution request details
* @param wrapped - The function to execute and trace
* @returns A promise that resolves when tracing is complete
*/
subgraphExecute(
payload: { executionRequest: ExecutionRequest },
wrapped: () => MaybePromise<void>,
): MaybePromise<void>;
/**
* Optional method to clean up tracing resources
*/
dispose?(): MaybePromise<void>;
};

Comment on lines +100 to +101
export type Tracer<TContext extends Record<string, any>> =
YogaTracer<TContext> & GatewayRuntimeTracer;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Document the Tracer type alias.

The Tracer type alias would benefit from documentation explaining its purpose and composition.

Add documentation like this:

+/**
+ * Combined tracer type that implements both Yoga and Gateway runtime tracing
+ * capabilities.
+ */
 export type Tracer<TContext extends Record<string, any>> =
   YogaTracer<TContext> & GatewayRuntimeTracer;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
export type Tracer<TContext extends Record<string, any>> =
YogaTracer<TContext> & GatewayRuntimeTracer;
/**
* Combined tracer type that implements both Yoga and Gateway runtime tracing
* capabilities.
*/
export type Tracer<TContext extends Record<string, any>> =
YogaTracer<TContext> & GatewayRuntimeTracer;

@@ -170,6 +172,7 @@ export function getOnSubgraphExecute({
transports,
getDisposeReason,
batch = true,
tracer,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Add JSDoc documentation for the tracer parameter.

The tracer parameter in getOnSubgraphExecute would benefit from documentation.

Add documentation like this:

+/**
+ * @param tracer - Optional tracer for monitoring subgraph execution
+ */

Also applies to: 185-185

Comment on lines +253 to +263
if (tracer?.subgraphExecute) {
const originalExecutor = executor;
executor = (executionRequest) => {
let result: MaybePromise<MaybeAsyncIterable<ExecutionResult<any, any>>>;
const traced$ = tracer.subgraphExecute({executionRequest}, () => {
result = originalExecutor(executionRequest);
return isPromise(result) ? result.then(() => undefined): undefined;
})
return isPromise(traced$) ? traced$.then(() => result) : result!;
};
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Refactor tracer integration for better readability.

The tracer integration logic is complex and could be clearer. Also, there's a non-null assertion that should be handled more safely.

Consider extracting the tracer logic and improving null safety:

-    if (tracer?.subgraphExecute) {
-      const originalExecutor = executor;
-      executor = (executionRequest) => {
-        let result: MaybePromise<MaybeAsyncIterable<ExecutionResult<any, any>>>;
-        const traced$ = tracer.subgraphExecute({executionRequest}, () => {
-          result = originalExecutor(executionRequest);
-          return isPromise(result) ? result.then(() => undefined): undefined;
-        })
-        return isPromise(traced$) ? traced$.then(() => result) : result!;
-      };
-    }
+    executor = wrapExecutorWithTracer(executor, tracer);
+
+function wrapExecutorWithTracer(
+  executor: Executor,
+  tracer?: Tracer,
+): Executor {
+  if (!tracer?.subgraphExecute) {
+    return executor;
+  }
+
+  return (executionRequest) => {
+    let result: MaybePromise<MaybeAsyncIterable<ExecutionResult<any, any>>>;
+    
+    const traced$ = tracer.subgraphExecute(
+      { executionRequest },
+      async () => {
+        result = executor(executionRequest);
+        if (isPromise(result)) {
+          await result;
+        }
+      }
+    );
+
+    return isPromise(traced$)
+      ? traced$.then(() => result)
+      : result;
+  };
+}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (tracer?.subgraphExecute) {
const originalExecutor = executor;
executor = (executionRequest) => {
let result: MaybePromise<MaybeAsyncIterable<ExecutionResult<any, any>>>;
const traced$ = tracer.subgraphExecute({executionRequest}, () => {
result = originalExecutor(executionRequest);
return isPromise(result) ? result.then(() => undefined): undefined;
})
return isPromise(traced$) ? traced$.then(() => result) : result!;
};
}
executor = wrapExecutorWithTracer(executor, tracer);
function wrapExecutorWithTracer(
executor: Executor,
tracer?: Tracer,
): Executor {
if (!tracer?.subgraphExecute) {
return executor;
}
return (executionRequest) => {
let result: MaybePromise<MaybeAsyncIterable<ExecutionResult<any, any>>>;
const traced$ = tracer.subgraphExecute(
{ executionRequest },
async () => {
result = executor(executionRequest);
if (isPromise(result)) {
await result;
}
}
);
return isPromise(traced$)
? traced$.then(() => result)
: result;
};
}
🧰 Tools
🪛 Biome (1.9.4)

[error] 261-261: Forbidden non-null assertion.

(lint/style/noNonNullAssertion)

Comment on lines +15 to +17
.helix/config.toml
.helix/config.toml
.helix/languages.toml
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Remove duplicate entry for .helix/config.toml.

The file contains a duplicate entry for .helix/config.toml which should be removed to maintain a clean .gitignore file.

Apply this diff to remove the duplicate entry:

 .helix/config.toml
-.helix/config.toml
 .helix/languages.toml
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
.helix/config.toml
.helix/config.toml
.helix/languages.toml
.helix/config.toml
.helix/languages.toml

@@ -166,6 +166,7 @@ export function createGatewayRuntime<
let unifiedGraphPlugin: GatewayPlugin;

const readinessCheckEndpoint = config.readinessCheckEndpoint || '/readiness';
let tracer: GatewayPlugin['tracer'];
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

❓ Verification inconclusive

Add a changeset file for the new Tracer API.

Since this PR adds a new feature to a package in the packages directory, please create a changeset file using yarn changeset. The changeset should:

  • Use minor for semver (new feature)
  • Include a description of the Tracer API
  • Provide an example of usage

🏁 Script executed:

#!/bin/bash
# Check for changeset file
fd -e md -p '.changeset/'

Length of output: 25


Action Required: Add a changeset file for New Tracer API

It appears that no changeset file exists in the repository, yet this PR introduces a new API which qualifies as a new feature. Please create a changeset file using yarn changeset with the following details:

  • Semver update: minor
  • Description: A brief description of the new Tracer API functionality.
  • Usage Example: An example demonstrating how to integrate or use the new Tracer API.

This file is required for proper version management and release notes for packages in the repository (specifically in packages/runtime/src/createGatewayRuntime.ts at line 169).

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🔭 Outside diff range comments (1)
package.json (1)

1-84: 🧹 Nitpick (assertive)

Missing Linear Issue Link & Documentation Update.

The PR description does not reference a Linear issue (e.g., containing "GW-*"). Additionally, since this PR introduces a new Tracer API, it likely requires corresponding documentation updates in the console project. Please add the appropriate Linear issue reference and consider creating a follow-up issue to update the documentation.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ce53311 and 23c4a10.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • package.json (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
`**`: For all PRs, we would like to verify that a Linear iss...

**: For all PRs, we would like to verify that a Linear issue is linked. Check if there's a mention for "GW-*" in the PR description, and the us know when it's missing.

In most cases, when a PR adds a new functionality, we would like to make sure it has documentation in the corresponding console project.
Use the global knowledge feature to search for PRs in graphql-hive/console repository that adds documentation. Suggest to create a follow up issue to add the missing documentation.

  • package.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Analyze (javascript-typescript)

Comment on lines +74 to +76
"graphql-yoga": "5.13.0-alpha-20250221161011-2a41f6a3b66fd9850d356e6c07cf9392344bc1ed",
"@envelop/core": "5.1.0-alpha-20250221160025-4035aee544c5d6343c568fa53cc56398e047b852",
"@envelop/types": "5.1.0-alpha-20250221160025-4035aee544c5d6343c568fa53cc56398e047b852",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick (assertive)

Verify new devDependencies for Tracer API enhancements.

The newly added devDependencies "graphql-yoga", "@envelop/core", and "@envelop/types" are intended to support the new tracing functionality. Please verify that the alpha versions in use meet the project’s stability requirements and don’t introduce conflicts with other dependencies.

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.

2 participants