Skip to content

Commit

Permalink
examples(get-started-tracetest-cloud): add 4 deployment architecture …
Browse files Browse the repository at this point in the history
…samples (#4025)

* examples(get-started-tracetest-cloud): add 3 deployment arch

* examples(get-started-tracetest-cloud): add sls code

* cleanupo

* updating usage of API gateway v2

* examples(get-start-tracetest-cloud): cleanup readmes

* examples(get-started-tracetest-cloud): add simple console exporter

* examples: edit readme

* examples: standardize dockerfiles

---------

Co-authored-by: Oscar Reyes <[email protected]>
  • Loading branch information
adnanrahic and xoscar committed Sep 20, 2024
1 parent 8e36937 commit 4147cb3
Show file tree
Hide file tree
Showing 36 changed files with 11,049 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,7 @@
FROM node:slim
WORKDIR /usr/src/app/
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 8080
CMD [ "npm", "start" ]
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,16 @@
services:
app:
image: app
build: .
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 4147cb3

Please sign in to comment.