Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[serverless] Extract EventBridge from SNS/SQS Payloads and Create EventBridge Spans #29551

Merged

Conversation

nhulston
Copy link
Contributor

@nhulston nhulston commented Sep 24, 2024

What does this PR do?

  • At a high level, this PR adds EventBridge spans to the distributed traces for the cases of Lambda -> EventBridge -> SQS -> Lambda and Lambda -> EventBridge -> SNS -> Lambda.
  • This is accomplished by looking at the payloads of incoming SQS and SNS events and checking if there is an EventBridge event inside of the payload. If an EventBridge event is found, we create an span for the EventBridge event.
  • Before these changes, traces looked like this: Screenshot 2024-09-24 at 1 15 06 PM
  • After these changes, traces will look like this: Screenshot 2024-09-24 at 1 15 37 PM

Motivation

  • Currently, Lambda -> SNS -> SQS -> Lambda is already supported.
  • These new cases (especially Lambda -> EventBridge -> SQS -> Lambda) are very common, so we want to add support.

Describe how to test/QA your changes

Run local tests with invoke test --targets=./pkg/serverless from the root of the project

It's more complicated to test manually. Contact me if you want a live demo of these changes. Here's how I tested:

  1. Create a serverless architecture that's supported, such as a Java Lambda function that publishes an event to EventBridge, an EventBridge event bus that has a target SQS queue or SNS notifier, and another Java Lambda function that subscribes to the queue/notifier.
  2. Instrument the lambda functions using datadog-ci
  3. Build the extension: ./scripts/publish_sandbox.sh
  4. Use a tracer that injects trace context into EventBridge events. You can try building and uploading this PR with ./gradlew publishToMavenLocal
  5. Create new layers on AWS by uploading those zip files, and replace your Lambda layers with your custom layers.
  6. Set the environment variable JAVA_TOOL_OPTIONS: -javaagent:"/opt/dd-java-agent-1.40.0-SNAPSHOT.jar" on your lambda functions to use the new development build of the Java tracer
  7. Invoke your first lambda function, and check Datadog for results. The spans should be combined into a single trace.

Possible Drawbacks / Trade-offs

  • Increased overhead

Additional Notes

  • Check out this previous PR that initially added support for EventBridge inferred spans, for the simple case of Lambda -> EventBridge -> Lambda
  • These changes will not have any effect until the tracers have been updated to inject trace context into EventBridge events.
  • Java Tracer PR | .NET Tracer PR | Go Tracer PR

…NS or SQS. This adds distributed tracing support for `Lambda -> EventBridge -> SQS -> Lambda` and `Lambda -> EventBridge -> SNS -> Lambda`
@nhulston nhulston changed the title [Serverless] Extract EventBridge from SNS/SQS Payloads and Create EventBridge Spans [serverless] Extract EventBridge from SNS/SQS Payloads and Create EventBridge Spans Sep 24, 2024
@pr-commenter
Copy link

pr-commenter bot commented Sep 24, 2024

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv create-vm --pipeline-id=45469028 --os-family=ubuntu

Note: This applies to commit 293167c

@pr-commenter

This comment was marked as outdated.

@nhulston nhulston marked this pull request as ready for review September 24, 2024 18:43
@nhulston nhulston requested review from a team as code owners September 24, 2024 18:43
…rshall directly into `events.EventBridgeEvent` and use `eventBridgeCarrier()` instead of `handleEventBridgeThroughSNS()`
@scottopell

This comment was marked as outdated.


// Check for EventBridge event wrapped by the SNS message
var eventBridgeEvent events.EventBridgeEvent
if err := json.Unmarshal([]byte(event.Records[0].SNS.Message), &eventBridgeEvent); err == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

As an aside, I wish we didn't have to unmarshal these same event messages twice, once here and once during trace context extraction. Something to think about for a future enhancement.

@scottopell
Copy link
Contributor

regression detector report failed to post again, here it is:

Regression Detector Results

Run ID: a66f3f55-1e31-47ea-b902-a8ca141361e4 Metrics dashboard Target profiles

Baseline: e31532d
Comparison: 493c97e

Performance changes are noted in the perf column of each table:

  • ✅ = significantly better comparison variant performance
  • ❌ = significantly worse comparison variant performance
  • ➖ = no significant change in performance

No significant changes in experiment optimization goals

Confidence level: 90.00%
Effect size tolerance: |Δ mean %| ≥ 5.00%

There were no significant changes in experiment optimization goals at this confidence level and effect size tolerance.

Fine details of change detection per experiment

perf experiment goal Δ mean % Δ mean % CI trials links
otel_to_otel_logs ingress throughput +2.22 [+1.40, +3.04] 1 Logs
pycheck_lots_of_tags % cpu utilization +0.36 [-2.10, +2.82] 1 Logs
tcp_syslog_to_blackhole ingress throughput +0.12 [+0.07, +0.17] 1 Logs
idle memory utilization +0.04 [-0.00, +0.09] 1 Logs
tcp_dd_logs_filter_exclude ingress throughput -0.00 [-0.01, +0.01] 1 Logs
uds_dogstatsd_to_api ingress throughput -0.01 [-0.10, +0.08] 1 Logs
idle_all_features memory utilization -0.26 [-0.35, -0.17] 1 Logs
file_tree memory utilization -0.48 [-0.56, -0.39] 1 Logs
basic_py_check % cpu utilization -0.64 [-3.32, +2.04] 1 Logs
uds_dogstatsd_to_api_cpu % cpu utilization -0.65 [-1.38, +0.08] 1 Logs

Bounds Checks

perf experiment bounds_check_name replicates_passed
idle memory_usage 10/10

Explanation

A regression test is an A/B test of target performance in a repeatable rig, where "performance" is measured as "comparison variant minus baseline variant" for an optimization goal (e.g., ingress throughput). Due to intrinsic variability in measuring that goal, we can only estimate its mean value for each experiment; we report uncertainty in that value as a 90.00% confidence interval denoted "Δ mean % CI".

For each experiment, we decide whether a change in performance is a "regression" -- a change worth investigating further -- if all of the following criteria are true:

  1. Its estimated |Δ mean %| ≥ 5.00%, indicating the change is big enough to merit a closer look.

  2. Its 90.00% confidence interval "Δ mean % CI" does not contain zero, indicating that if our statistical model is accurate, there is at least a 90.00% chance there is a difference in performance between baseline and comparison variants.

  3. Its configuration does not mark it "erratic".

@nhulston
Copy link
Contributor Author

/merge

@dd-devflow
Copy link

dd-devflow bot commented Sep 30, 2024

🚂 MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.

Use /merge -c to cancel this operation!

Copy link
Contributor

Serverless Benchmark Results

BenchmarkStartEndInvocation comparison between 231be18 and 08efc36.

tl;dr

Use these benchmarks as an insight tool during development.

  1. Skim down the vs base column in each chart. If there is a ~, then there was no statistically significant change to the benchmark. Otherwise, ensure the estimated percent change is either negative or very small.

  2. The last row of each chart is the geomean. Ensure this percentage is either negative or very small.

What is this benchmarking?

The BenchmarkStartEndInvocation compares the amount of time it takes to call the start-invocation and end-invocation endpoints. For universal instrumentation languages (Dotnet, Golang, Java, Ruby), this represents the majority of the duration overhead added by our tracing layer.

The benchmark is run using a large variety of lambda request payloads. In the charts below, there is one row for each event payload type.

How do I interpret these charts?

The charts below comes from benchstat. They represent the statistical change in duration (sec/op), memory overhead (B/op), and allocations (allocs/op).

The benchstat docs explain how to interpret these charts.

Before the comparison table, we see common file-level configuration. If there are benchmarks with different configuration (for example, from different packages), benchstat will print separate tables for each configuration.

The table then compares the two input files for each benchmark. It shows the median and 95% confidence interval summaries for each benchmark before and after the change, and an A/B comparison under "vs base". ... The p-value measures how likely it is that any differences were due to random chance (i.e., noise). The "~" means benchstat did not detect a statistically significant difference between the two inputs. ...

Note that "statistically significant" is not the same as "large": with enough low-noise data, even very small changes can be distinguished from noise and considered statistically significant. It is, of course, generally easier to distinguish large changes from noise.

Finally, the last row of the table shows the geometric mean of each column, giving an overall picture of how the benchmarks changed. Proportional changes in the geomean reflect proportional changes in the benchmarks. For example, given n benchmarks, if sec/op for one of them increases by a factor of 2, then the sec/op geomean will increase by a factor of ⁿ√2.

I need more help

First off, do not worry if the benchmarks are failing. They are not tests. The intention is for them to be a tool for you to use during development.

If you would like a hand interpreting the results come chat with us in #serverless-agent in the internal DataDog slack or in #serverless in the public DataDog slack. We're happy to help!

Benchmark stats
goos: linux
goarch: amd64
pkg: github.com/DataDog/datadog-agent/pkg/serverless/daemon
cpu: AMD EPYC 7763 64-Core Processor                
                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │         sec/op         │    sec/op     vs base               │
api-gateway-appsec.json                            87.76µ ± 3%    86.30µ ± 4%       ~ (p=0.143 n=10)
api-gateway-kong-appsec.json                       69.40µ ± 3%    67.28µ ± 4%  -3.05% (p=0.011 n=10)
api-gateway-kong.json                              67.61µ ± 3%    66.93µ ± 4%       ~ (p=0.280 n=10)
api-gateway-non-proxy-async.json                   107.3µ ± 2%    105.5µ ± 1%  -1.73% (p=0.000 n=10)
api-gateway-non-proxy.json                         108.3µ ± 1%    108.9µ ± 2%       ~ (p=0.853 n=10)
api-gateway-websocket-connect.json                 73.39µ ± 1%    71.05µ ± 1%  -3.18% (p=0.000 n=10)
api-gateway-websocket-default.json                 65.72µ ± 1%    64.29µ ± 2%  -2.18% (p=0.003 n=10)
api-gateway-websocket-disconnect.json              66.64µ ± 1%    64.41µ ± 2%  -3.34% (p=0.000 n=10)
api-gateway.json                                   121.0µ ± 1%    119.4µ ± 1%  -1.28% (p=0.000 n=10)
application-load-balancer.json                     66.98µ ± 1%    65.88µ ± 1%  -1.65% (p=0.002 n=10)
cloudfront.json                                    50.00µ ± 2%    48.38µ ± 2%  -3.25% (p=0.000 n=10)
cloudwatch-events.json                             39.97µ ± 2%    39.70µ ± 1%       ~ (p=0.123 n=10)
cloudwatch-logs.json                               69.09µ ± 2%    66.68µ ± 1%  -3.48% (p=0.000 n=10)
custom.json                                        32.34µ ± 0%    32.74µ ± 2%  +1.27% (p=0.029 n=10)
dynamodb.json                                      97.53µ ± 3%    96.76µ ± 1%  -0.79% (p=0.035 n=10)
empty.json                                         30.66µ ± 1%    30.45µ ± 4%       ~ (p=0.481 n=10)
eventbridge-custom.json                            49.26µ ± 3%    50.70µ ± 2%       ~ (p=0.052 n=10)
eventbridge-no-bus.json                            48.04µ ± 1%    48.56µ ± 3%  +1.08% (p=0.018 n=10)
eventbridge-no-timestamp.json                      47.72µ ± 2%    48.17µ ± 1%  +0.93% (p=0.035 n=10)
http-api.json                                      75.71µ ± 2%    75.68µ ± 1%       ~ (p=0.631 n=10)
kinesis-batch.json                                 74.57µ ± 2%    74.42µ ± 2%       ~ (p=0.912 n=10)
kinesis.json                                       56.71µ ± 2%    57.41µ ± 1%       ~ (p=0.393 n=10)
s3.json                                            61.50µ ± 3%    63.31µ ± 2%  +2.94% (p=0.004 n=10)
sns-batch.json                                     93.28µ ± 1%    96.74µ ± 2%  +3.71% (p=0.000 n=10)
sns.json                                           67.37µ ± 2%    72.45µ ± 4%  +7.55% (p=0.000 n=10)
snssqs.json                                        114.5µ ± 3%    123.2µ ± 4%  +7.60% (p=0.000 n=10)
snssqs_no_dd_context.json                          102.3µ ± 1%    111.3µ ± 2%  +8.84% (p=0.000 n=10)
sqs-aws-header.json                                59.37µ ± 2%    63.31µ ± 4%  +6.64% (p=0.000 n=10)
sqs-batch.json                                     98.22µ ± 2%   100.62µ ± 2%  +2.44% (p=0.004 n=10)
sqs.json                                           71.95µ ± 1%    74.48µ ± 1%  +3.52% (p=0.000 n=10)
sqs_no_dd_context.json                             66.26µ ± 2%    69.17µ ± 1%  +4.38% (p=0.000 n=10)
stepfunction.json                                  49.19µ ± 4%    49.52µ ± 6%       ~ (p=0.190 n=10)
eventbridgesns.json                                               67.13µ ± 2%
eventbridgesqs.json                                               77.17µ ± 1%
geomean                                            67.66µ         68.43µ       +0.82%

                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │          B/op          │     B/op      vs base               │
api-gateway-appsec.json                           37.27Ki ± 0%   37.28Ki ± 0%       ~ (p=0.811 n=10)
api-gateway-kong-appsec.json                      26.94Ki ± 0%   26.93Ki ± 0%       ~ (p=0.868 n=10)
api-gateway-kong.json                             24.43Ki ± 0%   24.44Ki ± 0%       ~ (p=0.811 n=10)
api-gateway-non-proxy-async.json                  48.09Ki ± 0%   48.10Ki ± 0%       ~ (p=0.470 n=10)
api-gateway-non-proxy.json                        47.30Ki ± 0%   47.31Ki ± 0%       ~ (p=0.183 n=10)
api-gateway-websocket-connect.json                25.52Ki ± 0%   25.51Ki ± 0%       ~ (p=0.254 n=10)
api-gateway-websocket-default.json                21.42Ki ± 0%   21.42Ki ± 0%       ~ (p=0.810 n=10)
api-gateway-websocket-disconnect.json             21.21Ki ± 0%   21.20Ki ± 0%       ~ (p=0.159 n=10)
api-gateway.json                                  49.62Ki ± 0%   49.60Ki ± 0%       ~ (p=0.078 n=10)
application-load-balancer.json                    22.39Ki ± 0%   22.39Ki ± 0%       ~ (p=0.956 n=10)
cloudfront.json                                   17.68Ki ± 0%   17.67Ki ± 0%       ~ (p=0.700 n=10)
cloudwatch-events.json                            11.71Ki ± 0%   11.72Ki ± 0%       ~ (p=0.138 n=10)
cloudwatch-logs.json                              53.40Ki ± 0%   53.39Ki ± 0%       ~ (p=0.725 n=10)
custom.json                                       9.753Ki ± 0%   9.758Ki ± 0%       ~ (p=0.210 n=10)
dynamodb.json                                     40.81Ki ± 0%   40.80Ki ± 0%       ~ (p=0.956 n=10)
empty.json                                        9.326Ki ± 0%   9.332Ki ± 0%       ~ (p=0.516 n=10)
eventbridge-custom.json                           15.06Ki ± 0%   15.06Ki ± 0%       ~ (p=1.000 n=10)
eventbridge-no-bus.json                           14.02Ki ± 0%   14.04Ki ± 0%       ~ (p=0.325 n=10)
eventbridge-no-timestamp.json                     14.04Ki ± 0%   14.04Ki ± 0%       ~ (p=0.671 n=10)
http-api.json                                     23.85Ki ± 0%   23.92Ki ± 0%  +0.31% (p=0.002 n=10)
kinesis-batch.json                                27.12Ki ± 0%   27.15Ki ± 0%       ~ (p=0.631 n=10)
kinesis.json                                      17.91Ki ± 0%   17.96Ki ± 0%  +0.26% (p=0.016 n=10)
s3.json                                           20.45Ki ± 1%   20.50Ki ± 0%  +0.25% (p=0.043 n=10)
sns-batch.json                                    38.84Ki ± 0%   40.02Ki ± 0%  +3.02% (p=0.000 n=10)
sns.json                                          24.12Ki ± 0%   25.23Ki ± 1%  +4.58% (p=0.000 n=10)
snssqs.json                                       50.76Ki ± 0%   53.92Ki ± 0%  +6.24% (p=0.000 n=10)
snssqs_no_dd_context.json                         44.91Ki ± 0%   47.51Ki ± 0%  +5.81% (p=0.000 n=10)
sqs-aws-header.json                               18.94Ki ± 1%   19.56Ki ± 1%  +3.28% (p=0.000 n=10)
sqs-batch.json                                    41.82Ki ± 0%   42.34Ki ± 0%  +1.25% (p=0.000 n=10)
sqs.json                                          25.74Ki ± 1%   26.30Ki ± 1%  +2.17% (p=0.000 n=10)
sqs_no_dd_context.json                            20.76Ki ± 1%   21.89Ki ± 1%  +5.45% (p=0.000 n=10)
stepfunction.json                                 14.26Ki ± 1%   14.31Ki ± 1%       ~ (p=0.353 n=10)
eventbridgesns.json                                              20.98Ki ± 0%
eventbridgesqs.json                                              25.21Ki ± 0%
geomean                                           24.45Ki        24.60Ki       +1.02%

                                      │ baseline/benchmark.log │        current/benchmark.log        │
                                      │       allocs/op        │ allocs/op   vs base                 │
api-gateway-appsec.json                             629.5 ± 0%   630.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-kong-appsec.json                        488.0 ± 0%   488.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-kong.json                               466.0 ± 0%   466.0 ± 0%       ~ (p=0.474 n=10)
api-gateway-non-proxy-async.json                    726.0 ± 0%   726.0 ± 0%       ~ (p=0.628 n=10)
api-gateway-non-proxy.json                          716.0 ± 0%   716.0 ± 0%       ~ (p=0.474 n=10)
api-gateway-websocket-connect.json                  453.0 ± 0%   453.0 ± 0%       ~ (p=1.000 n=10)
api-gateway-websocket-default.json                  379.5 ± 0%   379.5 ± 0%       ~ (p=1.000 n=10)
api-gateway-websocket-disconnect.json               370.0 ± 0%   370.0 ± 0%       ~ (p=1.000 n=10) ¹
api-gateway.json                                    791.0 ± 0%   791.0 ± 0%       ~ (p=1.000 n=10) ¹
application-load-balancer.json                      352.0 ± 0%   352.0 ± 0%       ~ (p=1.000 n=10) ¹
cloudfront.json                                     284.0 ± 0%   284.0 ± 0%       ~ (p=1.000 n=10) ¹
cloudwatch-events.json                              220.0 ± 0%   221.0 ± 0%       ~ (p=0.370 n=10)
cloudwatch-logs.json                                216.0 ± 0%   216.0 ± 0%       ~ (p=1.000 n=10)
custom.json                                         169.0 ± 1%   169.0 ± 1%       ~ (p=0.628 n=10)
dynamodb.json                                       589.0 ± 0%   589.0 ± 0%       ~ (p=0.700 n=10)
empty.json                                          160.0 ± 1%   160.0 ± 0%       ~ (p=1.000 n=10)
eventbridge-custom.json                             267.0 ± 0%   267.0 ± 0%       ~ (p=1.000 n=10)
eventbridge-no-bus.json                             258.0 ± 0%   258.0 ± 0%       ~ (p=0.582 n=10)
eventbridge-no-timestamp.json                       258.0 ± 0%   258.0 ± 0%       ~ (p=1.000 n=10)
http-api.json                                       434.0 ± 0%   435.0 ± 0%  +0.23% (p=0.010 n=10)
kinesis-batch.json                                  392.0 ± 0%   393.0 ± 0%       ~ (p=0.290 n=10)
kinesis.json                                        286.5 ± 0%   287.0 ± 0%       ~ (p=0.053 n=10)
s3.json                                             359.5 ± 1%   360.0 ± 0%       ~ (p=0.121 n=10)
sns-batch.json                                      457.0 ± 0%   480.0 ± 0%  +5.03% (p=0.000 n=10)
sns.json                                            324.5 ± 0%   347.5 ± 1%  +7.09% (p=0.000 n=10)
snssqs.json                                         440.5 ± 0%   480.0 ± 0%  +8.97% (p=0.000 n=10)
snssqs_no_dd_context.json                           401.0 ± 0%   436.5 ± 1%  +8.85% (p=0.000 n=10)
sqs-aws-header.json                                 275.5 ± 1%   288.0 ± 1%  +4.54% (p=0.000 n=10)
sqs-batch.json                                      505.5 ± 0%   517.0 ± 0%  +2.27% (p=0.000 n=10)
sqs.json                                            353.5 ± 1%   365.0 ± 1%  +3.25% (p=0.000 n=10)
sqs_no_dd_context.json                              325.5 ± 1%   350.0 ± 1%  +7.53% (p=0.000 n=10)
stepfunction.json                                   238.0 ± 0%   238.0 ± 1%       ~ (p=0.680 n=10)
eventbridgesns.json                                              326.0 ± 1%
eventbridgesqs.json                                              368.0 ± 1%
geomean                                             363.7        367.8       +1.49%
¹ all samples are equal

@dd-devflow
Copy link

dd-devflow bot commented Sep 30, 2024

🚂 MergeQueue: pull request added to the queue

The median merge time in main is 25m.

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit 024af28 into main Sep 30, 2024
235 of 238 checks passed
@dd-mergequeue dd-mergequeue bot deleted the nicholas.hulston/extract-eventbridge-from-sns-and-sqs branch September 30, 2024 21:44
@github-actions github-actions bot added this to the 7.59.0 milestone Sep 30, 2024
wdhif pushed a commit that referenced this pull request Oct 2, 2024
grantseltzer pushed a commit that referenced this pull request Oct 2, 2024
grantseltzer pushed a commit that referenced this pull request Oct 4, 2024
nhulston added a commit to DataDog/dd-trace-dotnet that referenced this pull request Oct 15, 2024
…ext (#6096)

## Summary of changes
This creates a new instrumentation for EventBridge and intercepts
`PutEvents` and `PutEventsAsync` to inject trace context. This allows
the agent to combine spans from a distributed (serverless) architecture
into a single trace.

This PR only injects trace context. I'm working on [PR
1](DataDog/datadog-agent#29414) and [PR
2](DataDog/datadog-agent#29551) to update the
Lambda extension to use this trace context to create EventBridge spans.

I am also working on a similar PR in
[dd-trace-java](DataDog/dd-trace-java#7613) and
dd-trace-go.

## Reason for change

SNS and SQS are already supported, and the tracer currently injects
trace context into message attributes fields for them. However,
EventBridge wasn't supported, and this PR aims to fix this problem.

## Implementation details

I followed the
[documentation](https://github.com/DataDog/dd-trace-dotnet/blob/master/docs/development/AutomaticInstrumentation.md)
to create an instrumentation. Much of the logic was mirrored from the
[existing
implementation](https://github.com/DataDog/dd-trace-dotnet/tree/master/tracer/src/Datadog.Trace/ClrProfiler/AutoInstrumentation/AWS/SNS)
of SNS, since EventBridge and SNS are extremely similar.

Overall, AWS's EventBridge API is lacking some features, so we have to
do some hacky solutions.

- SNS and SQS call their custom input field messageAttributes, and
EventBridge calls it detail
- Unlike SNS and SQS, the detail field is given as a raw string.
Therefore, we have to manually modify the detail string using
StringBuilder.
- The agent has no reliable way of getting the start time of the
EventBridge span, so the tracer has to put the current time into
`detail[_datadog]` under the header `x-datadog-start-time`
- The EventBridge API has no way of getting the EventBridge bus name, so
the tracer has to put the bus name (which is used to create the span
resource name) into `detail[_datadog]` under the header
`x-datadog-resource-name`


## Test coverage

I added system tests for SNS/SQS:
DataDog/system-tests#3204

I added [unit
tests](d05eb4c)
and [integration
tests](5ccd8b7).

Unit tests can be ran with:
```
cd tracer
dotnet test ./test/Datadog.Trace.ClrProfiler.Managed.Tests
```

Integration tests can be ran with these commands:
```
cd tracer

# Start docker localstock
docker run --rm -it -p 4566:4566 -p 4571:4571 -e SERVICES=events localstack/localstack

# Run integation tests
./build.sh BuildAndRunOSxIntegrationTests -buildConfiguration Debug -framework net6.0 -Filter AwsEventBridgeTests -SampleName Samples.AWS.EventBridge
```

I also did manual testing:
<img width="505" alt="Screenshot 2024-09-30 at 11 00 47 AM"
src="https://github.com/user-attachments/assets/bdf5d516-8b46-4138-ac25-c45d1822dc56">

## Other details

There are lots of diffs and files changed. I recommend reviewers to
review the PR commit by commit. All the autogenerated files were added
in a single commit, which should make the review process less
overwhelming.

<!-- ⚠️ Note: where possible, please obtain 2 approvals prior to
merging. Unless CODEOWNERS specifies otherwise, for external teams it is
typically best to have one review from a team member, and one review
from apm-dotnet. Trivial changes do not require 2 reviews. -->

---------

Co-authored-by: Steven Bouwkamp <steven.bouwkamp@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants