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

Add attribute name to type warning message. #3124

Merged
merged 5 commits into from
Jan 12, 2023
Merged

Add attribute name to type warning message. #3124

merged 5 commits into from
Jan 12, 2023

Conversation

aebrahim
Copy link
Contributor

Without this, the error message simply specifies that some attribute has the incorrect type, but this is very difficult to debug without knowing which attribute it was.

For example, my google cloud run logs are littered with this line;

[__init__:99]: Invalid type NoneType for attribute value. Expected one of ['bool', 'str', 'bytes', 'int', 'float'] or a sequence of those types

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Loggin format

Does This PR Require a Contrib Repo Change?

No

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Without this, the error message simply specifies that some attribute has the incorrect type, but this is very difficult to debug without knowing which attribute it was.
@aebrahim aebrahim requested a review from a team January 10, 2023 06:38
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Jan 10, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: aebrahim / name: Ali Ebrahim (3cc55d0)

Copy link
Member

@srikanthccv srikanthccv left a comment

Choose a reason for hiding this comment

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

Please sign the CLA and add CHANGELOG entry

@aebrahim
Copy link
Contributor Author

Done! Thanks

@srikanthccv srikanthccv enabled auto-merge (squash) January 12, 2023 22:32
@srikanthccv srikanthccv merged commit 090efb4 into open-telemetry:main Jan 12, 2023
keithkroeger added a commit to fidelity-contributions/open-telemetry-opentelemetry-python that referenced this pull request Jan 13, 2023
* main:
  fixed all instances of @tracer.start_as_current_span("name"): to @tracer.start_as_current_span("name") as decorators do not have colons (open-telemetry#3127)
  Add attribute name to type warning message. (open-telemetry#3124)
  Fix requirements file for example (open-telemetry#3126)
  Add db metric name to semantic conventions (open-telemetry#3115)
  Adds environment variables for log exporter (open-telemetry#3037)
  Fix bug in example (open-telemetry#3111)
@aebrahim aebrahim deleted the patch-1 branch January 13, 2023 21:58
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