diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 90a9b75..7e7e0e7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,7 +47,7 @@ jobs: - name: resolve MSRV id: resolve-msrv run: - echo MSRV=`python -c 'import tomllib; print(tomllib.load(open("Cargo.toml", "rb"))["package"]["rust-version"])'` >> $GITHUB_OUTPUT + echo MSRV=`python -c 'import tomllib; print(tomllib.load(open("logfire/Cargo.toml", "rb"))["package"]["rust-version"])'` >> $GITHUB_OUTPUT test: needs: [resolve] @@ -77,14 +77,16 @@ jobs: - uses: taiki-e/install-action@cargo-llvm-cov - run: cargo llvm-cov --all-features --codecov --output-path codecov.json + working-directory: logfire # rust doctests (not included in cargo llvm-cov, see https://github.com/taiki-e/cargo-llvm-cov/issues/2) - run: cargo test --doc + working-directory: logfire - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} - files: codecov.json + files: logfire/codecov.json env_vars: RUST_VERSION # https://github.com/marketplace/actions/alls-green#why used for branch protection checks @@ -113,5 +115,6 @@ jobs: - uses: Swatinem/rust-cache@v2 - run: cargo publish + working-directory: logfire env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.gitignore b/.gitignore index 96ef6c0..2c96eb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/target +target/ Cargo.lock diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8b48e25..63b7c5d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,19 +14,19 @@ repos: hooks: - id: format name: Format - entry: cargo fmt + entry: cargo fmt --manifest-path logfire/Cargo.toml types: [rust] language: system pass_filenames: false - id: clippy name: Clippy - entry: cargo clippy --all-features -- -D warnings + entry: cargo clippy --manifest-path logfire/Cargo.toml --all-features -- -D warnings types: [rust] language: system pass_filenames: false - id: docs name: Check docs - entry: env RUSTDOCFLAGS="-D warnings --cfg docsrs" cargo doc --no-deps + entry: env RUSTDOCFLAGS="-D warnings --cfg docsrs" cargo doc --manifest-path logfire/Cargo.toml --no-deps types: [rust] language: system pass_filenames: false diff --git a/CHANGELOG.md b/logfire/CHANGELOG.md similarity index 100% rename from CHANGELOG.md rename to logfire/CHANGELOG.md diff --git a/Cargo.toml b/logfire/Cargo.toml similarity index 100% rename from Cargo.toml rename to logfire/Cargo.toml diff --git a/LICENSE b/logfire/LICENSE similarity index 100% rename from LICENSE rename to logfire/LICENSE diff --git a/README.md b/logfire/README.md similarity index 93% rename from README.md rename to logfire/README.md index 7c3279d..8d35ba4 100644 --- a/README.md +++ b/logfire/README.md @@ -4,7 +4,7 @@ CI codecov crates.io - license + license MSRV Join Slack

@@ -92,11 +92,11 @@ fn main() -> Result<()> { (Read the [Logfire concepts documentation](https://logfire.pydantic.dev/docs/concepts/) for additional detail on spans, events, and further Logfire concepts.) -See additional examples in the [examples directory](https://github.com/pydantic/logfire-rust/tree/main/examples): +See additional examples in the [examples directory](https://github.com/pydantic/logfire-rust/tree/main/logfire/examples): -- [basic](https://github.com/pydantic/logfire-rust/tree/main/examples/basic.rs) -- [axum webserver](https://github.com/pydantic/logfire-rust/tree/main/examples/axum.rs) -- [actix webserver](https://github.com/pydantic/logfire-rust/tree/main/examples/actix-web.rs) +- [basic](https://github.com/pydantic/logfire-rust/tree/main/logfire/examples/basic.rs) +- [axum webserver](https://github.com/pydantic/logfire-rust/tree/main/logfire/examples/axum.rs) +- [actix webserver](https://github.com/pydantic/logfire-rust/tree/main/logfire/examples/actix-web.rs) ### Integration diff --git a/assets/logo-white.svg b/logfire/assets/logo-white.svg similarity index 100% rename from assets/logo-white.svg rename to logfire/assets/logo-white.svg diff --git a/examples/actix-web.rs b/logfire/examples/actix-web.rs similarity index 100% rename from examples/actix-web.rs rename to logfire/examples/actix-web.rs diff --git a/examples/axum.rs b/logfire/examples/axum.rs similarity index 100% rename from examples/axum.rs rename to logfire/examples/axum.rs diff --git a/examples/basic.rs b/logfire/examples/basic.rs similarity index 100% rename from examples/basic.rs rename to logfire/examples/basic.rs diff --git a/src/bridges/log.rs b/logfire/src/bridges/log.rs similarity index 100% rename from src/bridges/log.rs rename to logfire/src/bridges/log.rs diff --git a/src/bridges/mod.rs b/logfire/src/bridges/mod.rs similarity index 100% rename from src/bridges/mod.rs rename to logfire/src/bridges/mod.rs diff --git a/src/bridges/tracing.rs b/logfire/src/bridges/tracing.rs similarity index 100% rename from src/bridges/tracing.rs rename to logfire/src/bridges/tracing.rs diff --git a/src/config.rs b/logfire/src/config.rs similarity index 100% rename from src/config.rs rename to logfire/src/config.rs diff --git a/src/exporters.rs b/logfire/src/exporters.rs similarity index 100% rename from src/exporters.rs rename to logfire/src/exporters.rs diff --git a/src/internal/constants.rs b/logfire/src/internal/constants.rs similarity index 100% rename from src/internal/constants.rs rename to logfire/src/internal/constants.rs diff --git a/src/internal/env.rs b/logfire/src/internal/env.rs similarity index 100% rename from src/internal/env.rs rename to logfire/src/internal/env.rs diff --git a/src/internal/exporters/console.rs b/logfire/src/internal/exporters/console.rs similarity index 100% rename from src/internal/exporters/console.rs rename to logfire/src/internal/exporters/console.rs diff --git a/src/internal/exporters/mod.rs b/logfire/src/internal/exporters/mod.rs similarity index 100% rename from src/internal/exporters/mod.rs rename to logfire/src/internal/exporters/mod.rs diff --git a/src/internal/exporters/remove_pending.rs b/logfire/src/internal/exporters/remove_pending.rs similarity index 100% rename from src/internal/exporters/remove_pending.rs rename to logfire/src/internal/exporters/remove_pending.rs diff --git a/src/internal/log_processor_shutdown_hack.rs b/logfire/src/internal/log_processor_shutdown_hack.rs similarity index 100% rename from src/internal/log_processor_shutdown_hack.rs rename to logfire/src/internal/log_processor_shutdown_hack.rs diff --git a/src/internal/logfire_tracer.rs b/logfire/src/internal/logfire_tracer.rs similarity index 100% rename from src/internal/logfire_tracer.rs rename to logfire/src/internal/logfire_tracer.rs diff --git a/src/internal/mod.rs b/logfire/src/internal/mod.rs similarity index 100% rename from src/internal/mod.rs rename to logfire/src/internal/mod.rs diff --git a/src/internal/span_data_ext.rs b/logfire/src/internal/span_data_ext.rs similarity index 100% rename from src/internal/span_data_ext.rs rename to logfire/src/internal/span_data_ext.rs diff --git a/src/lib.rs b/logfire/src/lib.rs similarity index 100% rename from src/lib.rs rename to logfire/src/lib.rs diff --git a/src/logfire.rs b/logfire/src/logfire.rs similarity index 100% rename from src/logfire.rs rename to logfire/src/logfire.rs diff --git a/src/macros/impl_.rs b/logfire/src/macros/impl_.rs similarity index 100% rename from src/macros/impl_.rs rename to logfire/src/macros/impl_.rs diff --git a/src/macros/mod.rs b/logfire/src/macros/mod.rs similarity index 100% rename from src/macros/mod.rs rename to logfire/src/macros/mod.rs diff --git a/src/metrics.rs b/logfire/src/metrics.rs similarity index 100% rename from src/metrics.rs rename to logfire/src/metrics.rs diff --git a/src/test_utils.rs b/logfire/src/test_utils.rs similarity index 100% rename from src/test_utils.rs rename to logfire/src/test_utils.rs diff --git a/src/ulid_id_generator.rs b/logfire/src/ulid_id_generator.rs similarity index 100% rename from src/ulid_id_generator.rs rename to logfire/src/ulid_id_generator.rs diff --git a/src/usage/examples.rs b/logfire/src/usage/examples.rs similarity index 100% rename from src/usage/examples.rs rename to logfire/src/usage/examples.rs diff --git a/src/usage/lambda.md b/logfire/src/usage/lambda.md similarity index 100% rename from src/usage/lambda.md rename to logfire/src/usage/lambda.md diff --git a/src/usage/metrics.rs b/logfire/src/usage/metrics.rs similarity index 100% rename from src/usage/metrics.rs rename to logfire/src/usage/metrics.rs diff --git a/src/usage/mod.rs b/logfire/src/usage/mod.rs similarity index 100% rename from src/usage/mod.rs rename to logfire/src/usage/mod.rs diff --git a/tests/test_basic_exports.rs b/logfire/tests/test_basic_exports.rs similarity index 100% rename from tests/test_basic_exports.rs rename to logfire/tests/test_basic_exports.rs diff --git a/tests/test_grpc_sink.rs b/logfire/tests/test_grpc_sink.rs similarity index 100% rename from tests/test_grpc_sink.rs rename to logfire/tests/test_grpc_sink.rs diff --git a/tests/test_http_sink.rs b/logfire/tests/test_http_sink.rs similarity index 100% rename from tests/test_http_sink.rs rename to logfire/tests/test_http_sink.rs diff --git a/tests/test_log_attributes.rs b/logfire/tests/test_log_attributes.rs similarity index 100% rename from tests/test_log_attributes.rs rename to logfire/tests/test_log_attributes.rs diff --git a/tests/test_macro_hygiene.rs b/logfire/tests/test_macro_hygiene.rs similarity index 100% rename from tests/test_macro_hygiene.rs rename to logfire/tests/test_macro_hygiene.rs diff --git a/tests/test_resource_attributes.rs b/logfire/tests/test_resource_attributes.rs similarity index 100% rename from tests/test_resource_attributes.rs rename to logfire/tests/test_resource_attributes.rs diff --git a/tests/test_span_attributes.rs b/logfire/tests/test_span_attributes.rs similarity index 100% rename from tests/test_span_attributes.rs rename to logfire/tests/test_span_attributes.rs