https://github.com/aws-observability/aws-otel-dotnet-instrumentation
https://github.com/aws-observability/aws-otel-dotnet-instrumentation
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aws-observability/aws-otel-dotnet-instrumentation
- Owner: aws-observability
- License: apache-2.0
- Created: 2024-04-30T16:36:55.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-13T21:42:22.000Z (about 1 year ago)
- Last Synced: 2025-05-13T23:06:23.059Z (about 1 year ago)
- Language: C#
- Size: 1.64 MB
- Stars: 1
- Watchers: 8
- Forks: 14
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# AWS Distro for OpenTelemetry - Instrumentation for DotNet
## Introduction
This project is a redistribution of the [OpenTelemetry Agent for DotNet](https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation),
preconfigured for use with AWS services. Please check out that project too to get a better
understanding of the underlying internals. You won't see much code in this repository since we only
apply some small configuration changes, and our OpenTelemetry friends takes care of the rest.
## Prerequisites
1. Having one of [VSCode](https://code.visualstudio.com/docs/languages/dotnet), Visual Studio, or ReSharper installed
2. Having dotnet cli installed.
## Important
The AWS Distro for OpenTelemetry for .NET currently does not support AWS SDK for .NET V4. We will offer support for V4 before the AWS SDK for .NET V3 reaches end of life on June 1, 2026. In the meantime, please use the AWS SDK for .NET V3 with this package for full instrumentation support.
Although this repository is released under the Apache-2.0 license, some Dockerfiles uses Windows as a base image, which is licensed under the following terms https://learn.microsoft.com/en-us/virtualization/windowscontainers/images-eula.
## Building the Project
### Building Locally
To build the dll files for the `AWS.Distro.OpenTelemetry.AutoInstrumentation` project, just run
```sh
dotnet build
```
This will build the dll under `src/AWS.Distro.OpenTelemetry.AutoInstrumentation/bin/Debug/net8.0`.
### Building For Release
To build the project for release, packaged with OpenTelemetry DotNet Instrumentation, run the following in the root directory:
```sh
bash build.sh
```
This runs build/Build.cs which basically pulls OpenTelemetry DotNet Instrumentation packaged zip file and adds the `AWS.Distro.OpenTelemetry.AutoInstrumentation` dll there.
## Styling
This package uses [StyleCop](https://github.com/DotNetAnalyzers/StyleCopAnalyzers) to enforce styling rules as well as having Copyright headers. More information about the rules themselves can be found [here](https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/DOCUMENTATION.md). The project is configured to use StyleCop so any file that is added that violates any of the rules, the Code Editor will complain. Alternatively, running `dotnet build` will complain as well. Unfortunately, it doesn't auto apply styling. To fix "most" of styling issues that come up, you can run `dotnet format`.
## Testing
For Integration Testing, follow README under `sample-applications/integration-test-app`
For Unit Testing, followed this [doc](https://learn.microsoft.com/en-us/dotnet/core/testing/unit-testing-with-dotnet-test) to create test/AWS.Distro.OpenTelemetry.AutoInstrumentation.Tests directory. You can use that doc to add more unit tests. To run the unit tests, run `dotnet test`
## Security
See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.
## License
This project is licensed under the Apache-2.0 License.
## Checksum Verification
Artifacts released will include a `.sha256` file for checksum verification starting from v1.5.0
To verify, run the command `shasum -a 256 -c .sha256`
It should return the output `: OK` if the validation is successful