Skip to content

chore(instrumentation): set up instrumentation workspace#194

Open
Dogbu-cyber wants to merge 14 commits intomainfrom
david.ogbureke/ci-integration-msrv
Open

chore(instrumentation): set up instrumentation workspace#194
Dogbu-cyber wants to merge 14 commits intomainfrom
david.ogbureke/ci-integration-msrv

Conversation

@Dogbu-cyber
Copy link
Copy Markdown

@Dogbu-cyber Dogbu-cyber commented Mar 23, 2026

PR Stack: #194 (workspace setup) -> #189 (aws-sdk injection) -> #190 (lambda integration)

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

instrumentation/
├── Cargo.toml                  # shared workspace (resolver = "2", MSRV 1.91.1)
├── datadog-aws-core/           # stub — internal interceptor machinery (added in #189)
├── datadog-aws-sqs/            # stub — SqsInterceptor (added in #189)
├── datadog-aws-sns/            # stub — SnsInterceptor (added in #189)
├── datadog-aws-eventbridge/    # stub — EventBridgeInterceptor (added in #189)
└── datadog-aws-lambda/         # distributed tracing for Rust Lambda functions (added in #190)

Copy link
Copy Markdown

@joeyzhao2018 joeyzhao2018 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@Dogbu-cyber Dogbu-cyber force-pushed the david.ogbureke/ci-integration-msrv branch 2 times, most recently from 17f2c7a to 78a6876 Compare March 30, 2026 20:30
@ygree
Copy link
Copy Markdown

ygree commented Apr 1, 2026

Suggestion: Use instrumentation/ instead of integrations/

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.

Comment thread integrations/aws/aws-sdk/Cargo.toml
[workspace]

[package]
name = "datadog-lambda"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

With this in mind, is instrumentation still an appropriate folder name?

Comment thread integrations/aws/aws-sdk/Cargo.toml Outdated
[workspace]

[package]
name = "datadog-aws-sdk"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: rename datadog-aws-sdk to datadog-aws-instrumentation.

Comment thread instrumentation/datadog-aws/Cargo.toml
Comment thread integrations/aws/aws-sdk/Cargo.toml Outdated
[workspace]

[package]
name = "datadog-aws-sdk"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: align folder names with the final public crate names.

[workspace]

[package]
name = "datadog-lambda"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: align folder names with the final public crate names.

@Dogbu-cyber Dogbu-cyber force-pushed the david.ogbureke/ci-integration-msrv branch from 78a6876 to bf4ea81 Compare April 2, 2026 14:54
@Dogbu-cyber Dogbu-cyber changed the title chore(integrations): add integration crate stubs and CI toolchain setup chore(instrumentation): set up instrumentation/aws workspace Apr 2, 2026
Comment thread .github/workflows/lint.yaml
Comment on lines +16 to +20
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"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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

@paullegranddc
Copy link
Copy Markdown
Collaborator

The CI is not passing, but this is because the nightly version we are using as it is more than 1 year old...
I'll bump it in a separate PR

Copy link
Copy Markdown
Collaborator

@paullegranddc paullegranddc left a comment

Choose a reason for hiding this comment

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

The CI nigthly version has been updated to

Comment thread instrumentation/aws/datadog-aws/Cargo.lock Outdated
@@ -0,0 +1,1949 @@
# This file is automatically @generated by Cargo.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Same comment for this also I think

Comment thread .github/workflows/lint.yaml Outdated
# SPDX-License-Identifier: Apache-2.0

[workspace]
members = ["datadog-aws", "datadog-aws-lambda"]
Copy link
Copy Markdown

@ygree ygree Apr 13, 2026

Choose a reason for hiding this comment

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

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)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.
@Dogbu-cyber Dogbu-cyber force-pushed the david.ogbureke/ci-integration-msrv branch from d4b18bd to 642bdfd Compare April 16, 2026 21:09
@Dogbu-cyber Dogbu-cyber changed the title chore(instrumentation): set up instrumentation/aws workspace chore(instrumentation): set up instrumentation workspace Apr 17, 2026
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