Skip to content

Add documentation for .otignore feature (OT-1318)#16

Merged
stephenbryant-opentrace merged 7 commits intomainfrom
docs/ot-1318-otignore-documentation
Feb 6, 2026
Merged

Add documentation for .otignore feature (OT-1318)#16
stephenbryant-opentrace merged 7 commits intomainfrom
docs/ot-1318-otignore-documentation

Conversation

@stephenbryant-opentrace
Copy link
Contributor

@stephenbryant-opentrace stephenbryant-opentrace commented Feb 6, 2026

Overview

This merge request introduces comprehensive documentation for the .otignore and .opentraceignore files. These files empower users to exclude specific files and directories from OpenTrace analysis, offering granular control over the scan scope. The new documentation provides clear guidance on configuration, pattern syntax, and best practices to ensure users can effectively utilize this feature.

This version incorporates all feedback from the initial review to improve the clarity, correctness, and organization of the content.

Technical Details

  • docs/otignore.md (Added)

    • A new, comprehensive guide detailing the .otignore feature, its purpose, and usage.
    • Covers configuration, pattern syntax (including wildcards and negation), troubleshooting, and best practices.
    • Correction: An incorrect example regarding the re-inclusion of files from excluded directories has been corrected. The documentation now clarifies that directory contents should be ignored (**/testdata/**) rather than the directory itself (**/testdata/), aligning with standard .gitignore behavior.
    • Refinement: A non-standard and potentially confusing .Python pattern example was removed.
  • mkdocs.yml (Modified)

    • The site navigation has been updated to include the new "Excluding Files" documentation page.
    • Improvement: The link was relocated from "Data Sources" to a more discoverable top-level position under "Integrations" to reflect its cross-cutting nature.
  • docs/integrations/github.md (Modified)

    • The GitHub and GitLab integration documents have been updated to reference the new .otignore functionality, ensuring users are aware of the feature within their integration context.

Review Summary

This revision successfully addresses all feedback from the previous review cycle.

  • Approval Status: Approved.
  • Key Findings & Required Changes Addressed:
    1. Corrected Re-Inclusion Logic: The documentation no longer suggests that a file can be re-included if its parent directory is excluded.
    2. Improved Navigation: The "Excluding Files" page is now correctly positioned under "Integrations" in mkdocs.yml for better discoverability.
    3. Removed Confusing Pattern: The ambiguous .Python example has been removed from docs/otignore.md to prevent user confusion.

Impact Assessment

  • Security: No security impact. This is a documentation-only change.
  • Performance: No performance impact.
  • Maintainability: Improves maintainability by providing clear, accurate, and comprehensive user-facing documentation, which is expected to reduce support inquiries.

Relates to: OT-1318, OT-1364


Attached by run j-3a43e284-a44c-4580-be10-dbd56ae03614

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

📚 Documentation Preview

Preview deployed to: https://opentrace.github.io/docs/preview/16-merge/

Copy link
Contributor

@opentrace opentrace bot left a comment

Choose a reason for hiding this comment

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

Approved

Copy link
Contributor

@opentrace opentrace bot left a comment

Choose a reason for hiding this comment

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

Review completed via automated analysis.

docs/otignore.md Outdated
**/__mocks__/

# But keep test code
!**/*_test.go
Copy link
Contributor

Choose a reason for hiding this comment

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

SUGGESTION: This example for re-including test files is misleading. According to gitignore pattern rules, it is not possible to re-include a file if one of its parent directories is excluded.

Since directories like **/fixtures/ and **/testdata/ are excluded on lines 240-241, the negation patterns on lines 248-249 will have no effect for any files inside those directories.

To make this work, you would need a more complex set of patterns, or you should clarify this limitation. For example, you could explain that users should exclude file contents (**/testdata/**) rather than the directory itself (**/testdata/) if they intend to re-include specific files from within it.

@opentrace
Copy link
Contributor

opentrace bot commented Feb 6, 2026

This merge request adds comprehensive and valuable documentation for the .otignore feature. The changes are well-documented, verified against the implementation, and improve user understanding of the feature. It is a low-risk, high-value addition to the codebase.


Attached by run j-7428cc35-25b2-4aff-97bc-a00765deaafb

Comprehensive documentation for the .otignore and .opentraceignore files
that allow users to exclude files and directories from OpenTrace analysis.

## Changes
- Add docs/otignore.md with complete feature documentation
- Update mkdocs.yml navigation to include "Excluding Files" section

## Documentation Includes
- Overview and comparison with .gitignore
- Quick start guide
- Pattern syntax reference with examples
- Common use cases (generated code, dependencies, test fixtures)
- Troubleshooting guide
- Technical implementation details
- Best practices

## Verification
All documentation verified against implementation in:
- insight-agent/src/source_analyzers/sources/otignore.py
- insight-agent/src/source_analyzers/sources/directory/parser.py
- insight-agent/src/source_analyzers/sources/code/parser.py
- Unit and integration tests

Relates to: OT-1318, OT-1364

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copy link
Contributor

@opentrace opentrace bot left a comment

Choose a reason for hiding this comment

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

Review completed via automated analysis.

docs/otignore.md Outdated
**/__mocks__/

# But keep test code
!**/*_test.go
Copy link
Contributor

Choose a reason for hiding this comment

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

SUGGESTION: This example for re-including test files is misleading. According to gitignore pattern rules, it is not possible to re-include a file if one of its parent directories is excluded.

Since directories like **/fixtures/ and **/testdata/ are excluded on lines 240-241, the negation patterns on lines 248-249 will have no effect for any files inside those directories.

To make this work, you would need a more complex set of patterns, or you should clarify this limitation. For example, you could explain that users should exclude file contents (**/testdata/**) rather than the directory itself (**/testdata/) if they intend to re-include specific files from within it.

@opentrace
Copy link
Contributor

opentrace bot commented Feb 6, 2026

Rejecting based on the 'Key Findings & Suggestions' in the review summary. The summary notes a misleading example regarding the re-inclusion of files from an excluded parent directory. Please update the documentation to clarify this limitation as recommended before this can be approved.


Attached by run j-7c92296f-b01f-4f4f-b9c3-6d4e0a335dad

- Add reference to Excluding Files page in 'What Gets Synced' sections
- Helps users discover how to exclude files from analysis
Copy link
Contributor

@opentrace opentrace bot left a comment

Choose a reason for hiding this comment

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

I've reviewed the new documentation for the .otignore feature. The changes look good overall, adding helpful links from the GitHub and GitLab integration pages to the new, comprehensive guide.

I left a couple of minor suggestions. In the new otignore.md file, there's a pattern in the Python example that might be confusing, so I pointed that out. I also suggested a small tweak to the site navigation in mkdocs.yml to make the new "Excluding Files" page easier to find.

The core documentation for .otignore is well-written and thorough. No major issues found.


Attached by run j-73adb884-d365-4818-898f-98c27e7433a5

*.pyc
*.pyo
*.pyd
.Python
Copy link
Contributor

Choose a reason for hiding this comment

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

OBSERVATION: The pattern .Python is not a standard Python-related file or directory that is typically ignored. It might be a typo or a very specific convention. If it's not a typo, it could be confusing for users. Standard patterns usually include __pycache__/, *.pyc, and virtual environment folders like venv/. Consider removing this line if it's not a common pattern to avoid confusion.

mkdocs.yml Outdated
- GitHub: integrations/github.md
- GitLab: integrations/gitlab.md
- AWS EKS (Early Access): integrations/aws-eks.md
- Excluding Files: otignore.md
Copy link
Contributor

Choose a reason for hiding this comment

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

SUGGESTION: The "Excluding Files" documentation is a general feature that applies to multiple data sources, not a data source itself. Placing it under the "Data Sources" section might be confusing.

Consider moving it up to be a direct child of "Integrations" to make it more discoverable and reflect its cross-cutting nature. For example:

  - Integrations:
    - Overview: integrations/index.md
    - Excluding Files: otignore.md
    - AI Assistants:
      ...
    - Data Sources:
      ...

@opentrace
Copy link
Contributor

opentrace bot commented Feb 6, 2026

The merge request is being rejected because the review summary indicates that the new documentation (docs/otignore.md) contains a misleading example regarding the re-inclusion of files. As stated in the summary, the documentation needs to be corrected to align with standard .gitignore behavior, clarifying that a file cannot be re-included if its parent directory is excluded. The recommended changes must be implemented before this can be approved.


Attached by run j-73adb884-d365-4818-898f-98c27e7433a5

Stephen Bryant added 5 commits February 6, 2026 14:57
… their parent directories are already excluded
…files not being visible unless they're committed. It's not the same thing, and is already covered elsewhere.
- Add 'Default Exclusions' section listing always-excluded directories
- Explains that .git, node_modules, build, etc. are automatically skipped
- Notes that default exclusions work alongside custom .otignore patterns
- Adds rationale for why these directories are excluded by default
@opentrace
Copy link
Contributor

opentrace bot commented Feb 6, 2026

This is a well-structured and comprehensive documentation update for the .otignore feature. The changes are clear, address previous feedback, and improve the user-facing documentation without any negative impact on the codebase. The improved documentation will enhance user experience and reduce potential support questions.


Attached by run j-3a43e284-a44c-4580-be10-dbd56ae03614

Copy link
Contributor

@opentrace opentrace bot left a comment

Choose a reason for hiding this comment

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

Approved

@stephenbryant-opentrace stephenbryant-opentrace merged commit c044146 into main Feb 6, 2026
1 check passed
@stephenbryant-opentrace stephenbryant-opentrace deleted the docs/ot-1318-otignore-documentation branch February 6, 2026 16:59
@stephenbryant-opentrace stephenbryant-opentrace restored the docs/ot-1318-otignore-documentation branch February 6, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant