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

[oracledb] Max tablespace size may be unset #18670

Closed
atoulme opened this issue Feb 15, 2023 · 3 comments · Fixed by #18675
Closed

[oracledb] Max tablespace size may be unset #18670

atoulme opened this issue Feb 15, 2023 · 3 comments · Fixed by #18675
Labels
bug Something isn't working receiver/oracledb

Comments

@atoulme
Copy link
Contributor

atoulme commented Feb 15, 2023

Component(s)

receiver/oracledb

What happened?

Description

A database table space may be configured to have no max_extents, which translates to a null value when we calculate the max size of table space. This creates an issue when we scrape the metric as the string value returned is "".

We should aim to explicitly manage this use case, possibly by setting a -1 value instead or another approach that clearly indicates that the max value is set.

Collector version

0.71.0

Environment information

No response

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@atoulme atoulme added bug Something isn't working needs triage New item requiring triage receiver/oracledb and removed needs triage New item requiring triage labels Feb 15, 2023
@crobert-1
Copy link
Member

Can you explain what happens when it's an empty string, and how that negatively impacts the user?

The thought makes sense to mark it explicitly when it's not set, but I'm curious what the current impact is.

@atoulme
Copy link
Contributor Author

atoulme commented Feb 15, 2023

They get a scraping partial error, which indicates that there was a failure to retrieve the metric value:

Feb 09 08:40:06 cmtdb1d otelcol[100719]: 2023-02-09T08:40:06.763-0600       error       scraperhelper/scrapercontroller.go:212       Error scraping metrics       {"kind": "receiver", "name": "oracledb/2", "pipeline": "metrics", "error": "failed to parse int64 for OracledbTablespaceSizeLimit, value was : strconv.ParseInt: parsing \"\": invalid syntax", "scraper": "oracledb/2"}
Feb 09 08:40:06 cmtdb1d otelcol[100719]: go.opentelemetry.io/collector/receiver/scraperhelper.(*controller).scrapeMetricsAndReport
Feb 09 08:40:06 cmtdb1d otelcol[100719]: go.opentelemetry.io/[email protected]/receiver/scraperhelper/scrapercontroller.go:212
Feb 09 08:40:06 cmtdb1d otelcol[100719]: go.opentelemetry.io/collector/receiver/scraperhelper.(*controller).startScraping.func1
Feb 09 08:40:06 cmtdb1d otelcol[100719]: go.opentelemetry.io/[email protected]/receiver/scraperhelper/scrapercontroller.go:191
Feb 09 08:40:06 cmtdb1d otelcol[100719]: 2023-02-09T08:40:06.776-0600       error       scraperhelper/scrapercontroller.go:212       Error scraping metrics       {"kind": "receiver", "name": "oracledb/0", "pipeline": "metrics", "error": "failed to parse int64 for OracledbTablespaceSizeLimit, value was : strconv.ParseInt: parsing \"\": invalid syntax", "scraper": "oracledb/0"}
Feb 09 08:40:06 cmtdb1d otelcol[100719]: go.opentelemetry.io/collector/receiver/scraperhelper.(*controller).scrapeMetricsAndReport
Feb 09 08:40:06 cmtdb1d otelcol[100719]: go.opentelemetry.io/[email protected]/receiver/scraperhelper/scrapercontroller.go:212
Feb 09 08:40:06 cmtdb1d otelcol[100719]: go.opentelemetry.io/collector/receiver/scraperhelper.(*controller).startScraping.func1
Feb 09 08:40:06 cmtdb1d otelcol[100719]: go.opentelemetry.io/[email protected]/receiver/scraperhelper/scrapercontroller.go:191

@crobert-1
Copy link
Member

Good catch, thanks for including the error!

@atoulme atoulme changed the title [oracledb] Max tablespace size [oracledb] Max tablespace size may be unset Feb 15, 2023
codeboten pushed a commit that referenced this issue Feb 21, 2023
Rather than reporting an error, return -1 if the metric representing the tablespace max size is not set.

Link to tracking Issue:
Fixes #18670

---------

Co-authored-by: Evan Bradley <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working receiver/oracledb
Projects
None yet
2 participants