1

There are just some documented parameters to configure Observability. In OpenTelemetry there are other parameters that can be set. For example, deployment.environment (https://opentelemetry.io/docs/specs/semconv/resource/deployment-environment/) This is one of the parameters I would like to configure. Ballerina allows us to set them?

I would like to set additional opentelemetry options from the observability configurations on Ballerina. I set the options documented on this link https://ballerina.io/learn/observe-tracing/

1 Answer 1

0

Thank you for mentioning the above use case. Currently we have a workaround to add a suffix to the service name as follows.

$ BAL_OBSERVE_SERVICE_NAME_SUFFIX=<suffix> bal run

As you mentioned about the configurations about Ballerina tracing, they are configured for tracing only. Configurations such as deployment environment will be configured for both tracing and metrics.

We have created an issue for this in the github. We will address this issue immediately and will try to include an improvement soon.

2
  • Thanks Nipuna. I would like to add tags to the distributed traces. Is it possible to set that too? Commented Jul 10 at 13:14
  • Yes. You can use the ballerina/observe module. You can use the following line in your Ballerina application. _ = observe:addTagToSpan(spanId = spanId, "Tag Key", "Tag Value"); In this command, span ID is optional. If you do not provide a span ID, then the tag will be added to the current span. You can refer our API documentation here for more information. Commented Jul 10 at 17:24

Not the answer you're looking for? Browse other questions tagged or ask your own question.