Add OpenTelemetry collector MCP#77
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: pavolloffay The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
Signed-off-by: Pavol Loffay <p.loffay@gmail.com>
|
Haven't looked deep, can take a look on Monday. Will e2e setup and tests will be added too? |
|
The otelcol tools don't require external infrastructure (they use embedded schemas), so there's no e2e setup needed. We have:
I can add basic e2e tests that verify the tools work via MCP HTTP calls if you'd like, but they'd be simpler than metrics tests since no backend setup is required. |
|
@pavolloffay Can you rebase when you get chance, we enabled coderabbit today so wanted to see if it works :) |
| // DefaultVersion is the default OpenTelemetry Collector version to use when | ||
| // version is not explicitly specified in tool calls. If not set, the latest | ||
| // available version is used. | ||
| DefaultVersion string `toml:"default_version,omitempty"` |
There was a problem hiding this comment.
Is this used anywhere?
| type Config struct { | ||
| // SchemaDir is an optional path to a directory containing component schemas. | ||
| // If not specified, embedded schemas from the collectorschema package are used. | ||
| SchemaDir string `toml:"schema_dir,omitempty"` |
There was a problem hiding this comment.
Is there a way to set config option when using obs-mcp directly, i.e. without using openshift-mcp-server?
| package otelcol | ||
|
|
||
| const ( | ||
| ServerPrompt = `You are an expert OpenTelemetry Collector configuration assistant with direct access to component schemas, documentation, and validation through this MCP server. |
There was a problem hiding this comment.
afaics this variable is not referenced anywhere
| 1. **Discover components**: Use list_otelcol_components to see available receivers, processors, exporters, extensions, and connectors | ||
| 2. **Get component schema**: Use get_otelcol_component_schema to understand configuration options | ||
| 3. **Validate configurations**: Use validate_otelcol_config to check configurations before deployment | ||
| 4. **Version management**: Use get_otelcol_versions and get_otelcol_changelog when planning upgrades` |
There was a problem hiding this comment.
The tool get_otelcol_changelog doesn't exist in the PR
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Important Review skippedAuto reviews are limited based on label configuration. 🚫 Review skipped — only excluded labels are configured. (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Add OpenTelemetry collector MCP.
The toolset enables users to configure the collector and upgrade across versions. The MCP exposes the available configuration for the Red Hat build of OpenTelemetry. The MCP does not communicate with the collector; it only provides and validates the configuration.
TODOs
toolsets- depends on https://github.com/rhobs/obs-mcp/pull/29/changes#diff-6282104580579cc3339ea1cad644fac2a25a39e331bf5227027b252aa273475bR35Depends on: os-observability/redhat-opentelemetry-collector#135