Currently the default service name is supported by the tracer.
PR: #64
The user can set the default service:
- Using the YAML file (default-service-name props)
- Building a new instance of the DDTracer
new DDTracer("service-name", ...)
Goal
We want to allow a third way for the user to change the service name at the contribution level. For instance rename mongoto my-app-mongoservice when using the mongo contrib provided.
Proposal
At the point, we have the notion of decorators. But this concept should rest private from the user perspective. So, we will a simple API to allow the user to rename an existing service name to another.
tracer.addRule(Rules.SERVICENAME, new MappingRule("mongo","my-app-mongo"))
rules:
service-name:
- mapping: ["mongo", "my-app-mongo"]
- mapping: ["jdbc", "my-app-jdbc"]