Skip to content
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

examples(get-started-tracetest-cloud): add deployment architectures #4025

Merged
merged 8 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading