You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This ticket is a duplicate of #90707, for Sprint 9, so that the work can be finished. It was delayed due to needing support from DataDog.
Description
Following up on the work done in the Discovery in #79623 , this ticket is the implementation work for source code integration using DataDog, in anticipation of the deprecation of Sentry and to further build out DataDog functionality. This feature will enhance error investigation by offering direct links to the relevant sections of the Vets API repository within the error logs. See setup configuration. Integrating source code with Datadog's APM is a valuable step to consider for improved error analysis and debugging.
Tasks
Detailed Steps for Ruby implementation:
Step 1: Update the Dockerfile
We'll start by adding build arguments to our Dockerfile. These will capture the Git repository URL and the current commit SHA. Add the following lines to your Dockerfile: dockerfile
Define build-time arguments for Git repository URL and commit SHA
ARG DD_GIT_REPOSITORY_URL
ARG DD_GIT_COMMIT_SHA
Set an environment variable that Datadog can use to tag telemetry
These instructions set up build-time arguments which are then converted into an environment variable, DD_TAGS. This environment variable will store our version control information in a format that Datadog can use to tag telemetry data.
Step 2: Building the Docker Image
Next, we'll build our Docker image and pass in the necessary version control information as arguments. This is crucial for ensuring each image build can be accurately traced back to its codebase state. Use the following command in your terminal or CI/CD pipeline: bash
docker build .
-t my-application
--build-arg DD_GIT_REPOSITORY_URL=<git-provider.example/me/my-repo>
--build-arg DD_GIT_COMMIT_SHA=$(git rev-parse HEAD)
Replace <git-provider.example/me/my-repo> with the actual URL of your Git repository. The $(git rev-parse HEAD) command fetches the latest commit SHA from your repository, ensuring your build is tagged with the most recent codebase state.
Step 3: Deploy and Run
With the build complete, you can run your Docker container as usual. The environment variable containing the Git details is now embedded within the container.
Step 4: Validation in Datadog
Once application is deployed, log into Datadog to confirm that the telemetry data is being tagged correctly. We should see git.repository_url and git.commit.sha tags accompanying metrics, logs, and traces, which help in tracing issues back to their source changes.
Acceptability Criteria
Telemetry data is being tagged correctly
Validate git.repository_url and git.commit.sha tags accompanying metrics, logs, and traces
Definition of Done
Telemetry data is correctly tagged
Metrics, logs, and traces are validated for git.repository_url and git.commit.sha
The text was updated successfully, but these errors were encountered:
Waiting on reply. Jason sent an email (from VA email) and will check to see if he got a response. Update: the contact was out of office, so we're still waiting.
Not completed during Sprint 14 because it is blocked pending a response from the VA to troubleshoot email access. Moving to Sprint 16 when the dev. returns from PTO.
Standup note:@Kshitiz-devops has access to his VA email but is still waiting on a response from the contact at the VA so the work is still blocked. He will send a follow-up email. This ticket will roll over to Sprint 18.
This ticket is a duplicate of #90707, for Sprint 9, so that the work can be finished. It was delayed due to needing support from DataDog.
Description
Following up on the work done in the Discovery in #79623 , this ticket is the implementation work for source code integration using DataDog, in anticipation of the deprecation of Sentry and to further build out DataDog functionality. This feature will enhance error investigation by offering direct links to the relevant sections of the Vets API repository within the error logs. See setup configuration. Integrating source code with Datadog's APM is a valuable step to consider for improved error analysis and debugging.
Tasks
Detailed Steps for Ruby implementation:
Step 1: Update the Dockerfile
We'll start by adding build arguments to our Dockerfile. These will capture the Git repository URL and the current commit SHA. Add the following lines to your Dockerfile: dockerfile
Define build-time arguments for Git repository URL and commit SHA
ARG DD_GIT_REPOSITORY_URL
ARG DD_GIT_COMMIT_SHA
Set an environment variable that Datadog can use to tag telemetry
ENV DD_TAGS="git.repository_url:${DD_GIT_REPOSITORY_URL},git.commit.sha:${DD_GIT_COMMIT_SHA}"
These instructions set up build-time arguments which are then converted into an environment variable, DD_TAGS. This environment variable will store our version control information in a format that Datadog can use to tag telemetry data.
Step 2: Building the Docker Image
Next, we'll build our Docker image and pass in the necessary version control information as arguments. This is crucial for ensuring each image build can be accurately traced back to its codebase state. Use the following command in your terminal or CI/CD pipeline: bash
docker build .
-t my-application
--build-arg DD_GIT_REPOSITORY_URL=<git-provider.example/me/my-repo>
--build-arg DD_GIT_COMMIT_SHA=$(git rev-parse HEAD)
Replace <git-provider.example/me/my-repo> with the actual URL of your Git repository. The $(git rev-parse HEAD) command fetches the latest commit SHA from your repository, ensuring your build is tagged with the most recent codebase state.
Step 3: Deploy and Run
With the build complete, you can run your Docker container as usual. The environment variable containing the Git details is now embedded within the container.
Step 4: Validation in Datadog
Once application is deployed, log into Datadog to confirm that the telemetry data is being tagged correctly. We should see git.repository_url and git.commit.sha tags accompanying metrics, logs, and traces, which help in tracing issues back to their source changes.
Acceptability Criteria
Definition of Done
The text was updated successfully, but these errors were encountered: