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

fix(graphql): make graphql locations optional [backport 3.2] #12872

Open
wants to merge 1 commit into
base: 3.2
Choose a base branch
from

Conversation

github-actions[bot]
Copy link
Contributor

Backport 4f8be8d from #12861 to 3.2.

Only set span event attribute locations when GraphQLError locations is not None, as GraphQLErrror locations are optional

Fixes #12843

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

Only set span event attribute `locations` when `GraphQLError` locations
is not None, as `GraphQLErrror` locations are optional

Fixes #12843

## Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing
strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the [library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance
implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

(cherry picked from commit 4f8be8d)
@github-actions github-actions bot requested review from a team as code owners March 24, 2025 21:25
@pr-commenter
Copy link

pr-commenter bot commented Mar 24, 2025

Benchmarks

Benchmark execution time: 2025-03-24 22:07:11

Comparing candidate commit 04d55f9 in PR branch backport-12861-to-3.2 with baseline commit 0b9db1a in branch 3.2.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 430 metrics, 2 unstable metrics.

@quinna-h quinna-h enabled auto-merge (squash) March 25, 2025 14:28
@quinna-h quinna-h closed this Mar 25, 2025
auto-merge was automatically disabled March 25, 2025 18:59

Pull request was closed

@quinna-h quinna-h reopened this Mar 25, 2025
Copy link
Contributor Author

CODEOWNERS have been resolved as:

releasenotes/notes/fix-graphql-locations-attribute-27a66fbb003eb510.yaml  @DataDog/apm-python
ddtrace/contrib/internal/graphql/patch.py                               @DataDog/apm-core-python @DataDog/apm-idm-python
tests/contrib/graphql/test_graphql.py                                   @DataDog/apm-core-python @DataDog/apm-idm-python

@quinna-h quinna-h enabled auto-merge (squash) March 25, 2025 19:25
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