-
Notifications
You must be signed in to change notification settings - Fork 74
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
chore(examples/docs): Updating Synth Monitoring Examples #3971
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
7 changes: 5 additions & 2 deletions
7
examples/quick-start-nodejs-synthetic-monitoring/.env.template
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,6 +1,9 @@ | ||
# Get the required information here: https://app.tracetest.io/retrieve-token | ||
|
||
TRACETEST_TOKEN="<YOUR_TRACETEST_TOKEN>" | ||
TRACETEST_ENVIRONMENT_ID="<YOUR_ENV_ID>" | ||
|
||
# GRPC | ||
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="http://tracetest-agent:4317/" | ||
# or, use HTTP | ||
# OTEL_EXPORTER_OTLP_TRACES_ENDPOINT="http://tracetest-agent:4318/v1/traces" | ||
TRACETEST_API_KEY="<YOUR_TRACETEST_API_KEY>" | ||
TRACETEST_API_TOKEN="<YOUR_TRACETEST_TOKEN>" |
11 changes: 11 additions & 0 deletions
11
examples/quick-start-nodejs-synthetic-monitoring/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
18 changes: 18 additions & 0 deletions
18
examples/quick-start-nodejs-synthetic-monitoring/resources/apply.sh
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,18 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
TOKEN=$TRACETEST_TOKEN | ||
ENVIRONMENT_ID=$TRACETEST_ENVIRONMENT_ID | ||
|
||
apply() { | ||
echo "Configuring TraceTest" | ||
tracetest configure --token $TOKEN --environment $ENVIRONMENT_ID | ||
|
||
echo "Applying Resources" | ||
tracetest apply datastore -f /resources/datastore.yaml | ||
tracetest apply test -f /resources/test.yaml | ||
tracetest apply monitor -f /resources/monitor.yaml | ||
} | ||
|
||
apply |
5 changes: 5 additions & 0 deletions
5
examples/quick-start-nodejs-synthetic-monitoring/resources/datastore.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,5 @@ | ||
type: DataStore | ||
spec: | ||
id: current | ||
name: otlp | ||
type: otlp |
23 changes: 23 additions & 0 deletions
23
examples/quick-start-nodejs-synthetic-monitoring/resources/monitor.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,23 @@ | ||
type: Monitor | ||
spec: | ||
id: JtFYYc9SR | ||
name: Quick Start Synthetic Monitor | ||
enabled: true | ||
variableSetId: "" | ||
tests: | ||
- phAZcrT4B | ||
schedule: | ||
cron: "*/1 * * * *" | ||
timeZone: Etc/UTC | ||
alerts: | ||
- id: slack-webhook-message | ||
type: webhook | ||
webhook: | ||
body: "{\n \"text\": \"Monitor ${.Monitor.Name} has failed, follow the link to find the <${.URL}|results>\"\n}" | ||
method: POST | ||
url: <your-webhook-url> | ||
headers: | ||
- key: Content-Type | ||
value: application/json | ||
events: | ||
- FAILED |
16 changes: 16 additions & 0 deletions
16
examples/quick-start-nodejs-synthetic-monitoring/resources/run.sh
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 |
File renamed without changes.
23 changes: 0 additions & 23 deletions
23
examples/quick-start-nodejs-synthetic-monitoring/tracetest-synthetic-monitor.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.