Open SophisticaSean opened 3 years ago
Could you please clarify your use-case a bit, and maybe specifically how this supports tracing in tests? I'm guessing it's related to warnings that you're getting about starting a trace over top of another trace, or finishing a trace when there is no active trace, but I'm curious to know a little more detail about the problem and the proposed solution.
I definitely like the idea of making this configurable so that you can either start/finish a span rather than a trace to represent Phoenix, but I do have a concern about making that decision automatically rather than based on configuration. For example, in the current proposed change, the finish_trace
plug will always try to finish the entire trace and not just the span, even though the start_trace
plug may have decided to just create a span instead of a trace.
Also, don't worry about the failing Coveralls check in CI for now - I will work on fixing that separately.
Rebased on master to get CI issues fixed.
@GregMefford Yes, so this was necessary in order to support a new feature of datadog, test tracing.
Without this, due to the configuration of spandex_phoenix, tests that involved a phoenix pipeline were untraceable and blew up with errors.
Hello, @SophisticaSean! This is your first Pull Request that will be reviewed by SourceLevel, an automatic Code Review service. It will leave comments on this diff with potential issues and style violations found in the code as you push new commits. You can also see all the issues found on this Pull Request on its review page. Please check our documentation for more information.