Skip to content

Add SQL Server OTel input package#17429

Draft
teresaromero wants to merge 4 commits intoelastic:mainfrom
teresaromero:17152-sql-server-input-otel
Draft

Add SQL Server OTel input package#17429
teresaromero wants to merge 4 commits intoelastic:mainfrom
teresaromero:17152-sql-server-input-otel

Conversation

@teresaromero
Copy link
Contributor

@teresaromero teresaromero commented Feb 16, 2026

Proposed commit message

Add SQL Server OpenTelemetry input package (sql_server_input_otel).

WHAT: New input package that enables collection of SQL Server metrics using the OpenTelemetry Collector's sqlserverreceiver. The package provides configuration support for the receiver: connection settings (server, port, username, password), instance settings (instance_name, computer_name), collection settings (interval, initial delay), query sample collection, and top query collection. Includes Docker test environment (MSSQL 2019), policy tests, system test (skipped for CI), input template (input.yml.hbs), manifest, docs, and changelog.

WHY: To allow users to collect SQL Server metrics via the Elastic Agent with the EDOT Collector using the standard OpenTelemetry SQL Server receiver, with a supported input package.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Author's Checklist

  • elastic-package lint passes locally
  • Policy test files (test-default, test-default-vars) and expected outputs are included
  • System test is skipped with reason (SQL Server licensing in CI)
  • CODEOWNERS entry for @elastic/ecosystem (to be added separately or by maintainers)

How to test this PR locally

  1. Clone and check out this branch
  2. Run elastic-package lint from the packages/sql_server_input_otel directory:
    cd packages/sql_server_input_otel
    elastic-package lint
    
  3. To run tests (requires a running Elastic Stack):
    elastic-package stack up -v -d
    elastic-package test
    
  4. System tests are skipped by default since SQL Server requires a licensed container.

Related issues

Screenshots

N/A - This is an input-only package with no dashboards.

Made with Cursor

Add SQL Server OpenTelemetry input package (sql_server_input_otel).

WHAT: New input package that enables collection of SQL Server metrics using
the OpenTelemetry Collector's sqlserverreceiver. The package provides
configuration support for the receiver: connection settings (server, port,
username, password), instance settings (instance_name, computer_name),
collection settings (interval, initial delay), query sample collection, and
top query collection. Includes Docker test environment (MSSQL 2019), policy
tests, system test (skipped for CI), input template (input.yml.hbs),
manifest, docs, and changelog.

WHY: To allow users to collect SQL Server metrics via the Elastic Agent with
the EDOT Collector using the standard OpenTelemetry SQL Server receiver, with
a supported input package.

Co-authored-by: Cursor <cursoragent@cursor.com>
@teresaromero teresaromero requested a review from a team as a code owner February 16, 2026 14:11
@teresaromero teresaromero added the enhancement New feature or request label Feb 16, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

Vale Linting Results

Summary: 1 suggestion found

💡 Suggestions (1)
File Line Rule Message
packages/sql_server_input_otel/docs/README.md 40 Elastic.WordChoice Consider using 'deactivated, deselected, hidden, turned off, unavailable' instead of 'disabled', unless the term is in the UI.

The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

The package looks well-structured and follows the OTel input package conventions. The linter passes and policy test configurations appear correct.

