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

Remove None from text that should be printed in console #827

Closed
wants to merge 1 commit into from

Conversation

hramezani
Copy link
Member

@hramezani hramezani commented Jan 29, 2025

@hramezani hramezani force-pushed the fix-console-exporter branch from 4044ed8 to 287d335 Compare January 29, 2025 14:41
Copy link

cloudflare-workers-and-pages bot commented Jan 29, 2025

Deploying logfire-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: c67a91c
Status: ✅  Deploy successful!
Preview URL: https://ce08672f.logfire-docs.pages.dev
Branch Preview URL: https://fix-console-exporter.logfire-docs.pages.dev

View logs

@alexmojaki
Copy link
Contributor

Needs a test, and should check isinstance(text, str) instead of just text is not None.

@hramezani hramezani force-pushed the fix-console-exporter branch 2 times, most recently from ece0f1d to 371e569 Compare January 29, 2025 15:29
@hramezani
Copy link
Member Author

Needs a test, and should check isinstance(text, str) instead of just text is not None.

Replaced with isinstance(text, str). I didn't add a test because I couldn't reproduce the problem. do you know how can I create such a span?

@alexmojaki
Copy link
Contributor

Not sure what exactly happened in the user's case, but this produces the error:

import logfire

logfire.configure(console=logfire.ConsoleOptions(verbose=True))

logfire.info('hi', **{'code.filepath': 3, 'code.lineno': None})

@hramezani hramezani force-pushed the fix-console-exporter branch from 371e569 to 7b402ff Compare January 29, 2025 16:16
@hramezani
Copy link
Member Author

Replaced by #831

@hramezani hramezani closed this Jan 30, 2025
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.

2 participants