dd-trace-go icon indicating copy to clipboard operation
dd-trace-go copied to clipboard

contrib/99designs/gqlgen: add WithCustomTag option

Open samsullivan opened this issue 11 months ago • 0 comments

What does this PR do?

The gqlgen middleware was missing the ability to customize tags on the created spans. Implement a WithCustomTag option that follows the pattern of other similar packages.

I also renamed variable names for the config struct as cfg, instead of t, to match every other contrib package.

Motivation

Fixes #2597; supports the ability to use additional tagging with gqlgen traces.

Reviewer's Checklist

  • [ ] Changed code has unit tests for its functionality at or near 100% coverage.
  • [ ] System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • [ ] There is a benchmark for any new code, or changes to existing code.
  • [ ] If this interacts with the agent in a new way, a system test has been added.
  • [ ] Add an appropriate team label so this PR gets put in the right place for the release notes.
  • [ ] Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

For Datadog employees:

  • [ ] If this PR touches code that handles credentials of any kind, such as Datadog API keys, I've requested a review from @DataDog/security-design-and-guidance.
  • [ ] This PR doesn't touch any of that.

Unsure? Have a question? Request a review!

samsullivan avatar Mar 06 '24 19:03 samsullivan