[SVLS-5280] bundle .NET tracer script with serverless-init#366
Conversation
| ARG TARGETARCH | ||
|
|
||
| COPY ./bin/datadog_extension-$TARGETARCH-alpine/extensions/datadog-agent /datadog-init | ||
| COPY ./bin/serverless_init_dotnet.sh /dotnet.sh |
There was a problem hiding this comment.
do we have to add this for some reason for alpine?
There was a problem hiding this comment.
ah yeah, you're right, that's unnecessary for alpine ✏️
joeyzhao2018
left a comment
There was a problem hiding this comment.
1 minor comment. non-blocking. 🚢
| apt-get update && apt-get install -y curl | ||
|
|
||
| # Get latest released version of dd-trace-dotnet | ||
| TRACER_VERSION=$(curl -s https://api.github.com/repos/DataDog/dd-trace-dotnet/releases/latest | jq -r '.tag_name' | cut -d '"' -f 4 | cut -c2-) |
There was a problem hiding this comment.
What if they hit rate limit? Should we hardcode a fallback version?
There was a problem hiding this comment.
yeah good point 👍
There was a problem hiding this comment.
had this page open and just saw this and thinking it's probably safer to let the operation fail (fast) than fallback to any version which might cause unexpected issue.
There was a problem hiding this comment.
it's probably safer to let the operation fail (fast)
wouldn't this crash your customer if it fails?
There was a problem hiding this comment.
that's a very good question. I was thinking that we should favor failing at deployment time over any fallback solution. more about the evil of fallback
However, this is a good question on when it's "crashing". I assumed that the image build is built once and reused when scaling happens, which is the most sensitive time.
If it's not reused, crashing during scaling may be indeed undesirable.
But could it even create a scenario where some instances running with one version and others using fallback versions?
There was a problem hiding this comment.
But could it even create a scenario where some instances running with one version and others using fallback versions?
I don't know, you tell me!
I agree, I don't like fallbacks, yet I don't want us to crash customers. Pick as your product needs 😛
There was a problem hiding this comment.
ah yeah, that's true. It might not be so obvious to the user that there's a fallback version too should the version request fail when they're running this in their pipelines. I'll revert
This reverts commit deee922.
Action item for incident-29739.
Adds a .NET tracer installation script to the serverless-init image build so users can call the script directly in their Dockerfile if they're building a .NET non-Alpine and non-arm64 image.
Shell script and testing provided by Storms: https://github.com/DataDog/serverless-self-monitoring/compare/storms/incident-29739. The script installs
curland finds the latest version of the .NET tracing library from Github releases and then installs the tracer.https://datadoghq.atlassian.net/browse/SVLS-5280