-
Notifications
You must be signed in to change notification settings - Fork 867
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove service name split by tags (#20)
- Loading branch information
Showing
5 changed files
with
18 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 14 additions & 24 deletions
38
dd-trace-ot/src/main/java/datadog/opentracing/decorators/DDDecoratorsFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,25 @@ | ||
package datadog.opentracing.decorators; | ||
|
||
import datadog.trace.api.Config; | ||
import java.util.ArrayList; | ||
import java.util.Arrays; | ||
import java.util.List; | ||
|
||
/** Create DDSpanDecorators */ | ||
public class DDDecoratorsFactory { | ||
public static List<AbstractDecorator> createBuiltinDecorators() { | ||
|
||
final List<AbstractDecorator> decorators = | ||
new ArrayList<>( | ||
Arrays.asList( | ||
new DBStatementAsResourceName(), | ||
new DBTypeDecorator(), | ||
new ErrorFlag(), | ||
new OperationDecorator(), | ||
new PeerServiceDecorator(), | ||
new ResourceNameDecorator(), | ||
new ServiceNameDecorator(), | ||
new ServiceNameDecorator("service", false), | ||
new ServletContextDecorator(), | ||
new SpanTypeDecorator(), | ||
new Status404Decorator(), | ||
new Status5XXDecorator(), | ||
new URLAsResourceName())); | ||
|
||
for (final String splitByTag : Config.get().getSplitByTags()) { | ||
decorators.add(new ServiceNameDecorator(splitByTag, true)); | ||
} | ||
|
||
return decorators; | ||
return Arrays.asList( | ||
new DBStatementAsResourceName(), | ||
new DBTypeDecorator(), | ||
new ErrorFlag(), | ||
new OperationDecorator(), | ||
new PeerServiceDecorator(), | ||
new ResourceNameDecorator(), | ||
new ServiceNameDecorator(), | ||
new ServiceNameDecorator("service"), | ||
new ServletContextDecorator(), | ||
new SpanTypeDecorator(), | ||
new Status404Decorator(), | ||
new Status5XXDecorator(), | ||
new URLAsResourceName()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters