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

Don't create event tables unless TRULENS_OTEL_TRACING env variable is set. #1724

Merged

Conversation

sfc-gh-dkurokawa
Copy link
Contributor

@sfc-gh-dkurokawa sfc-gh-dkurokawa commented Jan 15, 2025

Description

Don't create event tables unless TRULENS_OTEL_TRACING env variable is set.

Currently things are broken for dialects that don't handle JSON which include Snowflake and possibly other stuff.

Other details good to know for developers

Type of change

  • 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)
  • New Tests
  • This change includes re-generated golden test results
  • This change requires a documentation update

Important

Event tables are conditionally created based on TRULENS_OTEL_TRACING environment variable to fix JSON dialect issues.

  • Behavior:
    • Event tables are only created if TRULENS_OTEL_TRACING environment variable is set to "1" or "true" in 10_create_event_table.py.
    • Fixes issues with database dialects that do not support JSON, such as Snowflake.
  • Testing:
    • Sets TRULENS_OTEL_TRACING to "1" in setUpClass of TestOtelInstrument in test_otel_instrument.py.
  • Utilities:
    • Adds check for model_fields having items attribute in get_class_members in utils.py to handle Pydantic models.

This description was created by Ellipsis for d420a17. It will automatically update as commits are pushed.

@dosubot dosubot bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jan 15, 2025
@sfc-gh-dkurokawa sfc-gh-dkurokawa enabled auto-merge (squash) January 15, 2025 21:46
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jan 15, 2025
…y` that can resolve to a `dict` when there's nothing.
…de' into davidkurokawa/dont_use_events_table_in_snowflake
…ble_in_snowflake' into davidkurokawa/dont_use_events_table_in_snowflake
@sfc-gh-dkurokawa sfc-gh-dkurokawa merged commit 8f59d7a into main Jan 16, 2025
9 of 10 checks passed
@sfc-gh-dkurokawa sfc-gh-dkurokawa deleted the davidkurokawa/dont_use_events_table_in_snowflake branch January 16, 2025 04:44
@sfc-gh-jreini sfc-gh-jreini mentioned this pull request Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants