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

The type signature for get_metrics_data() says return type should never be None (but it can be) #4047

Closed
ocelotl opened this issue Jul 11, 2024 · 6 comments · Fixed by #4186

Comments

@ocelotl
Copy link
Contributor

ocelotl commented Jul 11, 2024

          The type signature for `get_metrics_data()` says return type should never be None https://github.com/open-telemetry/opentelemetry-python/blob/f1bebffbc429b4e9b3a77eb61f5aa2a7651c4beb/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py#L405-L407

Originally posted by @aabmass in #3978 (comment)

@ocelotl ocelotl changed the title The type signature for get_metrics_data() says return type should never be None https://github.com/open-telemetry/opentelemetry-python/blob/f1bebffbc429b4e9b3a77eb61f5aa2a7651c4beb/opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/export/__init__.py#L405-L407 The type signature for get_metrics_data() says return type should never be None (but it can be) Jul 11, 2024
@ocelotl ocelotl self-assigned this Jul 11, 2024
@aabmass
Copy link
Member

aabmass commented Jul 12, 2024

When can it be None @ocelotl ? Would appreciate a link to the broken code or repro

@ocelotl ocelotl removed their assignment Sep 3, 2024
@Ali-Alnosairi
Copy link
Contributor

Can I take this ?

@xrmx
Copy link
Contributor

xrmx commented Sep 10, 2024

@Ali-Alnosairi no need to ask on 6 different issues, pick one and eventually open a PR.

@Ali-Alnosairi
Copy link
Contributor

Ali-Alnosairi commented Sep 12, 2024

Hi @ocelotl , @lzchen,
How to reproduce the issue ?
I need to reproduce the issue , so I can fix it
would someone help please!

@emdneto
Copy link
Member

emdneto commented Sep 13, 2024

Hey @Ali-Alnosairi:
Some issues will require discovery/code reading to determine what to do. Not all issues have an easy repro snippet that you can use to reproduce. In that case, I suggest you read the thread and understand the discussion. If you take a look, you will notice there is a test asserting that metrics_data is None.

@ocelotl
Copy link
Contributor Author

ocelotl commented Sep 16, 2024

When can it be None @ocelotl ? Would appreciate a link to the broken code or repro

There are a couple of ways this can happen, PTAL in #4190

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants