Documentation forSolarWinds Observability SaaS

Python service instrumentation through Kubernetes operator

SolarWinds Observability SaaS beta features - The following content includes descriptions of features that are currently in beta and may change based on user feedback. All feature functionality is subject to change when the feature reaches maturity.

Use the updated simplified onboarding experience for zero-code Python service instrumentation via OTel operator if your services run in Kubernetes.

Before you start

If your Kubernetes Cluster is not yet set up, you can configure monitoring and enable the Deploy OpenTelemetry (OTel) Operator at the same time directly within the onboarding wizard. See Step 5 below. If your Cluster is already set up, but the OTel Operator is not yet deployed, follow the steps in SWO K8s Collector Auto Instrumentation documentation or in the APM auto instrumentation section of the README to enable deployment. The OTel Operator must be enabled before the Cluster can be selected in onboarding.

Complete the onboarding steps

To enable instrumentation through a Kubernetes operator for a Python application and send the data to SolarWinds Observability SaaS:

  1. In SolarWinds Observability SaaS, click Add Data at the top.

  2. In the Add Data modal, click the APM tab.

  3. Click Python to launch the Onboarding wizard.

  4. Type a name for your service, select the Kubernetes radio button, then click Next

  5. Select an existing, or create a new Kubernetes Infrastructure.

    • If existing, select the Cluster, Namespace, and Deployment, then click Next.

      The OTel Operator must be enabled for the Cluster to appear in the list. See the Auto Instrumentation or README document to enable deployment, then click Refresh Clusters List to select.
    • If new, click the Kubernetes Cluster button to configure a new Kubernetes Infrastructure. See also Add a Kubernetes cluster.

  6. Create or select an API Ingestion token to use when sending your collected entity type data by doing either of the following:

    • Select Generate New Token and enter an Ingestion Token Name, and then click Next.
    • Select Use Existing Token and select an ingestion token from the list, and then click Next.
  7. Complete last instruction steps using the generated, copyable code.

    1. Create and apply in the namespace the secret shown in the first code block.

    2. Create and apply an Instrumentation custom resource file, which contains the SW_APM_SERVICE_KEY and SW_APM_COLLECTOR settings, shown in the second code block.

    3. Choose your pod image type, by clicking GLIBC Based or MUSL (ALPINE) Based.

      For Alpine pod images, instrumentation has a runtime dependency on the libstdc++ package. Please ensure this dependency is satisfied. Run apk add libstdc++, before enabling instrumentation.

      Then using the generated code in the third block, opt your services into automatic instrumentation by setting the annotation and service.name (optional, but recommended).

      Using kubectl patch to set annotations will trigger a rollout and means these changes will be lost if the original Deployment file is applied and rolled out again. See the OpenTelemetry Operator README for example Deployment files that persist these changes.
    4. Finally, once the service is running and connection is confirmed under Generate Data, click Finish to complete onboarding and start collecting data.