Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[v3] Change manual instrumentation approach to not use reverse duck-t…
…yping (#5214) * Fix null ref in `GetManagedTracerVersion()` * Add benchmark for manual instrumentation * Try alternative ducktyping approach * Fix OpenTracing helpers * Revert the changes to benchmark stat types Seeing as we're not reverse duck-typing any more, we don't need to do this * Update manual Ci Visibility to not rely on reverse duck-typing This is made rather irritating by the fact we _can't_ ducktype Test as an ITest. That, coupled with the APIs that connect module + suite + test together means we need to duplicate the interfaces in their entirety. It seems to work though 🎉 * Revert the snapshots to match the existing public API * Use instrumentation of DuckType.DuckCast<T> in Datadog.Trace.Manual.csproj Means we can avoid having to include the whole DuckTyping library inside Datadog.Trace.Manual The downside is that it's hard to test in unit tests. as everything requires auto instrumentation * Skip the duck typing tests that won't work and add some others * Simplify the implementation Instead of having wrapper ManualScope implementations etc, we can just use duck typing instead directly. This reduces one level of indirection and reduces the allocations * Redesign approach with CI Visibility - Use the standard duck typing approach instead of reverse duck typing - Remove the ManualTest etc - Move methods that we _can't_ duck type to be extension methods that we instrument * Update generated code * Apply suggestions from code review Co-authored-by: Kevin Gosse <kevin.gosse@datadoghq.com> * PR feedback - Fix previous PR feedback suggestions ;) - Add [Instrumented] to Tracer.ctor - Fix merge conflict in IntegrationIdExtensions - Add missing telemetry integration - Move TracerSettingsPopulateDictionaryIntegration into correct folder, and rename to PopulateDictionaryIntegration - Add a unit test for SetTag * Add unit tests for the mapping between tracersettings and public API settings * PR Feedback - add helper class for serialization of integration settings * PR feedback - include initial value in OverrideValue<T> helper * PR feedback - too many braces * Fix bug introduced * Use defaults for null test suite * Fix merge conflict --------- Co-authored-by: Kevin Gosse <kevin.gosse@datadoghq.com>
- Loading branch information