Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/sqlserver] Emit correct database name resource attribute #35038

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

crobert-1
Copy link
Member

Description:

As explained in the bug description, the receiver was incorrectly setting the database name resource attribute based on the first row returned from the query. The returned rows may have different database names, which means metrics were being labeled as being from the wrong database.

Link to tracking Issue:
Fixes #35036

Testing:
Updated tests for new expected resource metrics. View changed testdata/ files to see changed output.

@mx-psi mx-psi merged commit e9b835f into open-telemetry:main Sep 6, 2024
180 checks passed
@github-actions github-actions bot added this to the next release milestone Sep 6, 2024
f7o pushed a commit to f7o/opentelemetry-collector-contrib that referenced this pull request Sep 12, 2024
…pen-telemetry#35038)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
As explained in the bug description, the receiver was incorrectly
setting the database name resource attribute based on the first row
returned from the query. The returned rows may have different database
names, which means metrics were being labeled as being from the wrong
database.

**Link to tracking Issue:** <Issue number if applicable>
Fixes
open-telemetry#35036

**Testing:** <Describe what testing was performed and which tests were
added.>
Updated tests for new expected resource metrics. View changed
`testdata/` files to see changed output.
jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this pull request Oct 4, 2024
…pen-telemetry#35038)

**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
As explained in the bug description, the receiver was incorrectly
setting the database name resource attribute based on the first row
returned from the query. The returned rows may have different database
names, which means metrics were being labeled as being from the wrong
database.

**Link to tracking Issue:** <Issue number if applicable>
Fixes
open-telemetry#35036

**Testing:** <Describe what testing was performed and which tests were
added.>
Updated tests for new expected resource metrics. View changed
`testdata/` files to see changed output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
receiver/sqlserver Run Windows Enable running windows test on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[receiver/sqlserver] Metrics emitted with incorrect resource attributes
3 participants