Skip to content

pmdaopentelemetry: new pmda for opentelemetry metrics #2197

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lmchilton
Copy link
Contributor

Addition of OpenTelemetry PMDA - domain num 88. Supports ingestion of OpenTelemetry data and conversion to PCP metrics. PMDA supports dynamic metric addition and removal congruent to source entries in the configuration directory. Relevent QA tests were added. Addition
and update of new pmdaopentelemetry manpage.

@wcohen
Copy link
Contributor

wcohen commented May 7, 2025

Some of the python code can be cleaned up according to pylint:

$ pylint src/pmdas/opentelemetry/pmdaopentelemetry.python
************* Module pmdaopentelemetry
src/pmdas/opentelemetry/pmdaopentelemetry.python:106:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens)
src/pmdas/opentelemetry/pmdaopentelemetry.python:466:0: C0325: Unnecessary parens after '=' keyword (superfluous-parens)
src/pmdas/opentelemetry/pmdaopentelemetry.python:612:0: W0311: Bad indentation. Found 28 spaces, expected 24 (bad-indentation)
src/pmdas/opentelemetry/pmdaopentelemetry.python:614:0: W0311: Bad indentation. Found 28 spaces, expected 24 (bad-indentation)
src/pmdas/opentelemetry/pmdaopentelemetry.python:616:0: W0311: Bad indentation. Found 28 spaces, expected 24 (bad-indentation)
src/pmdas/opentelemetry/pmdaopentelemetry.python:703:65: C0303: Trailing whitespace (trailing-whitespace)
src/pmdas/opentelemetry/pmdaopentelemetry.python:89:4: R0917: Too many positional arguments (7/5) (too-many-positional-arguments)
src/pmdas/opentelemetry/pmdaopentelemetry.python:134:37: W0622: Redefining built-in 'type' (redefined-builtin)
src/pmdas/opentelemetry/pmdaopentelemetry.python:173:13: R1714: Consider merging these comparisons with 'in' by using 'type in ('histogram', 'summary')'. Use a set instead if elements are hashable. (consider-using-in)
src/pmdas/opentelemetry/pmdaopentelemetry.python:346:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
src/pmdas/opentelemetry/pmdaopentelemetry.python:454:8: W0612: Unused variable 'mvalue' (unused-variable)
src/pmdas/opentelemetry/pmdaopentelemetry.python:606:19: C0121: Comparison 'metric_dict['is_hist'] == True' should be 'metric_dict['is_hist'] is True' if checking for the singleton value True, or 'bool(metric_dict['is_hist'])' if testing for truthiness (singleton-comparison)
src/pmdas/opentelemetry/pmdaopentelemetry.python:606:53: C0121: Comparison 'metric_dict['is_sum'] == True' should be 'metric_dict['is_sum'] is True' if checking for the singleton value True, or 'bool(metric_dict['is_sum'])' if testing for truthiness (singleton-comparison)
src/pmdas/opentelemetry/pmdaopentelemetry.python:611:23: R1714: Consider merging these comparisons with 'in' by using 'key in ('values', 'instances')'. Use a set instead if elements are hashable. (consider-using-in)
src/pmdas/opentelemetry/pmdaopentelemetry.python:644:23: C0121: Comparison 'hist_flag == False' should be 'hist_flag is False' if checking for the singleton value False, or 'not hist_flag' if testing for falsiness (singleton-comparison)
src/pmdas/opentelemetry/pmdaopentelemetry.python:649:19: C0121: Comparison 'hist_flag == True' should be 'hist_flag is True' if checking for the singleton value True, or 'hist_flag' if testing for truthiness (singleton-comparison)
src/pmdas/opentelemetry/pmdaopentelemetry.python:916:4: R0917: Too many positional arguments (8/5) (too-many-positional-arguments)
src/pmdas/opentelemetry/pmdaopentelemetry.python:36:0: W0611: Unused import json (unused-import)


Your code has been rated at 9.81/10

$ pylint qa/opentelemetry/opentelemetry_endpoint.python
************* Module opentelemetry_endpoint
qa/opentelemetry/opentelemetry_endpoint.python:42:0: C0301: Line too long (125/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:43:0: C0301: Line too long (657/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:66:0: C0301: Line too long (128/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:67:0: C0301: Line too long (811/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:92:0: C0301: Line too long (131/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:95:0: C0301: Line too long (626/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:103:0: C0301: Line too long (149/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:115:0: C0301: Line too long (168/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:118:0: C0301: Line too long (656/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:137:0: C0301: Line too long (123/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:142:0: C0301: Line too long (125/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:147:0: C0301: Line too long (125/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:153:0: C0301: Line too long (127/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:170:0: C0301: Line too long (145/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:176:0: C0301: Line too long (252/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:238:0: C0301: Line too long (129/120) (line-too-long)
qa/opentelemetry/opentelemetry_endpoint.python:27:17: R1735: Consider using '{}' instead of a call to 'dict'. (use-dict-literal)
qa/opentelemetry/opentelemetry_endpoint.python:30:28: W0621: Redefining name 'args' from outer scope (line 245) (redefined-outer-name)
qa/opentelemetry/opentelemetry_endpoint.python:30:39: W0621: Redefining name 'endpoint' from outer scope (line 255) (redefined-outer-name)
qa/opentelemetry/opentelemetry_endpoint.python:133:4: R0913: Too many arguments (6/5) (too-many-arguments)
qa/opentelemetry/opentelemetry_endpoint.python:133:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
qa/opentelemetry/opentelemetry_endpoint.python:163:4: R1711: Useless return at end of function or method (useless-return)
qa/opentelemetry/opentelemetry_endpoint.python:196:36: W0621: Redefining name 'args' from outer scope (line 245) (redefined-outer-name)
qa/opentelemetry/opentelemetry_endpoint.python:207:12: W0621: Redefining name 'endpoint' from outer scope (line 255) (redefined-outer-name)
qa/opentelemetry/opentelemetry_endpoint.python:240:4: W0621: Redefining name 'args' from outer scope (line 245) (redefined-outer-name)


Your code has been rated at 8.86/10

@lmchilton lmchilton force-pushed the otelpmda branch 4 times, most recently from 29951d4 to 35e1901 Compare June 6, 2025 19:15
HDB 88
=======
>>>>>>> 29951d497 (pmdaopentelemetry: new pmda for otel metrics)
Copy link
Member

Choose a reason for hiding this comment

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

@lmchilton this failed merge snippet is the reason all the CI checks are failing. You want to keep the HDB line and drop the <<<===>>> lines, then CI will proceed further.

Addition of OpenTelemetry PMDA - domain num
164. Supports ingestion of OpenTelemetry
data and conversion to PCP metrics. PMDA
supports dynamic metric addition and
removal congruent to source entries in the
configuration directory. Relevent QA tests
were added. Addition and update of new
pmdaopentelemetry manpage. Updated spec files
with new package info.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants