Skip to content

chore(instrumentation): set up instrumentation/aws workspace#194

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

chore(instrumentation): set up instrumentation/aws workspace#194
Dogbu-cyber wants to merge 11 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 consumer)

What does this PR do?

Establishes the instrumentation/aws/ Cargo workspace that houses Datadog AWS instrumentation crates. This is the foundation PR — #189 and #190 add the implementations on top.

Workspace structure

instrumentation/aws/
├── Cargo.toml                  # shared workspace (resolver = "2", MSRV 1.91.1)
├── datadog-aws/                # trace context injection for AWS SDK calls
│   └── Cargo.toml + lib.rs stub
└── datadog-aws-lambda/         # distributed tracing for Rust Lambda functions
    └── Cargo.toml + lib.rs stub

Changes

  • Renamed integrations/instrumentation/ to align with dd-trace-go/java/dotnet and OpenTelemetry contrib naming conventions
  • Renamed crates and folders to final public names:
    • aws-sdk-rust/datadog-aws/ (crate: datadog-aws, MSRV 1.91.1)
    • datadog-lambda-rs/datadog-aws-lambda/ (crate: datadog-aws-lambda, MSRV 1.85.0)
  • Created instrumentation/aws/Cargo.toml as a shared Cargo workspace with [workspace.dependencies] for common deps (opentelemetry, serde_json, tracing, tokio, etc.) — member crates use { workspace = true } to avoid version drift
  • Both crates inherit version, edition, license, repository, authors, publish from [workspace.package]; datadog-aws-lambda keeps its own rust-version = "1.85.0"
  • Fixed .gitignore: /integrations/**/target/instrumentation/**/target

Motivation

The two implementation PRs (#189, #190) require higher MSRVs than the repo-wide 1.84.1. Keeping them as a separate Cargo workspace avoids polluting the root workspace's MSRV while sharing a single lock file and centralized dependency versions between the two crates.

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.

# Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/
# SPDX-License-Identifier: Apache-2.0

[workspace]
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: group all rust instrumentation modules under a single Cargo workspace.

That keeps shared dependencies pinned in one place, and makes cross-module compatibility easier to maintain. Each instrumentation package can still stay as its own crate and version independently.

[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.

[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.

authors = ["Datadog Inc. <info@datadoghq.com>"]
description = "Datadog instrumentation for AWS SDK for Rust"

[dependencies]
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: explicitly document that datadog-aws-instrumentation currently supports only SQS, SNS, and EventBridge.
Note: The broader crate name is acceptable if the docs and package description do not overpromise.

[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.

…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
@Dogbu-cyber Dogbu-cyber force-pushed the david.ogbureke/ci-integration-msrv branch from 78a6876 to bf4ea81 Compare April 2, 2026 14:54
…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 }
@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
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.

3 participants