Skip to content

Receiver/sqlserver failing to handle large values #39989

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

Closed
Oasis-MS opened this issue May 9, 2025 · 2 comments
Closed

Receiver/sqlserver failing to handle large values #39989

Oasis-MS opened this issue May 9, 2025 · 2 comments
Labels
bug Something isn't working needs triage New item requiring triage receiver/sqlserver

Comments

@Oasis-MS
Copy link

Oasis-MS commented May 9, 2025

Component(s)

receiver/sqlserver

What happened?

Description

This receiver is continuously failing to collect metrics (possibly) due to large INT values being converted into Float using scientific notation.

Steps to Reproduce

Tested with a tempdb sized 40681152KB.
Receiver configured in the most basic manner possible, and confirmed connections OK.

Expected Result

Expected receiver to scrape standard default metrics.
Expected to parse INT: "40681152"

Actual Result

Collection attempt failed, with repeated events in Windows Log.
Receiver is attempting to parse: "4.068064e+07"

Collector version

0.125.0

Environment information

Environment

OS: Windows 2022 DataCenter
Compiler(if manually compiled): go 1.23.0

OpenTelemetry Collector configuration

sqlserver:
    collection_interval: 30s
    datasource: sqlserver://localhost?integratedSecurity=true
    metrics:
      sqlserver.user.connection.count:
        enabled: true

Log output

2025-05-09T13:45:12.608-0700	error	[email protected]/obs_metrics.go:61	Error scraping metrics	{"otelcol.component.id": "sqlserver", "otelcol.component.kind": "receiver", "otelcol.signal": "metrics", "error": "failed to parse valueKey for row 771: strconv.ParseInt: parsing \"4.068064e+07\": invalid syntax in Free Space in tempdb (KB)"}
go.opentelemetry.io/collector/scraper/scraperhelper.wrapObsMetrics.func1
	go.opentelemetry.io/collector/scraper/[email protected]/obs_metrics.go:61
go.opentelemetry.io/collector/scraper.ScrapeMetricsFunc.ScrapeMetrics
	go.opentelemetry.io/collector/[email protected]/metrics.go:24
go.opentelemetry.io/collector/scraper/scraperhelper.scrapeMetrics
	go.opentelemetry.io/collector/scraper/[email protected]/controller.go:256
go.opentelemetry.io/collector/scraper/scraperhelper.NewMetricsController.func1
	go.opentelemetry.io/collector/scraper/[email protected]/controller.go:228
go.opentelemetry.io/collector/scraper/scraperhelper.(*controller[...]).startScraping.func1
	go.opentelemetry.io/collector/scraper/[email protected]/controller.go:175

Additional context

Might have an issue on LINE 331 or 833 in scraper.go

@Oasis-MS Oasis-MS added bug Something isn't working needs triage New item requiring triage labels May 9, 2025
Copy link
Contributor

github-actions bot commented May 9, 2025

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@crobert-1
Copy link
Member

Hello @Oasis-MS, thanks for filing! This was recently fixed as a part of #39124. The fix should be included in the next release, but please reach out if it continues to fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/sqlserver
Projects
None yet
Development

No branches or pull requests

2 participants