Merge pull request #64 from DataDog/gpolaert/contrib-decorators

Service name improvements
This commit is contained in:
Guillaume Polaert 2017-07-25 14:06:38 +02:00 committed by GitHub
commit 132c5c79a2
4 changed files with 3 additions and 16 deletions

View File

@ -116,7 +116,6 @@ Modern web application frameworks such as Dropwizard or Spring Boot are automati
| Hibernate| 5.x | Please check the following [JDBC instrumentation](#jdbc-instrumentation) section |
| [MongoDB](https://github.com/opentracing-contrib/java-mongo-driver) | 3.x | Intercepts all the calls from the MongoDB client |
| [Cassandra](https://github.com/opentracing-contrib/java-cassandra-driver) | 3.2.x | Intercepts all the calls from the Cassandra client |
| [Elasticsearch](https://github.com/opentracing-contrib/java-elasticsearch-client) | 5.4.x | Intercepts all the calls from the ES Transport client |
#### JDBC instrumentation

View File

@ -12,12 +12,12 @@ public class DBComponent extends DDSpanContextDecorator {
public DBComponent() {
super();
this.setMatchingTag(Tags.COMPONENT.getKey());
this.setMatchingTag(Tags.DB_TYPE.getKey());
this.setSetTag(DDTags.SERVICE_NAME);
}
@Override
public boolean afterSetTag(DDSpanContext context, String tag, Object value) {
public boolean afterSetTag(final DDSpanContext context, final String tag, final Object value) {
//Assign service name
if (super.afterSetTag(context, tag, value)) {
//Assign span type to DB

View File

@ -5,14 +5,8 @@ decorators:
matchingValue: java-okhttp
setValue: http-client
- type: DBComponent
matchingValue: java-mongo
setValue: mongo
- type: DBComponent
matchingValue: java-jdbc
setValue: jdbc
- type: HTTPComponent
matchingValue: java-aws-sdk
setValue: aws-client
- type: URLAsResourceName
- type: DBStatementAsResourceName
- type: ErrorFlag

View File

@ -21,9 +21,3 @@ sampler:
type: AllSampler
# Skip some traces if the root span tag values matches some regexp patterns
# skipTagsPatterns: {"http.url": ".*/demo/add.*"}
# Enable custom annotation tracing over a selected set of packages
# enableCustomAnnotationTracingOver: ["io","org","com"]
# Disable some instrumentations
# disabledInstrumentations: ["apache http", "mongo", "jetty", "tomcat", ...]