Skip to content

[BUG] Clean up tracing#4793

Merged
drewkim merged 2 commits intomainfrom
drew/_bug_clean_up_tracing
Jun 10, 2025
Merged

[BUG] Clean up tracing#4793
drewkim merged 2 commits intomainfrom
drew/_bug_clean_up_tracing

Conversation

@drewkim
Copy link
Contributor

@drewkim drewkim commented Jun 9, 2025

Description of changes

Summarize the changes made by this PR.

Test plan

How are these changes tested?

  • Tests pass locally with pytest for python, yarn test for js, cargo test for rust

Documentation Changes

Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs section?

@github-actions
Copy link

github-actions bot commented Jun 9, 2025

Reviewer Checklist

Please leverage this checklist to ensure your code review is thorough before approving

Testing, Bugs, Errors, Logs, Documentation

  • Can you think of any use case in which the code does not behave as intended? Have they been tested?
  • Can you think of any inputs or external events that could break the code? Is user input validated and safe? Have they been tested?
  • If appropriate, are there adequate property based tests?
  • If appropriate, are there adequate unit tests?
  • Should any logging, debugging, tracing information be added or removed?
  • Are error messages user-friendly?
  • Have all documentation changes needed been made?
  • Have all non-obvious changes been commented?

System Compatibility

  • Are there any potential impacts on other parts of the system or backward compatibility?
  • Does this change intersect with any items on our roadmap, and if so, is there a plan for fitting them together?

Quality

  • Is this code of a unexpectedly high quality (Readability, Modularity, Intuitiveness)

Copy link
Contributor Author

drewkim commented Jun 9, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@drewkim drewkim marked this pull request as ready for review June 9, 2025 21:20
@propel-code-bot
Copy link
Contributor

propel-code-bot bot commented Jun 9, 2025

Tracing Configuration Cleanup and Bug Fixes

This PR refactors the tracing configuration in rust/tracing/src/init_tracer.rs by cleaning up filtering logic, fixing naming inconsistencies, and simplifying layer composition. It implements changes partially aligned with the earlier PR #4292 to improve tracing reliability across services and updates the filter lists by correcting service names and adding the 'billing' component.

Key Changes:
• Replaced 'hosted-frontend' with 'hosted_frontend' and added 'billing' in the tracing service filter list
• Simplified layer composition by combining filter logic and removing redundant per-module path filters
• Changed how tracing layers are composed in init_tracing: now merges layers using .and_then() for more robust subscriber configuration
• Tidied up comments and eliminated duplicated or obsolete code branches

Affected Areas:
• rust/tracing/src/init_tracer.rs
• Tracing configuration, filtering and initialization logic

This summary was automatically generated by @propel-code-bot

Copy link
Collaborator

@HammadB HammadB left a comment

Choose a reason for hiding this comment

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

LGTM but can we have @codetheweb TAL?

tracing_opentelemetry::OpenTelemetryLayer::new(tracer)
.with_filter(tracing_subscriber::filter::LevelFilter::TRACE)
.boxed()
tracing_opentelemetry::OpenTelemetryLayer::new(tracer).boxed()
Copy link
Collaborator

Choose a reason for hiding this comment

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

whats the default level here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The filter is defined in init_global_filter_layer() at TRACE

@drewkim drewkim requested a review from codetheweb June 10, 2025 16:23
@drewkim drewkim enabled auto-merge (squash) June 10, 2025 18:32
@drewkim drewkim merged commit f57a21f into main Jun 10, 2025
58 checks passed
Inventrohyder pushed a commit to Inventrohyder/chroma that referenced this pull request Aug 5, 2025
## Description of changes

_Summarize the changes made by this PR._

- Improvements & Bug fixes
- Implements elements of chroma-core#4292
to fix tracing on some services
- New functionality
  - 

## Test plan

_How are these changes tested?_

- [ ] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes

_Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
section](https://github.com/chroma-core/chroma/tree/main/docs/docs.trychroma.com)?_
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.

4 participants