Skip to content

[receiver/oracledb] Adding 'oracledb.logons' metric #41067

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

Merged
merged 9 commits into from
Jul 22, 2025

Conversation

nenadnoveljic
Copy link
Contributor

Description

Adds the oracledb.logons metric to track logon operations. Logons can be costly and, in large numbers, may lead to CPU spikes and processing delays. I wrote more about this scenario here (optional read):

@nenadnoveljic nenadnoveljic marked this pull request as ready for review July 2, 2025 13:38
@nenadnoveljic nenadnoveljic requested a review from a team as a code owner July 2, 2025 13:38
@nenadnoveljic nenadnoveljic changed the title Adding 'oracledb.logons' metric [receiver/oracledb] Adding 'oracledb.logons' metric Jul 7, 2025
@@ -387,3 +387,13 @@ metrics:
value_type: int
input_type: string
unit: "{executions}"
oracledb.logons:
Copy link
Member

Choose a reason for hiding this comment

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

If we ever possible can have oracledb.logon.<something else> metric, this should be oracledb.logon.count. If not, this name is good.

See https://github.com/open-telemetry/semantic-conventions/blob/main/docs/general/naming.md#naming-rules-for-counters-and-updowncounters for more guidelines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We might add the following metrics later (based on v$statname):

  • oracledb.user_logons: only user logons operations (subset of oracledb.logons which counts also the background processes)
  • oracledb.current_logons: current number of logons to the DB

Both are count metrics. I can't imagine any non-count metrics in this namespaces. But let me know if you nevertheless prefer a separate namespace with count, e.g. oracledb.logon.count.

SQL> select name from v$statname where name like '%logon%';

NAME
----------------------------------------------------------------
logons cumulative
logons current
user logons cumulative

nenadnoveljic and others added 3 commits July 14, 2025 22:03
Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
@atoulme
Copy link
Contributor

atoulme commented Jul 16, 2025

Please address the conflict and mark ready for review again.

@atoulme atoulme marked this pull request as draft July 16, 2025 22:09
@nenadnoveljic nenadnoveljic marked this pull request as ready for review July 17, 2025 05:10
@andrzej-stencel andrzej-stencel removed their request for review July 22, 2025 12:52
@andrzej-stencel andrzej-stencel removed their assignment Jul 22, 2025
@dmitryax dmitryax merged commit 9c611f8 into open-telemetry:main Jul 22, 2025
190 checks passed
povilasv pushed a commit to coralogix/opentelemetry-collector-contrib that referenced this pull request Jul 29, 2025
…1067)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adds the `oracledb.logons` metric to track logon operations. Logons can
be costly and, in large numbers, may lead to CPU spikes and processing
delays. I wrote more about this scenario
[here](https://nenadnoveljic.com/blog/estimating-db-time-with-ash-logon-storm-pitfall/)
(optional read):

---------

Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
Dylan-M pushed a commit to Dylan-M/opentelemetry-collector-contrib that referenced this pull request Aug 5, 2025
…1067)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adds the `oracledb.logons` metric to track logon operations. Logons can
be costly and, in large numbers, may lead to CPU spikes and processing
delays. I wrote more about this scenario
[here](https://nenadnoveljic.com/blog/estimating-db-time-with-ash-logon-storm-pitfall/)
(optional read):

---------

Co-authored-by: Andrzej Stencel <andrzej.stencel@elastic.co>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants