-
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.
updating grafana tempo nodejs examples
- Loading branch information
Showing
15 changed files
with
160 additions
and
475 deletions.
There are no files selected for viewing
380 changes: 21 additions & 359 deletions
380
.../docs/examples-tutorials/recipes/running-tracetest-with-grafana-cloud-tempo.mdx
Large diffs are not rendered by default.
Oops, something went wrong.
10 changes: 8 additions & 2 deletions
10
examples/quick-start-grafana-cloud-tempo-nodejs/.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,2 +1,8 @@ | ||
TRACETEST_API_KEY="<YOUR_TRACETEST_API_KEY>" | ||
TRACETEST_API_TOKEN="<YOUR_TRACETEST_TOKEN>" | ||
# Get the required information here: https://app.tracetest.io/retrieve-token | ||
|
||
TRACETEST_TOKEN="<YOUR_TRACETEST_TOKEN>" | ||
TRACETEST_ENVIRONMENT_ID="<YOUR_ENV_ID>" | ||
|
||
# https://grafana.com/blog/2021/04/13/how-to-send-traces-to-grafana-clouds-tempo-service-with-opentelemetry-collector/ | ||
GRAFANA_AUTH_READ_HASH="<YOUR_GRAFANA_AUTH_READ_HASH>" | ||
GRAFANA_AUTH_WRITE_HASH="<YOUR_GRAFANA_AUTH_WRITE_HASH>" |
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 @@ | ||
node_modules | ||
.DS_Store | ||
.env | ||
/resources/datastore.yaml |
11 changes: 11 additions & 0 deletions
11
examples/quick-start-grafana-cloud-tempo-nodejs/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: 0 additions & 18 deletions
18
examples/quick-start-grafana-cloud-tempo-nodejs/docker-compose.agent.yaml
This file was deleted.
Oops, something went wrong.
61 changes: 60 additions & 1 deletion
61
examples/quick-start-grafana-cloud-tempo-nodejs/docker-compose.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 |
---|---|---|
@@ -1,7 +1,66 @@ | ||
version: '3' | ||
version: "3" | ||
|
||
services: | ||
app: | ||
image: quick-start-nodejs | ||
build: . | ||
ports: | ||
- "8080:8080" | ||
depends_on: | ||
otel-collector: | ||
condition: service_started | ||
|
||
otel-collector: | ||
image: otel/opentelemetry-collector-contrib:0.105.0 | ||
command: | ||
- "--config" | ||
- "/otel-local-config.yaml" | ||
environment: | ||
- GRAFANA_AUTH_WRITE_HASH | ||
volumes: | ||
- ./collector.config.yaml:/otel-local-config.yaml | ||
|
||
# Cloud-based Managed Tracetest | ||
tracetest-agent: | ||
image: kubeshop/tracetest-agent:latest | ||
environment: | ||
# Get the required information here: https://app.tracetest.io/retrieve-token | ||
- TRACETEST_API_KEY=${TRACETEST_TOKEN} | ||
- TRACETEST_ENVIRONMENT_ID=${TRACETEST_ENVIRONMENT_ID} | ||
|
||
tracetest-apply: | ||
build: | ||
dockerfile: Dockerfile.tracetest | ||
volumes: | ||
- ./resources:/resources | ||
environment: | ||
TRACETEST_TOKEN: ${TRACETEST_TOKEN} | ||
TRACETEST_ENVIRONMENT_ID: ${TRACETEST_ENVIRONMENT_ID} | ||
GRAFANA_AUTH_READ_HASH: ${GRAFANA_AUTH_READ_HASH} | ||
entrypoint: | ||
- bash | ||
- /resources/apply.sh | ||
networks: | ||
default: null | ||
depends_on: | ||
app: | ||
condition: service_started | ||
tracetest-agent: | ||
condition: service_started | ||
|
||
tracetest-run: | ||
build: | ||
dockerfile: Dockerfile.tracetest | ||
volumes: | ||
- ./resources:/resources | ||
environment: | ||
TRACETEST_TOKEN: ${TRACETEST_TOKEN} | ||
TRACETEST_ENVIRONMENT_ID: ${TRACETEST_ENVIRONMENT_ID} | ||
entrypoint: | ||
- bash | ||
- /resources/run.sh | ||
networks: | ||
default: null | ||
depends_on: | ||
tracetest-apply: | ||
condition: service_completed_successfully |
32 changes: 32 additions & 0 deletions
32
examples/quick-start-grafana-cloud-tempo-nodejs/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,32 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
TOKEN=$TRACETEST_TOKEN | ||
ENVIRONMENT_ID=$TRACETEST_ENVIRONMENT_ID | ||
GRAFANA_HASH=$GRAFANA_AUTH_READ_HASH | ||
|
||
apply() { | ||
echo "Configuring TraceTest" | ||
tracetest configure --token $TOKEN --environment $ENVIRONMENT_ID | ||
|
||
echo "Applying Resources" | ||
echo " | ||
type: DataStore | ||
spec: | ||
id: current | ||
name: Grafana Tempo Cloud | ||
type: tempo | ||
tempo: | ||
type: http | ||
http: | ||
url: https://tempo-us-central1.grafana.net/tempo | ||
headers: | ||
Authorization: Basic ${GRAFANA_HASH} | ||
" > /resources/datastore.yaml | ||
|
||
tracetest apply datastore -f /resources/datastore.yaml | ||
tracetest apply test -f /resources/test.yaml | ||
} | ||
|
||
apply |
16 changes: 16 additions & 0 deletions
16
examples/quick-start-grafana-cloud-tempo-nodejs/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.
27 changes: 0 additions & 27 deletions
27
examples/quick-start-grafana-cloud-tempo-nodejs/tracetest/collector.config.yaml
This file was deleted.
Oops, something went wrong.
46 changes: 0 additions & 46 deletions
46
examples/quick-start-grafana-cloud-tempo-nodejs/tracetest/docker-compose.yaml
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
examples/quick-start-grafana-cloud-tempo-nodejs/tracetest/tracetest-config.yaml
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
examples/quick-start-grafana-cloud-tempo-nodejs/tracetest/tracetest-provision.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