Skip to content

[WIP] Migrate Error Counting to Telemetry Plugin#7357

Closed
rregitsky wants to merge 56 commits intodevfrom
rreg/err_count_plugin_PULSR-1504
Closed

[WIP] Migrate Error Counting to Telemetry Plugin#7357
rregitsky wants to merge 56 commits intodevfrom
rreg/err_count_plugin_PULSR-1504

Conversation

@rregitsky
Copy link
Contributor

@rregitsky rregitsky commented Apr 28, 2025

This is the primary PR where all changes were made. This has been split into 3 PRs to make it easier to digest:

  1. [Error Counting] Use Builder for all router::Response Creation #7699 -- Use builder for all router::Repsonse creation
  2. [Error Counting] Add ID to graphql::Error #7712 -- Add ID to Error and use builder for all Error creation
  3. [Error counting] Move error counting to telemetry plugin #7781 -- Move all error counting logic to the Telemetry plugin

Checklist

Complete the checklist (and note appropriate exceptions) before the PR is marked ready-for-review.

  • Changes are compatible1
  • Documentation2 completed
  • Performance impact assessed and acceptable
  • Tests added and passing3
    • Unit Tests
    • Integration Tests
    • Manual Tests

Exceptions

Note any exceptions here

Notes

Footnotes

  1. It may be appropriate to bring upcoming changes to the attention of other (impacted) groups. Please endeavour to do this before seeking PR approval. The mechanism for doing this will vary considerably, so use your judgement as to how and when to do this.

  2. Configuration is an important part of many changes. Where applicable please try to document configuration examples.

  3. Tick whichever testing boxes are applicable. If you are adding Manual Tests, please document the manual testing (extensively) in the Exceptions.

@github-actions
Copy link
Contributor

@rregitsky, please consider creating a changeset entry in /.changesets/. These instructions describe the process and tooling.

@svc-apollo-docs
Copy link
Collaborator

svc-apollo-docs commented Apr 28, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 1039eab7bd16af8170a2dc30

locations,
path,
extensions,
apollo_id: Uuid::new_v4()
Copy link
Contributor

Choose a reason for hiding this comment

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

We might be able to refactor this particular error condition with the new plugin architecture such that we don't need to serde here in from_value_completion_value, worth a 2nd look.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'd like to hear more about the history of these errors. Why do we store them in extensions instead of errors? If we keep it in extensions, I don't see a good way to avoid serde

.message(self.to_string())
.locations(Vec::default())
.and_path(path)
// Extension code is required, but is only used if extensions doesn't have it. We always
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't dig into it but why is it required? Is it b/c of the constructor param not being optional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah exactly. I've decided to change it to optional because I don't really see a good reason why it needs to required. I get the idea that we prefer errors use them, but until we force it everywhere I don't think we can require it.

@apollo-librarian
Copy link

apollo-librarian bot commented Jun 9, 2025

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: dcdd3a4f3316307d3437b175

@apollo-librarian
Copy link

🛠️ Docs preview building...

The preview is currently being built.

Build ID: 8537aed013da71baafdcde7a

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.

3 participants