On what basis are the spans colored? My java appli...
# support
s
On what basis are the spans colored? My java application is autoinstrumented and mades JDBC calls. However all the spans appear blue. I’d like for the spans with attribute db.system=mssql to be colored differently. How can I do this?
v
No, you can not specify color codes. Errors are in red. @Palash Gupta can you please confirm?
s
@Vishal Sharma the sample app that Signoz ships has different colors for spans but here each span belongs to a separate service
I’d like my database msssql show up as separate service similar to the redis or myqsl service in the sample app
a
designing a color system might be a good idea. @Sanjiv can you create an issue for this, might be helpful to others users also
v
@Sanjiv DB are not shown as different services. The hot rod shows them in services because it sets
service.name
for databases. They are not really databases but a simply go programs mimicking the DB behaviour.
s
Is there a way to programatically update the service.name of a Span? Setting an attribute “service.name” on the Span does not result it the new service name being applied
v
@Sanjiv
service.name
is not a span level attribute, rather it is a resource attribute.
s
do you know how I can set the resource attribute using Java API’s
v
Resource attributes can only be added when initializing the instrumentation in a service. So you can’t change resource attribute for a individual span. cc: @Srikanth Chekuri
s
@Vishal Sharma ok, thanks
s
However, you can use multiple (tracer/meter/logger)providers within same service each with different resource attributes, then they will show up as different services in the UI.
p
@Vishal Sharma apart from the error we are assigning the colour in a round-robin fashion for different service