Skip to content

Conversation

@dloucasfx
Copy link
Contributor

Description:
k8s integration test, if needed, will be in a different PR

Link to Splunk idea: <Link to Splunk idea, see https://ideas.splunk.com>

Testing:

Documentation:

Copilot AI review requested due to automatic review settings October 29, 2025 03:29
@dloucasfx dloucasfx requested review from a team as code owners October 29, 2025 03:29
@codecov
Copy link

codecov bot commented Oct 29, 2025

Codecov Report

❌ Patch coverage is 27.27273% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 37.94%. Comparing base (1e72bbe) to head (b6292d2).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
tests/testutils/golden.go 42.85% 3 Missing and 1 partial ⚠️
tests/testutils/testcase.go 0.00% 4 Missing ⚠️

❌ Your patch status has failed because the patch coverage (27.27%) is below the target coverage (85.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6884      +/-   ##
==========================================
- Coverage   37.95%   37.94%   -0.02%     
==========================================
  Files         367      367              
  Lines       25743    25751       +8     
==========================================
- Hits         9771     9770       -1     
- Misses      15161    15167       +6     
- Partials      811      814       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds Weaviate discovery support to the Splunk OpenTelemetry Collector, enabling automatic discovery and monitoring of Weaviate vector search engine instances.

Key changes:

  • Added Weaviate receiver discovery configuration with Prometheus metrics scraping
  • Added integration tests for Weaviate discovery via Docker observer
  • Fixed null pointer issue in test utilities for cases where HEC endpoint is not configured

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/testutils/testcase.go Added null check for HECEndpointForCollector to prevent panic when HEC is not configured
tests/testutils/golden.go Added helper function to conditionally update expected metrics based on environment variable
tests/receivers/weaviate/weaviate_discovery_test.go New integration test for Weaviate discovery using Docker observer
tests/receivers/weaviate/testdata/otlp_exporter.yaml Test configuration file for OTLP exporter
tests/receivers/weaviate/testdata/expected.yaml Expected metrics output for Weaviate discovery test
internal/receiver/discoveryreceiver/generated_metadata.go Added Weaviate receiver metadata with status matching rules
internal/confmapprovider/discovery/generated_bundledfs.go Registered Weaviate discovery bundle file
internal/confmapprovider/discovery/bundle.d/receivers/weaviate.discovery.yaml Discovery configuration for Weaviate with metric filtering rules
docker/docker-compose.yml Added Weaviate service container for integration testing
cmd/otelcol/config/collector/config.d.linux/receivers/weaviate.discovery.yaml Generated reference configuration for Weaviate discovery
cmd/discoverybundler/metadata/receivers/weaviate.yaml Source metadata file for Weaviate discovery configuration
Makefile Added integration test target for Weaviate discovery
.github/workflows/integration-test.yml Added Weaviate to CI integration test matrix
.chloggen/weaviate-discovery.yaml Changelog entry for the enhancement

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@signalfx signalfx deleted a comment from Copilot AI Oct 29, 2025
@signalfx signalfx deleted a comment from Copilot AI Oct 29, 2025
@dloucasfx dloucasfx requested a review from Copilot October 29, 2025 15:36
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@signalfx signalfx deleted a comment from Copilot AI Oct 29, 2025
@signalfx signalfx deleted a comment from Copilot AI Oct 29, 2025
@signalfx signalfx deleted a comment from Copilot AI Oct 29, 2025
Copilot AI review requested due to automatic review settings October 29, 2025 22:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Signed-off-by: Dani Louca <[email protected]>
Copilot AI review requested due to automatic review settings October 31, 2025 16:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

var shouldUpdateExpectedResults = func() bool {
return os.Getenv("UPDATE_EXPECTED_RESULTS") == "true"
Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

Inconsistent environment variable naming: this function uses UPDATE_EXPECTED_RESULTS while the existing similar function at line 166 uses UPDATE_EXPECTED. Consider using the same environment variable name for consistency across the codebase, or provide a clear comment explaining why different names are needed.

Suggested change
return os.Getenv("UPDATE_EXPECTED_RESULTS") == "true"
return os.Getenv("UPDATE_EXPECTED") == "true"

Copilot uses AI. Check for mistakes.
Comment on lines +27 to +28
"go.opentelemetry.io/collector/pdata/pmetric"

Copy link

Copilot AI Oct 31, 2025

Choose a reason for hiding this comment

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

[nitpick] The import go.opentelemetry.io/collector/pdata/pmetric should be grouped with other external imports (lines 29-32) rather than being separated by a blank line, as it's from the same opentelemetry ecosystem. This maintains consistency with Go's import grouping conventions.

Copilot uses AI. Check for mistakes.
Copilot AI review requested due to automatic review settings November 19, 2025 16:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

stringValue: v1.33.2
- key: goarch
value:
stringValue: arm64
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

The test uses pmetrictest.ChangeDatapointAttributeValue("goarch", func(string) string { return maskValue }) to change the goarch value to "xyz" during comparison. The expected.yaml should contain "xyz" instead of "arm64" to match the masked value used in the test.

Suggested change
stringValue: arm64
stringValue: xyz

Copilot uses AI. Check for mistakes.
attributes:
- key: nodeID
value:
stringValue: 529a617433bd
Copy link

Copilot AI Nov 19, 2025

Choose a reason for hiding this comment

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

The test uses pmetrictest.ChangeDatapointAttributeValue("nodeID", func(string) string { return maskValue }) to change the nodeID value to "xyz" during comparison. The expected.yaml should contain "xyz" instead of "529a617433bd" to match the masked value used in the test.

Suggested change
stringValue: 529a617433bd
stringValue: xyz

Copilot uses AI. Check for mistakes.
@pjanotti pjanotti merged commit d0dfb3d into main Nov 19, 2025
243 of 245 checks passed
@pjanotti pjanotti deleted the weaviate-discovery branch November 19, 2025 17:42
@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants