chore(instrumentation): set up instrumentation workspace#194
chore(instrumentation): set up instrumentation workspace#194Dogbu-cyber wants to merge 14 commits intomainfrom
Conversation
17f2c7a to
78a6876
Compare
|
Suggestion: Use Reason: Datadog isn’t perfectly consistent across dd-trace-*, but the stronger tracer precedent leans instrumentation (dd-trace-go, dd-trace-java, dd-trace-dotnet). There are repos that use integration/Integrations too (dd-trace-rb, dd-trace-php), so this isn’t a hard rule. Still, for tracer code like this, instrumentation reads clearer, and it also matches OpenTelemetry contrib. |
| [workspace] | ||
|
|
||
| [package] | ||
| name = "datadog-lambda" |
There was a problem hiding this comment.
Suggestion: rename datadog-lambda to datadog-aws-lambda-instrumentation.
Note: The crate is AWS-specific, so the current name is broader than the actual scope.
There was a problem hiding this comment.
Kept as datadog-lambda to follow existing convention of datadog-lambda-{language}.
Opted not to keep instrumentation in the name as the scope of the final crate will be more than instrumentation
There was a problem hiding this comment.
With this in mind, is instrumentation still an appropriate folder name?
| [workspace] | ||
|
|
||
| [package] | ||
| name = "datadog-aws-sdk" |
There was a problem hiding this comment.
Suggestion: rename datadog-aws-sdk to datadog-aws-instrumentation.
| [workspace] | ||
|
|
||
| [package] | ||
| name = "datadog-aws-sdk" |
There was a problem hiding this comment.
Suggestion: align folder names with the final public crate names.
| [workspace] | ||
|
|
||
| [package] | ||
| name = "datadog-lambda" |
There was a problem hiding this comment.
Suggestion: align folder names with the final public crate names.
78a6876 to
bf4ea81
Compare
| aws-sdk-eventbridge = "1.102" | ||
| aws-sdk-sns = "1.96" | ||
| aws-sdk-sqs = "1.93" | ||
| aws-smithy-runtime-api = { version = "1.11", features = ["client"] } | ||
| aws-smithy-types = "1.4" |
There was a problem hiding this comment.
These have been upgraded in the meantime that this PR has been open. I think we should bump them to the latest if it doesn't cause any issues before merging
|
The CI is not passing, but this is because the nightly version we are using as it is more than 1 year old... |
paullegranddc
left a comment
There was a problem hiding this comment.
The CI nigthly version has been updated to
| @@ -0,0 +1,1949 @@ | |||
| # This file is automatically @generated by Cargo. | |||
There was a problem hiding this comment.
Same comment for this also I think
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| [workspace] | ||
| members = ["datadog-aws", "datadog-aws-lambda"] |
There was a problem hiding this comment.
Suggestion: Instead of having a separate workspace under instrumentation/aws, we could consider having a single workspace for all instrumentation crates under instrumentation/. This would provide a central location for executing Cargo commands for instrumentation code, eliminating the need to locate and switch between different crates or workspace directories as additional instrumentations are added.
Also, we could simplify the current layout by removing the intermediate aws folder. As it currently just acts as a workspace containing datadog-aws and datadog-aws-lambda, it would be simpler to place these crates directly under instrumentation and include them in the shared instrumentation workspace.
| - name: Run rustfmt in instrumentation workspaces | ||
| shell: bash | ||
| run: | | ||
| mapfile -t workspaces < <(find instrumentation -mindepth 1 -maxdepth 1 -name Cargo.toml -print | sort) |
There was a problem hiding this comment.
I suppose this can now be simplified into a single cargo fmt call, given that there is now a single instrumentation workspace.
…rkspace - Rename integrations/ -> instrumentation/ to align with dd-trace-go/java/dotnet and OpenTelemetry contrib naming conventions - Rename aws-sdk-rust/ -> datadog-aws/ (crate name: datadog-aws) - Rename datadog-lambda-rs/ -> datadog-aws-lambda/ (crate name: datadog-aws-lambda) - Remove per-crate [workspace] stubs; add instrumentation/aws/Cargo.toml as shared workspace (resolver 2, MSRV 1.91.1) - Document scope in datadog-aws: currently supports SQS, SNS, EventBridge
…age metadata
- Replace /integrations/**/target with /instrumentation/**/target in .gitignore
- Add [workspace.dependencies] for shared deps (serde, serde_json, opentelemetry,
opentelemetry_sdk, opentelemetry-semantic-conventions, tracing, tokio)
- Both crates inherit version, edition, license, repository, authors, publish from
[workspace.package]; datadog-aws-lambda keeps its own rust-version (1.85.0)
- Shared deps in both crates use { workspace = true }
- Add comment in lint.yaml explaining instrumentation/ crates are in separate sub-workspaces and not covered by cargo fmt --all above - Update nightly toolchain from nightly-2024-12-16 to nightly-2026-04-07 in instrumentation-rustfmt and instrumentation-clippy CI jobs - Bump AWS SDK deps: aws-sdk-sqs 1.93->1.97.0, aws-sdk-sns 1.96->1.98.0, aws-sdk-eventbridge 1.102->1.104.0 - Remove per-crate Cargo.lock files (datadog-aws, datadog-aws-lambda); workspace Cargo.lock at instrumentation/aws/Cargo.lock is canonical
…o instrumentation/ Move datadog-aws and datadog-aws-lambda crates directly under instrumentation/, removing the intermediate aws/ subdirectory per ygree's suggestion. Update the path dependency in datadog-aws-lambda and adjust CI find depth from mindepth 2 to mindepth 1 to match the new layout.
Replace all instrumentation/aws/ references with instrumentation/ in test-aws-integrations.yaml trigger paths, working-directory, and cache configuration. Update lint.yaml comment and find depth to match the new single-workspace layout.
d4b18bd to
642bdfd
Compare
What does this PR do?
Establishes the
instrumentation/Cargo workspace that houses Datadog AWS instrumentation crates. This is the foundation PR — #189 and #190 add the implementations on top.Workspace structure