- Virtana Docs
- Virtana Platform
- Virtana Platform Deployment
- Container Observability deployment
- Enable shared traces on the Container Observability South bundle
Enable shared traces on the Container Observability South bundle
Shared traces collect distributed traces from your applications and send them to Virtana Platform, where you view them in Data Explorer > Traces. To start collecting traces, you turn on three trace modules in the Container Observability South bundle that already runs in your Kubernetes cluster. You don't need to reinstall Container Observability.
How shared traces work
Your applications send spans to a trace collector in your cluster. The trace modules assemble the spans into traces and send them securely to Virtana Platform, which stores them and shows them in the UI.
Applications → OpenTelemetry trace collector → trace-router → tracegw ══ HTTPS + OAuth ══▶ Virtana Platform
Module | What it does |
|---|---|
OpenTelemetry trace collector ( | Receives spans from your applications over OTLP gRPC (port 4317), OTLP HTTP (port 4318), or Jaeger Thrift (port 14268). Adds the cluster name and the tenant ID to each span. |
trace-router | Holds each trace for about 60 seconds so that all its spans arrive, and then forwards the complete trace to tracegw. Forwards only traces that match a route (see Step 3: Configure trace routing). |
tracegw | Adds service names and trace path details to each trace, authenticates with Virtana Platform with an OAuth client, and sends the traces to Virtana Platform. |
In Virtana Platform, service names appear in the format <cluster-name>@<namespace>^<service>.
Before you begin
The Container Observability South bundle (Helm chart
virtana-co) is deployed in your cluster, and you know its release name and namespace. To find them, runhelm list -A | grep virtana-co.You have the
helmandkubectlcommand-line tools, with access to the namespace of the South bundle.You have the values file that you used to deploy the South bundle.
You have the registry credentials for the Virtana private Docker registry. The trace images are in the same registry as the other Container Observability images, and Virtana provides the credentials in your values file, as in the standard deployment.
You can log in to Virtana Platform with permission to create OAuth client credentials.
Your applications are instrumented to send traces with OpenTelemetry (OTLP) or Jaeger.
In the commands in this section, replace these placeholders with your values:
Placeholder | Value |
|---|---|
<RELEASE> | Helm release name of the South bundle |
<NAMESPACE> | Namespace of the South bundle |
<BUNDLE_VALUES_FILE> | The values file that you used to deploy the South bundle |
<BUNDLE_CHART_VERSION> | Version of the |
<PLATFORM_HOSTNAME> | Host name of your Virtana Platform instance |
<CLUSTER_NAME> | The |
Step 1: Create OAuth client credentials in Virtana Platform
tracegw uses an OAuth client to authenticate with Virtana Platform. The client must belong to the Data Ingesters user group.
Log in to Virtana Platform.
Go to Settings > Integrations > Virtana Platform API.
Click Generate OAuth client credentials.
Enter a name, such as
Shared Trace Data Receiver, and a description.In User Group, select Data Ingesters.
Create the credentials, and then copy the client ID and client secret.
Important
Store the client secret in a password manager. Don't paste it into chats, tickets, or shared files.
Note
A client that isn't in the Data Ingesters user group can get a token, but Virtana Platform rejects its traces.
Step 2: Create the trace values file
Create a file named trace-south-values.yaml with the following content, and replace the placeholders:
global:
gatewayCreds:
environment:
VIRTANA_TRACE_ENDPOINT: "https://<PLATFORM_HOSTNAME>/api/v1/traces/ingest"
VIRTANA_TRACE_DATA_RECEIVER_CLIENT_ID: "<CLIENT_ID>"
VIRTANA_TRACE_DATA_RECEIVER_CLIENT_SECRET: "<CLIENT_SECRET>"
# Turn on the trace modules
tracegw:
enabled: true
trace-router:
enabled: true
otel_collector_service:
enabled: true
otel-trace-collector:
enabled: true
# Module settings
tracegw:
image:
repository: virtana/oc-tracegw
tracegw_tag: "<TRACEGW_TAG>"
trace-router:
image:
trace_router_tag: "<ROUTER_TAG>"
configMap:
tracerouter:
trace-gateway-endpoints: []
otel-collector-service:
otel-trace-collector:
image:
repository: otel/opentelemetry-collector-k8s
tag: "0.165.0"The values file reuses the Keycloak address and realm that the South bundle already uses, so you don't set them again.
Important
Use the keys exactly as shown. Helm ignores keys that it doesn't recognize and shows no error, so a misspelled key leaves a module turned off. For example, the collector switch is otel_collector_service (with underscores) under global, and its settings are under otel-collector-service (with hyphens).
Step 3: Configure trace routing
The trace-gateway-endpoints list in the values file controls which traces trace-router forwards:
Empty list (
[], recommended): trace-router forwards all traces to tracegw in the same namespace.List with entries: trace-router forwards a trace only when its root span has a tag that matches an entry. It drops all other traces without logging them.
Use an empty list unless you need to forward only specific clusters. To forward only specific clusters, add one entry for each cluster.name value:
trace-router:
configMap:
tracerouter:
trace-gateway-endpoints:
- key: cluster.name
value: <CLUSTER_NAME>
endpoint: tracegw-service.<NAMESPACE>.svc.cluster.local:9000The namespace in endpoint must be the namespace of the South bundle.
Step 4: Deploy the trace modules
Add or update the Virtana Helm repository:
helm repo add virtana-repo https://virtana.gitlab.io/helm-charts helm repo update helm search repo virtana-repo/virtana-co
Save the current configuration, so that you can compare or roll back later:
helm get values <RELEASE> -n <NAMESPACE> > before.yaml
Upgrade the South bundle with your bundle values file and the trace values file:
helm upgrade --install <RELEASE> virtana-repo/virtana-co \ --namespace <NAMESPACE> \ -f <BUNDLE_VALUES_FILE> -f trace-south-values.yaml \ --version <BUNDLE_CHART_VERSION>
Restart tracegw and trace-router so that they read the new settings:
kubectl rollout restart deploy/<RELEASE>-tracegw -n <NAMESPACE> kubectl rollout restart deploy/<RELEASE>-trace-router -n <NAMESPACE>
Confirm that the three trace modules are deployed:
kubectl get deploy -n <NAMESPACE> | grep -E "tracegw|trace-router|otel-trace-collector"
Important
Pass both values files every time you upgrade the South bundle. If you upgrade without trace-south-values.yaml, Helm removes tracegw and trace-router. Don't use --reuse-values together with a changed values file.
To roll back, run helm rollback <RELEASE> <REVISION> -n <NAMESPACE>.
Step 5: Send traces from your applications
Point your instrumented applications to the trace collector service in the South bundle namespace:
Protocol | Endpoint |
|---|---|
OTLP gRPC | otel-trace-collector-service.<NAMESPACE>.svc.cluster.local:4317 |
OTLP HTTP | otel-trace-collector-service.<NAMESPACE>.svc.cluster.local:4318 |
Jaeger Thrift | otel-trace-collector-service.<NAMESPACE>.svc.cluster.local:14268 |
Verify the installation
Allow 2 to 3 minutes after your applications start sending spans. trace-router holds each trace for about 60 seconds before it forwards it.
In Virtana Platform, go to Data Explorer > Traces, and check that traces from your services appear.
If no traces appear, check each module in order and stop at the first one that shows a problem:
Module
Command
Healthy result
Trace collector
Port-forward the collector deployment on port 8888 and read the metrics
otelcol_receiver_accepted_spansandotelcol_exporter_send_failed_spans.Accepted spans increase. Failed spans stay at 0.
trace-router
kubectl logs deploy/<RELEASE>-trace-router -n <NAMESPACE> --since=3m
Lines such as
total received spans: N, and noUNAVAILABLEerrors. These lines are logged at the ERROR level, which is normal.tracegw
kubectl logs deploy/<RELEASE>-tracegw -n <NAMESPACE> --since=5m | grep -iE "401|OAuth|Unable to send|non-2xx"
No output. tracegw logs only errors by default.
Troubleshooting
Symptom | Cause | Solution |
|---|---|---|
A trace module isn't deployed, and Helm showed no error. | A switch key in the values file is misspelled or in the wrong place. | Use the keys exactly as shown in Step 2, upgrade again, and check the deployments. |
Trace pods show | The pull secret is missing, or its account can't read the Virtana trace images. | Check the registry credentials in the namespace of the South bundle. |
tracegw logs | The client ID or secret is empty or wrong. | Check the credentials from Step 1, upgrade again, and restart tracegw. |
tracegw logs | The OAuth client isn't in the Data Ingesters user group. | Create credentials with the Data Ingesters user group, and update the values file. |
tracegw logs | The Virtana Platform endpoint serves a certificate that doesn't match its host name. | Install a valid certificate for the Virtana Platform host name. |
The collector accepts spans and trace-router counts them, but no traces reach Virtana Platform, and no errors are logged. | The routing list has entries, and none of them matches the | Add an entry for the |
trace-router logs | The namespace in a routing entry is wrong, or tracegw isn't turned on. | Fix the namespace in the endpoint, or empty the list. Check that |
trace-router logs | tracegw is starting or restarting. | Wait until the tracegw pod is ready. Traces sent while tracegw is unavailable are lost. |
tracegw and trace-router are missing after an upgrade of the South bundle. | The upgrade didn't include | Upgrade again with both values files. |