Skip to content

Commit

Permalink
feat: add Dynatrace datasource (#2989)
Browse files Browse the repository at this point in the history
* feat: add Dynatrace datasource

Signed-off-by: Adam Gardner <[email protected]>

* Update docs/docs/examples-tutorials/recipes/running-tracetest-with-dynatrace.md

Co-authored-by: Daniel Baptista Dias <[email protected]>

* updates

Signed-off-by: Adam Gardner <[email protected]>

* update DataStore constants

Signed-off-by: Adam Gardner <[email protected]>

* fix typo

Signed-off-by: Adam Gardner <[email protected]>

* export Dynatrace

Signed-off-by: Adam Gardner <[email protected]>

* update file names

Signed-off-by: Adam Gardner <[email protected]>

* address findings

Signed-off-by: Adam Gardner <[email protected]>

---------

Signed-off-by: Adam Gardner <[email protected]>
Co-authored-by: Daniel Baptista Dias <[email protected]>
  • Loading branch information
agardnerIT and danielbdias authored Jul 31, 2023
1 parent e8497d9 commit 1144c83
Show file tree
Hide file tree
Showing 34 changed files with 737 additions and 5 deletions.
1 change: 1 addition & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ This is the entire checklist on what we should do to assert that Tracetest is wo

- [ ] [Amazon X-Ray example](https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-amazon-x-ray)
- [ ] [Datadog example](https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-datadog)
- [ ] [Dynatrace example](https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-dynatrace)
- [ ] [Elastic APM example](https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-elasticapm)
- [ ] [Lightstep example](https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-lightstep)
- [ ] [New Relic example](https://github.com/kubeshop/tracetest/tree/main/examples/tracetest-new-relic)
Expand Down
3 changes: 2 additions & 1 deletion api/dataStores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ components:
awsxray,
honeycomb,
azureappinsights,
signoz
signoz,
dynatrace
]
SupportedClients:
type: string
Expand Down
2 changes: 2 additions & 0 deletions cli/openapi/model_supported_data_stores.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions docs/docs/cli/creating-data-stores.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,16 @@ spec:
default: true
```
### Dynatrace
```yaml
type: DataStore
spec:
name: Dynatrace pipeline
type: dynatrace
default: true
```
### Honeycomb
```yaml
Expand Down
99 changes: 99 additions & 0 deletions docs/docs/configuration/connecting-to-data-stores/dynatrace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Dynatrace

If you want to use [Dynatrace](https://www.dynatrace.com/) as the trace data store, you'll configure the OpenTelemetry Collector to receive traces from your system and then send them to both Tracetest and Dynatrace. And, you don't have to change your existing pipelines to do so.

:::tip
Examples of configuring Tracetest with Dynatrace can be found in the [`examples` folder of the Tracetest GitHub repo](https://github.com/kubeshop/tracetest/tree/main/examples).
:::

## Configuring OpenTelemetry Collector to Send Traces to both Dynatrace and Tracetest

In your OpenTelemetry Collector config file:

- Set the `exporter` to `otlp/tracetest`
- Set the `endpoint` to your Tracetest instance on port `4317`

:::tip
If you are running Tracetest with Docker, and Tracetest's service name is `tracetest`, then the endpoint might look like this `http://tracetest:4317`
:::

Additionally, add another config:

- Set the `exporter` to `otlp/dynatrace`
- Set the `endpoint` to your Dynatrace tenant and include the: `https://{your-environment-id}.live.dynatrace.com/api/v2/otlp`

```yaml
# collector.config.yaml

# If you already have receivers declared, you can just ignore
# this one and still use yours instead.
receivers:
otlp:
protocols:
grpc:
http:

processors:
batch:
timeout: 100ms

exporters:
logging:
verbosity: detailed
# OTLP for Tracetest
otlp/tracetest:
endpoint: tracetest:4317 # Send traces to Tracetest. Read more in docs here: https://docs.tracetest.io/configuration/connecting-to-data-stores/opentelemetry-collector
tls:
insecure: true
# OTLP for Dynatrace
otlp/dynatrace:
endpoint: https://abc123.live.dynatrace.com/api/v2/otlp # Send traces to Dynatrace. Read more in docs here: https://www.dynatrace.com/support/help/extend-dynatrace/opentelemetry/collector#configuration
headers:
Authorization: "Api-Token dt0c01.sample.secret" # Requires "openTelemetryTrace.ingest" permission
service:
pipelines:
traces/tracetest: # Pipeline to send data to Tracetest
receivers: [otlp]
processors: [batch]
exporters: [logging, otlp/tracetest]
traces/Dynatrace: # Pipeline to send data to Dynatrace
receivers: [otlp]
processors: [batch]
exporters: [logging, otlp/dynatrace]
```
## Configure Tracetest to Use Dynatrace as a Trace Data Store
Configure your Tracetest instance to expose an `otlp` endpoint to make it aware it will receive traces from the OpenTelemetry Collector. This will expose Tracetest's trace receiver on port `4317`.

## Connect Tracetest to Dynatrace with the Web UI

In the Web UI, (1) open Settings, and, on the (2) Configure Data Store tab, select (3) Dynatrace.

<!-- TODO: create this image using the same standard as the other stores -->
![Dynatrace](../img/Dynatrace-settings.png)

## Connect Tracetest to Dynatrace with the CLI

Or, if you prefer using the CLI, you can use this file config.

```yaml
type: DataStore
spec:
name: Dynatrace pipeline
type: dynatrace
default: true
```

Proceed to run this command in the terminal and specify the file above.

```bash
tracetest apply datastore -f my/data-store/file/location.yaml
```

<!--
TODO: create a tutorial for Dynatrace
:::tip
To learn more, [read the recipe on running a sample app with Dynatrace and Tracetest](../../examples-tutorials/recipes/running-tracetest-with-dynatrace.md).
:::
-->
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Currently, Tracetest supports the following data stores. Click on the respective
- [Datadog](./connecting-to-data-stores/datadog)
- [Honeycomb](./connecting-to-data-stores/honeycomb.md)
- [Azure App Insights](./connecting-to-data-stores/azure-app-insights.md)
- [Dynatrace](./connecting-to-data-stores/dynatrace)

Continue reading below to learn how to configure the OpenTelemetry Collector to send trace data from your application to any of the trace data stores above.

Expand Down
1 change: 1 addition & 0 deletions docs/docs/configuration/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Currently, Tracetest supports the following data stores. Click on the respective
- [Datadog](./connecting-to-data-stores/datadog)
- [Honeycomb](./connecting-to-data-stores/honeycomb)
- [Azure App Insights](./connecting-to-data-stores/azure-app-insights.md)
- [Dynatrace](./connecting-to-data-stores/dynatrace)

## Using Tracetest without a Trace Data Store

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/docs/examples-tutorials/recipes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ This integration point uses the OpenTelemetry Collector as a router to send trac
- [Sending traces to New Relic and Tracetest from the OpenTelemetry Demo with OpenTelemetry Collector](./recipes/running-tracetest-with-new-relic.md)
- [Sending traces to Datadog and Tracetest from the OpenTelemetry Demo with OpenTelemetry Collector](./recipes/running-tracetest-with-datadog.md)
- [Sending traces to Honeycomb and Tracetest from a Node.js app using the OpenTelemetry Collector](./recipes/running-tracetest-with-honeycomb.md)
- [Sending traces to Dynatrace and Tracetest from the OpenTelemetry Demo with OpenTelemetry Collector](./recipes/running-tracetest-with-dynatrace.md)

### Jaeger

Expand Down
Loading

0 comments on commit 1144c83

Please sign in to comment.