-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(examples/docs): Update App Insights
- Loading branch information
Showing
18 changed files
with
138 additions
and
230 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 0 additions & 57 deletions
57
examples/tracetest-azure-app-insights-collector/tracetest/docker-compose.yaml
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
examples/tracetest-azure-app-insights-collector/tracetest/tracetest-provision.yaml
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
examples/tracetest-azure-app-insights-collector/tracetest/tracetest.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
# Azure | ||
CONNECTION_STRING="" | ||
RESOURCE_ARM_ID="/subscriptions/<id>/resourceGroups/app-insights-1/providers/microsoft.insights/components/<name>" | ||
# Get the required information here: https://app.tracetest.io/retrieve-token | ||
|
||
TRACETEST_TOKEN="<YOUR_TRACETEST_TOKEN>" | ||
TRACETEST_ENVIRONMENT_ID="<YOUR_ENV_ID>" | ||
|
||
# Tracetest API key and token | ||
TRACETEST_API_KEY="<YOUR_TRACETEST_API_KEY>" | ||
TRACETEST_API_TOKEN="<YOUR_TRACETEST_TOKEN>" | ||
# Azure | ||
APP_INSIGHTS_ACCESS_TOKEN="" | ||
APP_INSIGHTS_ARM_ID="/subscriptions/<id>/resourceGroups/app-insights-1/providers/microsoft.insights/components/<name>" | ||
APP_INSIGHTS_INSTRUMENTATION_STRING="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
config.yaml | ||
node_modules | ||
.env | ||
resources/datastore.yaml |
11 changes: 11 additions & 0 deletions
11
examples/tracetest-azure-app-insights/Dockerfile.tracetest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
FROM alpine | ||
|
||
WORKDIR /app | ||
ARG TRACETEST_IMAGE_VERSION=v1.4.0 | ||
|
||
RUN apk --update add bash jq curl | ||
RUN curl -L https://raw.githubusercontent.com/kubeshop/tracetest/main/install-cli.sh | bash -s -- $TRACETEST_IMAGE_VERSION | ||
|
||
WORKDIR /resources | ||
|
||
ENTRYPOINT ["echo", "Tracetest CLI installed"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
TOKEN=$TRACETEST_TOKEN | ||
ENVIRONMENT_ID=$TRACETEST_ENVIRONMENT_ID | ||
ARM_ID=$APP_INSIGHTS_ARM_ID | ||
ACCESS_TOKEN=$APP_INSIGHTS_ACCESS_TOKEN | ||
|
||
apply() { | ||
echo "Configuring TraceTest" | ||
tracetest configure --token $TOKEN --environment $ENVIRONMENT_ID | ||
|
||
echo " | ||
type: DataStore | ||
spec: | ||
name: azureappinsights | ||
type: azureappinsights | ||
azureappinsights: | ||
connectionType: direct | ||
resourceArmId: ${ARM_ID} | ||
accessToken: ${ACCESS_TOKEN} | ||
useAzureActiveDirectoryAuth: false | ||
" > /resources/datastore.yaml | ||
|
||
echo "Applying Resources" | ||
tracetest apply datastore -f /resources/datastore.yaml | ||
tracetest apply pollingprofile -f /resources/pollingprofile.yaml | ||
tracetest apply test -f /resources/test.yaml | ||
} | ||
|
||
apply |
9 changes: 9 additions & 0 deletions
9
examples/tracetest-azure-app-insights/resources/pollingprofile.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
type: PollingProfile | ||
spec: | ||
id: azure | ||
name: azure | ||
strategy: periodic | ||
periodic: | ||
retryDelay: 4s | ||
timeout: 10m |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
TOKEN=$TRACETEST_TOKEN | ||
ENVIRONMENT_ID=$TRACETEST_ENVIRONMENT_ID | ||
|
||
run() { | ||
echo "Configuring Tracetest" | ||
tracetest configure --token $TOKEN --environment $ENVIRONMENT_ID | ||
|
||
echo "Running Trace-Based Tests..." | ||
tracetest run test -f /resources/test.yaml | ||
} | ||
|
||
run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
type: Test | ||
spec: | ||
id: W656Q0c4g | ||
name: Test API | ||
description: Test the App. | ||
pollingProfile: azure | ||
trigger: | ||
type: http | ||
httpRequest: | ||
url: http://app:8080 | ||
method: GET | ||
headers: | ||
- key: Content-Type | ||
value: application/json | ||
specs: | ||
- selector: span[tracetest.span.type="http" name="GET /"] | ||
assertions: | ||
- attr:http.response.status_code = 200 | ||
- attr:tracetest.span.duration < 500ms |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
examples/tracetest-azure-app-insights/tracetest-tracing-backend.yaml
This file was deleted.
Oops, something went wrong.
52 changes: 0 additions & 52 deletions
52
examples/tracetest-azure-app-insights/tracetest/docker-compose.yaml
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
examples/tracetest-azure-app-insights/tracetest/tracetest-provision.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.