4 Killer Coralogix Tracing Features
Tracing is often the last thought in any observability strategy. While engineers prioritize logs and metrics, tracing is truly the hallmark of a mature observability platform,…
Whether you are just starting your observability journey or already are an expert, our courses will help advance your knowledge and practical skills.
Expert insight, best practices and information on everything related to Observability issues, trends and solutions.
Explore our guides on a broad range of observability related topics.
If you’re just getting familiar with full-stack observability and Coralogix and you want to send us your metrics and traces using the new OpenTelemetry Community Demo Application, this blog is here to help you get started. In this simple, step-by-step guide, you will learn how to get telemetry data produced by the OpenTelemetry Demo Webstore into your Coralogix dashboard using Docker on your local machine.
Earlier this year, OpenTelemetry (OTel) announced a project to build an OpenTelemetry Demo, and more recently it shared OpenTelemetry Demo v1.0 with the world, which allows you to quickly run a complete end-to-end distributed system instrumented with 100% OpenTelemetry traces and metrics. You might be asking why this is such a big deal. It makes OTel that much more accessible, by allowing anyone to easily create a sample application.
The example below uses the OpenTelemetry (OTel) Collector to ingest metrics and traces and sends them to us, where you can analyze and gain valuable insights from your data, including through the use of our new APM features.
The OTel Demo App serves as a fully-functioning online store, the OpenTelemetry Astronomy Shop, a microservice-based distributed system intended to illustrate the implementation of OpenTelemetry in a near real-world environment.
The app consists of more than 14 micro-services that communicate with each other via gRPC, Redis, and HTTP libraries, with support for 6 languages (C#, Go, Java, Node.js, Python, and Ruby).
The demo app also comes with supporting components such as OpenTelemetry Collector, Grafana, Prometheus, and Jaeger to export and visualize metrics and traces. OpenTelemetry Collector can be configured to send telemetry data to multiple backends, including Coralogix.
At the heart of the OTel Demo is the OTel Collector. It offers a vendor-agnostic implementation of how to receive, process and export telemetry data. It removes the need to run, operate, and maintain multiple agents/collectors.
The OTel Collector is configured via YAML, which is used to define receivers, processors, exporters, and pipelines.
To run the OTel Collector as part of the demo, you’ll need either a Docker or Kubernetes environment. We’ll deploy it locally using Docker Compose, which runs Docker, and send telemetry data to Coralogix as a backend.
STEP 1 – Clone the Webstore Demo repo
git clone <https://github.com/open-telemetry/opentelemetry-demo.git>
STEP 2 – Set up Exporter Configuration
.env
file, add the following lines to the bottom and update the values to reflect your Coralogix account environment variables, as in the example below:
# ******************** # Exporter Configuration # ******************** CORALOGIX_DOMAIN=coralogix.com CORALOGIX_APP_NAME=otel CORALOGIX_SUBSYS_NAME=otel-demo CORALOGIX_PRIVATE_KEY=b3887c90-5e67-4249-e81b-EXAMPLEKEY
src/otelcollector/otelcol-config-extras.yml
and add the following:# extra settings to be merged into OpenTelemetry Collector configuration # do not delete this file exporters: coralogix: # The Coralogix traces ingress endpoint traces: endpoint: "otel-traces.${CORALOGIX_DOMAIN}:443" metrics: endpoint: "otel-metrics.${CORALOGIX_DOMAIN}:443" logs: endpoint: "otel-logs.${CORALOGIX_DOMAIN}:443" # Your Coralogix private key is sensitive private_key: "${CORALOGIX_PRIVATE_KEY}" # AppNameSubSystem values. # The first non-empty resource attribute is used. # application_name_attributes: # - "service.namespace" # - "k8s.namespace.name" # subsystem_name_attributes: # - "service.name" # - "k8s.deployment.name" # - "k8s.statefulset.name" # - "k8s.daemonset.name" # - "k8s.cronjob.name" # - "k8s.job.name" # - "k8s.container.name" # It is required that logs, metrics and traces emitted by this exporter # are tagged in Coralogix # with the default application and subsystem constants. # Traces, Metrics and Logs emitted by this OpenTelemetry exporter # are tagged in Coralogix with the default application and subsystem constants. application_name: "${CORALOGIX_APP_NAME}" subsystem_name: "${CORALOGIX_SUBSYS_NAME}" # (Optional) Timeout is the timeout for every attempt to send data to the backend. timeout: 30s processors: batch/traces: timeout: 1s send_batch_size: 50 batch/metrics: timeout: 60s resourcedetection: detectors: [env, docker] timeout: 5s override: true service: pipelines: traces: processors: [spanmetrics, batch/traces, batch] exporters: [logging, otlp, coralogix] metrics: processors: [resourcedetection, batch/metrics, batch] exporters: [prometheus, logging, coralogix] logs: receivers: [otlp] exporters: [logging, coralogix ]
STEP 3 – Update the OTEL Collector container definition
docker-compose.yml
and update the otelcol container definition to match the environment variables that we defined earlier. Add the environment
section to file, as done in the example below.otelcol: image: otel/opentelemetry-collector-contrib:0.61.0 container_name: otel-col deploy: resources: limits: memory: 100M restart: always command: [ "--config=/etc/otelcol-config.yml", "--config=/etc/otelcol-config-extras.yml" ] volumes: - ./src/otelcollector/otelcol-config.yml:/etc/otelcol-config.yml - ./src/otelcollector/otelcol-config-extras.yml:/etc/otelcol-config-extras.yml ports: - "4317" # OTLP over gRPC receiver - "4318:4318" # OTLP over HTTP receiver - "9464" # Prometheus exporter - "8888" # metrics endpoint environment: - CORALOGIX_DOMAIN - CORALOGIX_APP_NAME - CORALOGIX_SUBSYS_NAME - CORALOGIX_PRIVATE_KEY depends_on: - jaeger logging: *logging
STEP 4 – Launch the sample
docker compose up --no-build
docker compose up --build
STEP 5 – Welcome to the Webstore!
STEP 6 – View your telemetry data on your Coralogix dashboard
Explore tab > Tracing
Grafana in the dropdown menu > Select a metric
The OpenTelemetry Community Demo application is an exciting tool for getting to know OpenTelemetry and its instrumentation best practices. In this blog, we showed how to configure the Demo App to send telemetry data to Coralogix in 6 easy, straightforward steps.
Interested in learning more?
Tracing is often the last thought in any observability strategy. While engineers prioritize logs and metrics, tracing is truly the hallmark of a mature observability platform,…
Like many cool tools out there, this project started from a request made by a customer of ours. Having recently migrated to our service, this customer…
In the world of data observability, there are several distinct problems to solve. Fast queries, intuitive visualizations, scalable storage, and more. The technical problems receive the…