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

contrib/valyala/fasthttp: add orchestrion support

Open korECM opened this issue 8 months ago • 0 comments

What does this PR do?

https://github.com/DataDog/dd-trace-go/discussions/3412

This PR adds Orchestrion support for the valyala/fasthttp package, enabling automatic instrumentation without requiring manual code changes. The implementation automatically wraps the fasthttp.Server's Handler with our tracing middleware when a new Server instance is created.

Key changes include:

  • New orchestrion.yml configuration for fasthttp Server
  • Integration test suite to verify proper instrumentation behavior
  • Automatic wrapping of fasthttp.Server.Handler with tracing middleware

Motivation

Orchestrion is our solution for automatic instrumentation, and fasthttp is a popular high-performance HTTP server implementation for Go. Adding Orchestrion support for fasthttp will allow users to automatically instrument their fasthttp servers without manual configuration, improving the developer experience and reducing the chance of misconfiguration.

This addition aligns with our goal of providing comprehensive automatic instrumentation support across major Go frameworks and libraries.

Reviewer's Checklist

  • [x] 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.
  • [x] New code is free of linting errors. You can check this by running golangci-lint run locally.
  • [ ] 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 internal contributors, a matching PR should be created to the v2-dev branch and reviewed by @DataDog/apm-go.

korECM avatar Apr 12 '25 08:04 korECM