Skip to content

LCORE-1802: Add OpenTelemetry environment variables to docker-compose#2242

Open
anik120 wants to merge 1 commit into
lightspeed-core:mainfrom
anik120:otlp-settings
Open

LCORE-1802: Add OpenTelemetry environment variables to docker-compose#2242
anik120 wants to merge 1 commit into
lightspeed-core:mainfrom
anik120:otlp-settings

Conversation

@anik120

@anik120 anik120 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Add OpenTelemetry OTLP exporter configuration environment variables to docker-compose files with safe defaults that keep tracing disabled until explicitly enabled.

Variables added use ${VAR_NAME:-default} pattern for flexible configuration:

  1. OTEL_EXPORTER_OTLP_ENDPOINT - OTLP collector endpoint URL (default: empty)
  2. OTEL_EXPORTER_OTLP_PROTOCOL - Export protocol, e.g. http/protobuf or grpc (default: empty)
  3. OTEL_SERVICE_NAME - Service identifier in traces (default: empty)
  4. OTEL_SDK_DISABLED - Enable/disable tracing (default: true - tracing OFF)

Type of change

  • Refactor
  • New feature
  • Bug fix
  • CVE fix
  • Optimization
  • Documentation Update
  • Configuration Update
  • Bump-up service version
  • Bump-up dependent library
  • Bump-up library or tool used for development (does not change the final image)
  • CI configuration change
  • Konflux configuration change
  • Unit tests improvement
  • Integration tests improvement
  • End to end tests improvement
  • Benchmarks improvement

Tools used to create PR

Identify any AI code assistants used in this PR (for transparency and review context)

  • Assisted-by: (e.g., Claude, CodeRabbit, Ollama, etc., N/A if not used)
  • Generated by: (e.g., tool name and version; N/A if not used)

Related Tickets & Documents

  • Related Issue #
  • Closes #

Checklist before requesting a review

  • I have performed a self-review of my code.
  • PR has passed all pre-merge test jobs.
  • If it is a core feature, I have added thorough tests.

Testing

  • Please provide detailed steps to perform tests related to this code change.
  • How were the fix/results from this change verified? Please provide relevant screenshots or results.

Summary by CodeRabbit

  • New Features
    • Added configurable OpenTelemetry settings for service tracing, including exporter endpoint, protocol, and service name.
    • Tracing is disabled by default and can be enabled through environment configuration.

Add OpenTelemetry OTLP exporter configuration environment variables to docker-compose files
with safe defaults that keep tracing disabled until explicitly enabled.

Variables added use `${VAR_NAME:-default}` pattern for flexible configuration:

1. **`OTEL_EXPORTER_OTLP_ENDPOINT`** - OTLP collector endpoint URL (default: empty)
2. **`OTEL_EXPORTER_OTLP_PROTOCOL`** - Export protocol, e.g. `http/protobuf` or `grpc` (default: empty)
3. **`OTEL_SERVICE_NAME`** - Service identifier in traces (default: empty)
4. **`OTEL_SDK_DISABLED`** - Enable/disable tracing (default: `true` - **tracing OFF**)

Signed-off-by: Anik Bhattacharjee <anbhatta@redhat.com>
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 6ac3a30f-63bf-4df4-8fdb-aff6b3188817

📥 Commits

Reviewing files that changed from the base of the PR and between 688e89d and 3277b7b.

📒 Files selected for processing (2)
  • docker-compose-library.yaml
  • docker-compose.yaml
📜 Recent review details
⏰ Context from checks skipped due to timeout. (18)
  • GitHub Check: E2E: library mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 3
  • GitHub Check: E2E: library mode / ci / group 2
  • GitHub Check: E2E: library mode / ci / group 3
  • GitHub Check: E2E: server mode / ci / group 1
  • GitHub Check: E2E: server mode / ci / group 2
  • GitHub Check: bandit
  • GitHub Check: mypy
  • GitHub Check: Pylinter
  • GitHub Check: unit_tests (3.12)
  • GitHub Check: E2E Tests for Lightspeed Evaluation job
  • GitHub Check: Pyright
  • GitHub Check: build-pr
  • GitHub Check: unit_tests (3.13)
  • GitHub Check: spectral
  • GitHub Check: integration_tests (3.12)
  • GitHub Check: integration_tests (3.13)
  • GitHub Check: Konflux kflux-prd-rh02 / lightspeed-stack-0-7-on-pull-request
🧰 Additional context used
📓 Path-based instructions (1)
**/*

📄 CodeRabbit inference engine (Custom checks)

**/*: Flag meaningful O(n^2)+ algorithms on non-trivial inputs, including handlers and Kubernetes list operations.
Flag N+1 patterns that list items and then query once per item, including Kubernetes API and database access.
Flag expensive work inside loops, including API calls, JSON parsing, and regex compilation.
Flag unbounded growth in caches, watchers, or buffers when eviction or limits are missing.
Flag missing pagination or limits on list operations and API endpoints.
Flag secrets or tokens logged in plaintext or hardcoded in source.
Flag API endpoints missing authentication or authorization.
Flag injection vulnerabilities, including SQL injection, command injection, and path traversal.
Flag sensitive data leaked in API responses, WebSocket messages, or logs.
Flag Kubernetes Secrets and Red Hat secrets missing OwnerReferences.

Files:

  • docker-compose-library.yaml
  • docker-compose.yaml
🧠 Learnings (1)
📚 Learning: 2026-05-20T08:09:30.641Z
Learnt from: max-svistunov
Repo: lightspeed-core/lightspeed-stack PR: 1580
File: docs/design/llama-stack-config-merge/poc-results/library-mode/synthesized-run.yaml:107-110
Timestamp: 2026-05-20T08:09:30.641Z
Learning: In Llama-stack config YAMLs, when defining a Llama Guard safety shield entry, set `provider_shield_id` to the *guard model identifier* (e.g., `meta-llama/Llama-Guard-3-8B`). Do not use a chat/generative model id (e.g., `openai/gpt-4o-mini`): a chat-model id (or `native_override`) indicates only an override landed and does **not** mean the safety shield is actually gating queries. Ensure any E2E coverage for the related implementation (JIRA/E2E tests) exercises a real Llama Guard model to verify that the shield is effective.

Applied to files:

  • docker-compose-library.yaml
  • docker-compose.yaml
🔇 Additional comments (2)
docker-compose-library.yaml (1)

64-68: LGTM!

docker-compose.yaml (1)

104-108: LGTM!


Walkthrough

Changes

OpenTelemetry Compose Configuration

Layer / File(s) Summary
Configure OpenTelemetry environment
docker-compose-library.yaml, docker-compose.yaml
The lightspeed-stack service now exposes OTLP endpoint, protocol, service name, and SDK-disabled settings, with tracing disabled by default.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: jrobertboos

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding OpenTelemetry environment variables to docker-compose.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Performance And Algorithmic Complexity ✅ Passed Only environment variables were added to two compose files; no loops, list/API operations, or unbounded buffers/caches were introduced.
Security And Secret Handling ✅ Passed The diff only adds OTEL env vars with empty/true defaults in docker-compose files; no secrets, auth gaps, injections, or sensitive data exposure were introduced.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant