---
title: "License"
description: "Licensing notes."
---

## License Overview

TracerTM is released under the Apache License 2.0. This guide explains licensing requirements for contributors and how to handle dependencies.

## Apache License 2.0

The Apache License 2.0 is a permissive open-source license that:

- Allows commercial use
- Allows modification and distribution
- Requires license and copyright notice
- Provides explicit patent rights
- Provides liability limitations

**License text:** See `LICENSE` file in the repository root

**Full details:** [apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)

## For Contributors

### License Headers

Include Apache license headers in all new source files:

**Python files (.py):**

```python
# Copyright 2024 Atoms Technology, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
```

**TypeScript/JavaScript files (.ts, .tsx, .js):**

```typescript
// Copyright 2024 Atoms Technology, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```

### Dependency Compatibility

When adding new dependencies, ensure they are compatible with Apache License 2.0:

**Compatible licenses:**

- MIT
- BSD (2-clause and 3-clause)
- Apache 2.0
- LGPL (with careful consideration)
- ISC
- MPL 2.0

**Incompatible/problematic licenses:**

- GPL v3 (creates obligations for derivative works)
- AGPL (requires source disclosure)
- Custom restrictive licenses
- Proprietary licenses

**How to check a dependency's license:**

```bash
# View license for installed packages
npm license  # npm packages
pip-licenses  # Python packages

# Check before installing
npm view <package-name> license
pip show <package-name> | grep License
```

### Adding Third-Party Code

When including third-party code or libraries:

1. **Document the source:**

```markdown
## Third-Party Code

This implementation is based on:
- Source: [link to original]
- License: [license type]
- Changes: [description of modifications]
```

2. **Include attribution:**

Include comments above the code:

```python
# Based on [project/author name]
# Original source: [URL]
# License: [license]
# Modified for [specific purpose]
```

3. **Add to NOTICE file:**

The `NOTICE` file should document all third-party code:

```
This project includes code derived from:

- [Project Name] (https://example.com)
  License: [License Type]
  Copyright: [Copyright Notice]
```

## Code Review Checklist

Before submitting code for review:

- [ ] New files include Apache 2.0 header
- [ ] All dependencies are listed in requirements.txt or package.json
- [ ] Dependency licenses are compatible with Apache 2.0
- [ ] Third-party code is properly attributed
- [ ] No proprietary or restricted code included
- [ ] License choice is documented

## Common Licensing Questions

**Q: Can I use GPL libraries?**
A: GPL v2 is generally compatible; GPL v3 may create issues. Consult with the project maintainers before adding GPL v3 dependencies.

**Q: Can I relicense my contribution?**
A: No. By contributing to TracerTM, your code is automatically licensed under Apache 2.0.

**Q: Can I include code from Stack Overflow?**
A: Yes, with attribution. Stack Overflow content is CC-BY-SA licensed, which is compatible. Add a comment linking to the original answer.

**Q: What about vendored dependencies?**
A: Include the original license file in the vendor directory and list in NOTICE file.

**Q: Can I use a commercial library?**
A: Only if it's licensed under a compatible open-source license. Proprietary licenses are not allowed.

## Resources

- [Apache License 2.0 FAQ](https://www.apache.org/licenses/LICENSE-2.0-faq)
- [Open Source Licenses Explained](https://opensource.org/licenses)
- [SPDX License List](https://spdx.org/licenses/) - Check license compatibility
- [License Compatibility Chart](https://en.wikipedia.org/wiki/License_compatibility)
