Skip to content

Add an option to error if an internal integration is the root span #1048

Closed

Description

We recently had an issue with one of our Rails applications after upgrading to v0.35.2 from v0.34.2. After the upgrade we stopped seeing any APM data for the application. There is some oddness in the initialization of that application, so we thought we'd fixed the ddtrace configuration and redeployed the application.

Although we thought we were getting all the trace data for the application, we later found out that one of the integrations (graphql) was no longer creating spans that were nesting with our other spans from the service. They were reported completely separately.

What would be a good way to detect these kinds of configuration issues? One thought that I had was to add a setting named-like allow_root_span to integrations to specify whether they should always be nested under another span. This might default to true, but for "internal" integrations like activerecord, postgres, graphql, etc within a Rails application I would configure them with allow_root_span=false. And if allow_root_span=false and an attempt is made to start a span as the root span, then raise an error.

The benefit here would be quickly catching that the distributed tracing is broken. As it was we generated a couple of days of data where we were unable to trace all the way through the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugInvolves a bugcommunityWas opened by a community memberintegrationsInvolves tracing integrations

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions