LogoLogo
StackState.comDownloadSupportExplore playground
SUSE Observability
SUSE Observability
  • SUSE Observability docs!
  • Docs for all SUSE Observability products
  • 🚀Get started
    • Quick start guide
    • SUSE Observability walk-through
    • SUSE Rancher Prime
      • Air-gapped
      • Agent Air-gapped
    • SUSE Cloud Observability
  • 🦮Guided troubleshooting
    • What is guided troubleshooting?
    • YAML Configuration
    • Changes
    • Logs
  • 🚨Monitors and alerts
    • Monitors
    • Out of the box monitors for Kubernetes
    • Notifications
      • Configure notifications
      • Notification channels
        • Slack
        • Teams
        • Webhook
        • Opsgenie
      • Troubleshooting
    • Customize
      • Add a monitor using the CLI
      • Derived State monitor
      • Dynamic Threshold monitor
      • Override monitor arguments
      • Write a remediation guide
  • 📈Metrics
    • Explore Metrics
    • Custom charts
      • Adding custom charts to components
      • Writing PromQL queries for representative charts
      • Troubleshooting custom charts
    • Advanced Metrics
      • Grafana Datasource
      • Prometheus remote_write
      • OpenMetrics
  • 📑Logs
    • Explore Logs
    • Log Shipping
  • 🔭Traces
    • Explore Traces
  • 📖Health
    • Health synchronization
    • Send health data over HTTP
      • Send health data
      • Repeat Snapshots JSON
      • Transactional Increments JSON
    • Debug health synchronization
  • 🔍Views
    • Kubernetes views
    • Custom views
    • Component views
    • Explore views
    • View structure
      • Overview perspective
      • Highlights perspective
      • Topology perspective
      • Events perspective
      • Metrics perspective
      • Traces perspective
      • Filters
      • Keyboard shortcuts
    • Timeline and time travel
  • 🕵️Agent
    • Network configuration
      • Proxy Configuration
    • Using a custom registry
    • Custom Secret Management
      • Custom Secret Management (Deprecated)
    • Request tracing
      • Certificates for sidecar injection
  • 🔭Open Telemetry
    • Overview
    • Getting started
      • Concepts
      • Kubernetes
      • Kubernetes Operator
      • Linux
      • AWS Lambda
    • Open telemetry collector
      • Sampling
      • SUSE Observability OTLP APIs
    • Instrumentation
      • Java
      • Node.js
        • Auto-instrumentation of Lambdas
      • .NET
      • SDK Exporter configuration
    • Troubleshooting
  • CLI
    • SUSE Observability CLI
  • 🚀Self-hosted setup
    • Install SUSE Observability
      • Requirements
      • Kubernetes / OpenShift
        • Kubernetes install
        • OpenShift install
        • Alibaba Cloud ACK install
        • Required Permissions
        • Override default configuration
        • Configure storage
        • Exposing SUSE Observability outside of the cluster
      • Initial run guide
      • Troubleshooting
        • Advanced Troubleshooting
        • Support Package (Logs)
    • Configure SUSE Observability
      • Slack notifications
      • E-mail notifications
      • Stackpacks
      • Advanced
        • Analytics
    • Release Notes
      • v2.0.0 - 11/Sep/2024
      • v2.0.1 - 18/Sep/2024
      • v2.0.2 - 01/Oct/2024
      • v2.1.0 - 29/Oct/2024
      • v2.2.0 - 09/Dec/2024
      • v2.2.1 - 10/Dec/2024
      • v2.3.0 - 30/Jan/2025
      • v2.3.1 - 17/Mar/2025
      • v2.3.2 - 22/Apr/2025
      • v2.3.3 - 07/May/2025
    • Upgrade SUSE Observability
      • Migration from StackState
      • Steps to upgrade
      • Version-specific upgrade instructions
    • Uninstall SUSE Observability
    • Air-gapped
      • SUSE Observability air-gapped
      • SUSE Observability Kubernetes Agent air-gapped
    • Data management
      • Backup and Restore
        • Kubernetes backup
        • Configuration backup
      • Data retention
      • Clear stored data
    • Security
      • Authentication
        • Authentication options
        • Single password
        • File-based
        • LDAP
        • Open ID Connect (OIDC)
          • Microsoft Entra ID
        • KeyCloak
        • Service tokens
        • Troubleshooting
      • RBAC
        • Role-based Access Control
        • Permissions
        • Roles
        • Scopes
      • Self-signed certificates
      • External secrets
  • 🔐Security
    • Service Tokens
    • API Keys
  • ☁️SaaS
    • User Management
  • Reference
    • SUSE Observability Query Language (STQL)
    • Chart units
    • Topology Identifiers
Powered by GitBook
LogoLogo

Legal notices

  • Privacy
  • Cookies
  • Responsible disclosure
  • SOC 2/SOC 3
On this page
  • Getting Started with Open Telemetry
  • Install the Open Telemetry collector
  • Collect telemetry data from your application
  • View the results
  • Next steps
  • More info
  1. Open Telemetry
  2. Getting started

Linux

SUSE Observability

PreviousKubernetes OperatorNextAWS Lambda

Last updated 3 days ago

Getting Started with Open Telemetry

Here is the setup we'll be creating, for an application that needs to be monitored:

  • The monitored application / workload running on a Linux host

  • The Open Telemetry collector running on the same Linux host

  • SUSE Observability or SUSE Cloud Observability

Install the Open Telemetry collector

For a production setup it is strongly recommended to install the collector, since it allows your service to offload data quickly and the collector can take care of additional handling like retries, batching, encryption or even sensitive data filtering.

First we'll install the collector. We configure it to:

  • Receive data from, potentially many, instrumented applications

  • Enrich collected data with host attributes

  • Generate metrics for traces

  • Forward the data to SUSE Observability, including authentication using the API key

Next to that it will also retry sending data when there are a connection problems.

Configure and install the collector

Install and configure the collector

wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.123.1/otelcol-contrib_0.123.1_linux_amd64.deb
sudo dpkg -i otelcol-contrib_0.123.1_linux_amd64.deb
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.123.1/otelcol-contrib_0.123.1_linux_arm64.deb
sudo dpkg -i otelcol-contrib_0.123.1_linux_arm64.deb
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.123.1/otelcol-contrib_0.123.1_linux_amd64.rpm
sudo rpm -iv1 otelcol-contrib_0.123.1_linux_amd64.rpm
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.123.1/otelcol-contrib_0.123.1_linux_arm64.rpm
sudo rpm -iv1 otelcol-contrib_0.123.1_linux_arm64.rpm
config.yaml
receivers:
  otlp:
    protocols:
      # Only bind to localhost to keep the collector secure, see https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/security-best-practices.md#safeguards-against-denial-of-service-attacks
      grpc:
        endpoint: 127.0.0.1:4317
      http:
        endpoint: 127.0.0.1:4318
  # Collect own metrics
  prometheus:
    config:
      scrape_configs:
      - job_name: 'otel-collector'
        scrape_interval: 10s
        static_configs:
        - targets: ['0.0.0.0:8888']
extensions:
  health_check: {}
  pprof:
    endpoint: 0.0.0.0:1777
  zpages:
    endpoint: 0.0.0.0:55679
  # Use the API key from the env for authentication
  bearertokenauth:
    scheme: SUSEObservability
    token: "<receiver-api-key>"
exporters:
  nop: {}
  debug: {}
  otlp/suse-observability:
    compression: snappy
    auth:
      authenticator: bearertokenauth
    # Put in your own otlp endpoint, for example suse-observability.my.company.com:443
    endpoint: <otlp-suse-observability-endpoint:port>
processors:
  memory_limiter:
    check_interval: 5s
    limit_percentage: 80
    spike_limit_percentage: 25
  batch: {}
  # Optionally include resource information from the system running the collector
  resourcedetection/system:
    detectors: [env, system] # Replace system with gcp, ec2, azure when running in cloud environments
    system:
      hostname_sources: ["os"]
connectors:
  # Generate metrics for spans
  spanmetrics:
    metrics_expiration: 5m
    namespace: otel_span
service:
  extensions: [ bearertokenauth, health_check, pprof, zpages ]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [memory_limiter, resourcedetection/system, batch]
      exporters: [debug, spanmetrics, otlp/suse-observability]
    metrics:
      receivers: [otlp, spanmetrics, prometheus]
      processors: [memory_limiter, batch, resourcedetection/system]
      exporters: [debug, otlp/suse-observability]
    logs:
      receivers: [otlp]
      processors: []
      exporters: [nop]

Finally restart the collector:

sudo systemctl restart otelcol-contrib

To see the logs of the collector use:

sudo journalctl -u otelcol-contrib

Collect telemetry data from your application

The common way to collect telemetry data is to instrument your application using the Open Telemetry SDK's. We've documented some quick start guides for a few languages, but there are many more:

No additional configuration is needed for the SDKs, they export to localhost via OTLP or OTLP over HTTP (depending on the supported protocols) by default.

View the results

Go to SUSE Observability and make sure the Open Telemetry Stackpack is installed (via the main menu -> Stackpacks).

Next steps

More info

The collector provides packages (apk, deb and rpm) for most Linux versions and architectures and it uses systemd for automatic service configuration. To install it find the and update the URL in the example to use the latest version:

For other installation options use the .

After installation modify the collector configuration by editing /etc/otelcol-contrib/config.yaml. Change the file such that it looks like the config.yaml example here, replace <otlp-suse-observability-endpoint:port> with your OTLP endpoint (see for your endpoint) and insert your receiver api key for <receiver-api-key> (see where to find it):

For other languages follow the documentation on .

After a short while and if your application is processing some traffic you should be able to find it under its service name in the Open Telemetry -> services and service instances overviews. Traces will appear in the and in the for the service and service instance components. Span metrics and language specific metrics (if available) will become available in the for the components.

You can add new charts to components, for example the service or service instance, for your application, by following . It is also possible to create using the metrics and setup to get notified when your application is not available or having performance issues.

🔭
latest release on Github
Open Telemetry instructions
Java
.NET
Node.js
opentelemetry.io
trace explorer
trace perspective
metrics perspective
our guide
new monitors
notifications
API keys
Open Telemetry API
Customizing Open Telemetry Collector configuration
Open Telemetry SDKs
OTLP API
here
Application instrumentation on a linux host with Open Telemetry collector running on the host