Skip to content

[Otel] fix otel spans and attributes - #201

Merged
majunze2001 merged 1 commit into
masterfrom
jm-demo
Mar 4, 2026
Merged

majunze2001 merged 1 commit into
masterfrom
jm-demo

Conversation

@majunze2001

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on enhancing OpenTelemetry observability by configuring specific limits for span, event, and link attributes within Kubernetes development and local environments. This ensures that detailed telemetry data is not truncated, improving debugging and monitoring capabilities. Additionally, it includes an update to the vllm subproject and a minor adjustment to logging verbosity in the Geri executor.

Highlights

  • OpenTelemetry Configuration: Configured OpenTelemetry span, event, and link attribute limits in Kubernetes development and local overlays to prevent data truncation and ensure comprehensive telemetry collection.
  • VLLM Dependency Update: Updated the vllm third-party subproject to a newer commit, incorporating the latest changes from the dependency.
  • Logging Adjustment: Changed the logging level from an exception to a warning when model_index.json fails to load in the Geri executor, making the log less severe for expected failures.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • docker/dev.Dockerfile
    • Added commented-out environment variables for CORNSERVE_MOCK_SIDECAR and OTEL_SDK_DISABLED.
  • kubernetes/kustomize/cornserve/overlays/dev/kustomization.yaml
    • Added OpenTelemetry environment variables to set limits for span attributes, event attributes, and link attributes to 16384.
  • kubernetes/kustomize/cornserve/overlays/local/kustomization.yaml
    • Added OpenTelemetry environment variables to set limits for span attributes, event attributes, and link attributes to 16384.
  • python/cornserve/task_executors/geri/executor/loader.py
    • Changed the logging level from exception to warning when model_index.json fails to load.
  • third_party/vllm
    • Updated the vllm subproject commit hash from f42ed532b9aad79793da08367dbf8460a09b0216 to ddd77fab141c1aad2f65399564c90d1d9f69efce.
Activity
  • No activity has been recorded for this pull request yet.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@majunze2001
majunze2001 merged commit 526e936 into master Mar 4, 2026
2 checks passed
@majunze2001
majunze2001 deleted the jm-demo branch March 4, 2026 04:04

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request aims to fix OpenTelemetry (Otel) spans and attributes. The changes involve increasing Otel limits in Kubernetes configurations, updating a submodule, and adjusting a log level in the Python code. My review identifies opportunities to improve maintainability by centralizing duplicated Kubernetes configurations into a base layer, removing commented-out code from the Dockerfile, and enhancing a logging statement to retain important debugging information.

Comment thread docker/dev.Dockerfile
Comment on lines +58 to +60

# export CORNSERVE_MOCK_SIDECAR=1
# OTEL_SDK_DISABLED=true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These commented-out lines and the preceding blank line should be removed. OTEL_SDK_DISABLED=true is already configured via ENV on line 52. Leaving commented-out code, especially for configuration, can cause confusion and clutters the Dockerfile. If these are for developer convenience, they should be documented elsewhere, like in a developer guide.

Comment on lines +32 to +36
- OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT=16384
- OTEL_SPAN_EVENT_COUNT_LIMIT=16384
- OTEL_SPAN_LINK_COUNT_LIMIT=16384
- OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT=16384
- OTEL_LINK_ATTRIBUTE_COUNT_LIMIT=16384

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These OpenTelemetry settings are also duplicated in kubernetes/kustomize/cornserve/overlays/local/kustomization.yaml. To improve maintainability and avoid duplication, these common settings should be moved to the base kustomization (../../base). Both dev and local overlays include the base, so they would inherit these settings automatically. This will make future changes to these values easier to manage.

Comment on lines +32 to +36
- OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT=16384
- OTEL_SPAN_EVENT_COUNT_LIMIT=16384
- OTEL_SPAN_LINK_COUNT_LIMIT=16384
- OTEL_EVENT_ATTRIBUTE_COUNT_LIMIT=16384
- OTEL_LINK_ATTRIBUTE_COUNT_LIMIT=16384

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

These OpenTelemetry settings are duplicated from the dev overlay. To adhere to the DRY (Don't Repeat Yourself) principle and improve maintainability, these common configurations should be defined once in the base kustomization (../../base) and inherited by all overlays.

logger.info("Found pipeline class: %s", class_name)
except Exception:
logger.exception("Failed to load model_index.json from %s", model_id)
logger.warning("Failed to load model_index.json from %s", model_id)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Changing from logger.exception to logger.warning is reasonable since failing to load model_index.json is a recoverable condition. However, this change loses the exception traceback, which can be crucial for debugging if the failure is due to an unexpected reason (e.g., file corruption, permission issues) rather than the file simply not existing. To retain this valuable debugging information while still logging at the WARNING level, you should add exc_info=True.

Suggested change
logger.warning("Failed to load model_index.json from %s", model_id)
logger.warning("Failed to load model_index.json from %s", model_id, exc_info=True)

jnigrelli pushed a commit to jnigrelli/cornserve that referenced this pull request Apr 19, 2026
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