Skip to content

Commit

Permalink
examples(get-started-tracetest-cloud): add 3 deployment arch
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanrahic committed Sep 19, 2024
1 parent 8e36937 commit 70a4021
Show file tree
Hide file tree
Showing 28 changed files with 8,416 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/docs/getting-started/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ HTTP: `http://tracetest-agent.default.svc.cluster.local:4318/v1/traces`
Make sure to check use the correct `<service-name>` if you edit the Tracetest Agent `service` name.

Running a test against `localhost` will resolve as `127.0.0.1` inside the Tracetest Agent container.
Make sure to run tests using the internal Kubernetes service networking eg: `http://api.default.svc.cluster.internal:port`.
Make sure to run tests using the internal Kubernetes service networking eg: `http://api.default.svc.cluster.local:port`.
:::

</TabItem>
Expand Down Expand Up @@ -323,7 +323,7 @@ kubectl port-forward svc/api 8081:8081

- [`https://app.tracetest.io/`](https://app.tracetest.io) - Access the Tracetest Web UI. Sign up and create an organization.
- [`http://localhost:8081`](http://localhost:8081) - The Pokeshop API demo is port forwarded from Kubernetes to `localhost` on this port.
- To run tests you will use the Kubernetes internal network and the service name, `http://api.default.svc.cluster.internal:8081`.
- To run tests you will use the Kubernetes internal network and the service name, `http://api.default.svc.cluster.local:8081`.
- `tracetest-agent.default.svc.cluster.local:4317` - Trace ingestion URL where Tracetest Agent will accept traces.

</TabItem>
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/install/kubernetes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,5 @@ HTTP: `http://tracetest-agent.default.svc.cluster.local:4318/v1/traces`
Make sure to check use the correct `<service-name>` if you edit the Tracetest Agent `service` name.

Running a test against `localhost` will resolve as `127.0.0.1` inside the Tracetest Agent container.
Make sure to run tests using the internal Kubernetes service networking eg: `http://api.default.svc.cluster.internal:port`.
Make sure to run tests using the internal Kubernetes service networking eg: `http://api.default.svc.cluster.local:port`.
:::
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
TRACETEST_API_KEY=""
TRACETEST_ENVIRONMENT_ID=""
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM node:slim
WORKDIR /usr/src/app/
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 8080
12 changes: 12 additions & 0 deletions examples/get-started-cloud-based-managed-tracetest/docker/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
require('./tracing'); // Initialize OpenTelemetry tracing

const express = require('express');
const app = express();

app.get('/', (req, res) => {
res.send('Hello, World!');
});

app.listen(8080, () => {
console.log('Server is running on port 8080');
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
services:
app:
image: app
build: .
command: npm start # runs "node app.js"
ports:
- 8080:8080
tracetest-agent:
image: kubeshop/tracetest-agent
environment:
- TRACETEST_API_KEY=${TRACETEST_API_KEY}
- TRACETEST_ENVIRONMENT_ID=${TRACETEST_ENVIRONMENT_ID}
command:
- "--mode=verbose"
ports:
- 4317:4317
- 4318:4318
Loading

0 comments on commit 70a4021

Please sign in to comment.