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

docs(config): add page for internal telemetry #2458

Merged
merged 4 commits into from
Apr 28, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 38 additions & 0 deletions docs/docs/configuration/telemetry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Telemetry

The Tracetest server generates internal observability trace data. You can use this data to track Tracetest test runs over time and gain observability of how the Tracetest server is behaving.

The Tracetest team uses an observability-driven development approach in developing the Tracetest server, capturing traces and then running Tracetest tests against it as part of the CI/CD process. You can read more about how we "eat our own dog food" in [this blog post](https://tracetest.io/blog/integrating-tracetest-with-github-actions-in-a-ci-pipeline) about the CI/CD configuration where we test Tracetest with Tracetest.

## Configuring Tracetest Server Internal Telemetry

You can configure an exporter to send the trace data to an OpenTelemetry Collector and then store it safely in your trace data store for further historical analysis. View the [supported trace data stores](./overview#supported-trace-data-stores) for more guidance on setting them up.

In the `tracetest-config.yaml` file, alongside the [configuration](./server.md) of connecting Tracetest to the Postgres instance, you can also define a `telemetry` and `server` section.

With these two additional sections, you define an exporter where the Tracetest server's internal telemetry will be routed to. In the `telemetry` section, you define the endpoint of the OpenTelemetry Collector. And, in the `server` section you define which exporter the Tracetest server will use.

```yaml
# tracetest-config.yaml
postgres:
# [...]

telemetry:
exporters:
collector:
serviceName: tracetest
sampling: 100 # 100%
exporter:
type: collector
collector:
endpoint: otel-collector:4317
# Replace with your OpenTelemetry Collector endpoint

server:
telemetry:
exporter: collector
```

:::note
Make sure to check what the service endpoint for the OpenTelemetry Collector in your infrastructure is. The example above is using `otel-collector` because that is the service name in Docker Compose. Your infrastructure might differ.
:::
5 changes: 5 additions & 0 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ const sidebars = {
id: "configuration/analytics",
label: "Analytics",
},
{
type: "doc",
id: "configuration/telemetry",
label: "Telemetry",
},
{
type: "doc",
id: "configuration/opentelemetry-collector-configuration-file-reference",
Expand Down
2 changes: 2 additions & 0 deletions examples/quick-start-github-actions/readme.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# GitHub Actions Sample for a Node.js app with OpenTelemetry and Tracetest

> [Read the detailed recipe for setting up GitHub Actions with Tractest in our documentation.](https://docs.tracetest.io/ci-cd-automation/github-actions-pipeline)

This is a simple quick start on how to configure GitHub Actions to run Tracetest against a Node.js app that uses OpenTelemetry instrumentation with traces, to enhancing your e2e and integration tests with trace-based testing.

Feel free to check out the [docs](https://docs.tracetest.io/), and join our [Discord Community](https://discord.gg/8MtcMrQNbX) for more info!