#support

Customizing Span Colors and Separating Services in Java Application

TLDR Sanjiv asks how to change span colors and separate MSSQL service. vishal-signoz clarifies color codes and resource attributes. Srikanth suggests using multiple providers for different services.

Powered by Struct AI

1

Mar 02, 2023 (9 months ago)
Sanjiv
Photo of md5-914a8b39b82fd99b8ecd985427660deb
Sanjiv
05:01 PM
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?
Image 1 for 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?
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
05:13 PM
No, you can not specify color codes.
Errors are in red.
Palash can you please confirm?
Sanjiv
Photo of md5-914a8b39b82fd99b8ecd985427660deb
Sanjiv
05:19 PM
vishal-signoz the sample app that Signoz ships has different colors for spans but here each span belongs to a separate service
Image 1 for <@4K15aa> the sample app that Signoz ships has different colors for spans but here each span belongs to a separate service
05:21
Sanjiv
05:21 PM
I’d like my database msssql show up as separate service similar to the redis or myqsl service in the sample app
Ankit
Photo of md5-dbe7088320fe1d922707613e02f3420d
Ankit
05:54 PM
designing a color system might be a good idea. Sanjiv can you create an issue for this, might be helpful to others users also
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
06:06 PM
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.
Sanjiv
Photo of md5-914a8b39b82fd99b8ecd985427660deb
Sanjiv
06:40 PM
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
Mar 03, 2023 (9 months ago)
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
12:26 AM
Sanjiv service.name is not a span level attribute, rather it is a resource attribute.
Sanjiv
Photo of md5-914a8b39b82fd99b8ecd985427660deb
Sanjiv
12:30 AM
do you know how I can set the resource attribute using Java API’s
vishal-signoz
Photo of md5-f936d3e5743d23344d6c60813189716f
vishal-signoz
03:44 AM
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
Sanjiv
Photo of md5-914a8b39b82fd99b8ecd985427660deb
Sanjiv
04:34 AM
vishal-signoz ok, thanks
Srikanth
Photo of md5-ce04a9988e2fd758a659dc55be6f2543
Srikanth
04:57 AM
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.
Palash
Photo of md5-914a8b39b82fd99b8ecd985427660deb
Palash
08:32 AM
vishal-signoz apart from the error we are assigning the colour in a round-robin fashion for different service

1

SigNoz Community

Built with ClickHouse as datastore, SigNoz is an open-source APM to help you find issues in your deployed applications & solve them quickly | Knowledge Base powered by Struct.AI

Indexed 1023 threads (61% resolved)

Join Our Community

Similar Threads

Issues with Signoz 10.2: Grouping, Missing Traces, and Capturing Requests

Anil reported issues with Signoz 10.2, including grouping, missing traces, and capturing requests. Srikanth suggested upgrading to a newer version. The issue was resolved after upgrading the node version to 18 and additional clarifications were provided.

31
7mo

Extracting Custom Fields as Attributes from Log in SigNoz

Harald wants to have custom fields from their body parsed as attributes in the SigNoz logger. They have tried implementing suggestions from nitya-signoz and Prashant, but the issue remains unsolved due to a potential race condition encountered while executing the code. They have provided a full example using Kind for further assistance.

4

209
5mo

Filling in Method for Traces in Go Instrumentation

Timothy asked about filling in the method for traces in Go. vishal-signoz identified a workaround by changing the spankind to Internal, and shared a PR for the fix.

18
10mo

Resolving Log Parsing Issue in Python OpenTelemetry

Diogo was experiencing issues with log tracing in Python OpenTelemetry. nitya-signoz suggests parsing trace_id and span_id from the log message body or using pipelines feature. Despite partial success, Diogo continued to experience issues with `trace_id`.

11
6d

SigNoz Dashboard Query Assistance

Sumanth had trouble importing a Grafana dashboard and creating a custom trace between services on SigNoz. Prashant explained how to do so and then suggested Ankit who arranged a meeting with Sumanth to discuss further.

1

20
5mo