Two minor items flagged via inline comments:

  1. Changelog link should reference this PR (#17429), not the related issue
  2. System test config may need the service: field for proper docker-compose integration

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@teresaromero
Copy link
Contributor Author

@claude address pr review comments and vale linting suggestions. Include the package and codeowner into the .CODEOWNERS file

@github-actions
Copy link
Contributor

github-actions bot commented Feb 16, 2026

Claude finished @teresaromero's task in 1m 21s —— View job


Addressing PR Review Comments and Vale Linting

All requested changes have been addressed and pushed:

  • Fix Vale linting suggestions (replace "in order to" with "to" in both README files)
  • Fix changelog link to point to PR Add SQL Server OTel input package #17429 instead of issue Create Input Package: SQL Server receiver #17152
  • Add service: field to system test config for docker-compose integration
  • Add CODEOWNERS entry for /packages/sql_server_input_otel with @elastic/ecosystem (matching the pattern used by other OTel input packages)
  • Commit and push changes

Changes committed in 207b7bd.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.
|

github-actions bot added a commit that referenced this pull request Feb 16, 2026
- Fix Vale linting: replace "in order to" with "to" in README docs
- Update changelog link to reference PR #17429 instead of issue #17152
- Add service field to system test config for docker-compose integration
- Add CODEOWNERS entry for sql_server_input_otel package (@elastic/ecosystem)

Co-authored-by: Tere <teresaromero@users.noreply.github.com>
- Fix Vale linting: replace "in order to" with "to" in README docs
- Update changelog link to reference PR elastic#17429 instead of issue elastic#17152
- Add service field to system test config for docker-compose integration
- Add CODEOWNERS entry for sql_server_input_otel package (@elastic/ecosystem)

Co-authored-by: Tere <teresaromero@users.noreply.github.com>
Comment on lines +30 to +31
pipelines:
metrics:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This receiver also produces logs https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/sqlserverreceiver#logs

Would it be required to include that other signal here too?

- Updated the description to include log collection capabilities.
- Bumped Kibana version requirement from 9.2.0 to 9.4.0.
- Added configuration options for enabling query sample and top query events.
- Updated policy templates and test configurations to support new log event features.
- Enhanced documentation to reflect the new log collection capabilities.

Co-authored-by: Tere <teresaromero@users.noreply.github.com>
@teresaromero teresaromero marked this pull request as draft February 16, 2026 15:47
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

The elastic-package lint command fails due to a mismatch between docs/README.md and its source file _dev/build/docs/README.md. The Logs reference section was added to docs/README.md directly, but it should be in _dev/build/docs/README.md (the source), then regenerated via elastic-package build.

After applying the suggested fix, run:

elastic-package build

to regenerate docs/README.md from the source template.

Note: The unresolved thread on input.yml.hbs regarding logs pipeline appears to be addressed—the logs pipeline is now included in both the template and expected outputs.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.


## Metrics reference

For a complete list of all available metrics and their detailed descriptions, refer to the [SQL Server Receiver documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/sqlserverreceiver/documentation.md) in the upstream OpenTelemetry Collector repository.
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 CRITICAL Missing Logs reference section causes lint failure

Why: elastic-package lint fails because docs/README.md has content not in the source file. The Logs reference section should be in _dev/build/docs/README.md, not docs/README.md (which is auto-generated).

Suggested change
For a complete list of all available metrics and their detailed descriptions, refer to the [SQL Server Receiver documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/sqlserverreceiver/documentation.md) in the upstream OpenTelemetry Collector repository.
For a complete list of all available metrics and their detailed descriptions, refer to the [SQL Server Receiver documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/sqlserverreceiver/documentation.md) in the upstream OpenTelemetry Collector repository.
## Logs reference
The SQL Server receiver can collect log events when a direct database connection is configured. Two event types are available, both disabled by default:
- **Query Sample Events** (`db.server.query_sample`): Captures currently executing queries at scrape time, including session details, wait information, and resource consumption. Enable by setting **Enable Query Sample Events** to `true`.
- **Top Query Events** (`db.server.top_query`): Captures the most expensive queries by execution time within a configurable lookback window, including execution counts, CPU time, and logical reads. Enable by setting **Enable Top Query Events** to `true`.
Both event types require a direct database connection (server, port, username, and password must be configured). The `query_sample_collection` and `top_query_collection` settings control the behavior of each event type.
For a complete list of log attributes, refer to the [SQL Server Receiver logs documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/receiver/sqlserverreceiver/logs-documentation.md) in the upstream OpenTelemetry Collector repository.

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

- Added dynamic signal types to the manifest for improved configuration.
- Updated policy tests to include new log statement configurations for SQL Server metrics.
- Enhanced expected output permissions to accommodate log collection capabilities.

Co-authored-by: Tere <teresaromero@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

In addition to the existing unresolved thread about the missing Logs reference section in _dev/build/docs/README.md, I found a build-blocking issue:

The dynamic_signal_types: true field in the manifest is invalid. Running elastic-package build fails with:

Error: building package failed: invalid content found in built zip package: found 1 validation error:
   1. file "manifest.yml" is invalid: field policy_templates.0: Additional property dynamic_signal_types is not allowed

This field does not exist in the package specification and is not used by any other package in the repository. It should be removed or replaced with valid fields.

Note: The @mrodm comment about logs support in input.yml.hbs appears to have been addressed — the logs pipeline is now included in lines 39-41.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

description: Collect SQL Server metrics using OpenTelemetry Collector
input: otelcol
template_path: input.yml.hbs
dynamic_signal_types: true
Copy link
Contributor

Choose a reason for hiding this comment

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

🔴 CRITICAL Invalid manifest field causes build failure

Why: elastic-package build fails with 'Additional property dynamic_signal_types is not allowed'. This field does not exist in the package specification and no other packages use it.

Suggested change
dynamic_signal_types: true
template_path: input.yml.hbs
vars:

Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@elasticmachine
Copy link

elasticmachine commented Feb 16, 2026

💔 Build Failed

Failed CI Steps

History

@andrewkroh andrewkroh added New Integration Issue or pull request for creating a new integration package. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. labels Feb 16, 2026
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

The two critical blocking issues from prior reviews remain unresolved:

  1. manifest.yml:30 - dynamic_signal_types: true is not a valid field in the package specification. elastic-package build fails with: Additional property dynamic_signal_types is not allowed. Remove this field.

  2. _dev/build/docs/README.md - The Logs reference section exists in docs/README.md but is missing from the source file _dev/build/docs/README.md. Copy the Logs reference section to the source file, then run elastic-package build to regenerate.

Note: The review thread on input.yml.hbs regarding logs support appears to have been addressed—the logs pipeline is now included (lines 39-41). Consider replying to that thread to mark it resolved.


Why is Claude responding? | Type @claude to interact further

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

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

Labels

documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request New Integration Issue or pull request for creating a new integration package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Input Package: SQL Server receiver

4 participants