Skip to content

Commit

Permalink
[GEN-1953]: add Dash0 destination support and documentation (#2085)
Browse files Browse the repository at this point in the history
This pull request introduces a new observability backend, Dash0, to the
Odigos project. The key changes include the addition of Dash0 as a
supported destination, updates to the documentation, and modifications
to the configuration files to support Dash0.

### Key Changes:

#### Addition of Dash0 as a Supported Destination:
* Added Dash0 configuration in `common/config/dash0.go` to handle the
setup and configuration of Dash0 as a destination.
* Included Dash0 in the list of available destinations in
`common/config/root.go` and `common/dests.go`.
[[1]](diffhunk://#diff-35f076c473aa76e7717e17ac33041f73ec6b16e26fe8a1ab50bf5963cb7fcd8eL18-R23)
[[2]](diffhunk://#diff-e0ef4d5cecfc896240ae7392424f227db50784f83d0ddc0c317db59066f8757bR14)
* Added Dash0 destination data in `destinations/data/dash0.yaml`.

#### Documentation Updates:
* Updated `README.md` to include Dash0 in the list of managed
destinations.
* Added a new documentation file `docs/backends/dash0.mdx` to provide
detailed instructions for configuring Dash0 as a backend.
* Updated various documentation files to reference Dash0, including
`docs/backends-overview.mdx`, `docs/quickstart/next-steps.mdx`, and
`docs/mint.json`.
[[1]](diffhunk://#diff-26115b197a8b9dd8ee351f05b2cade47da5acd788d74b9f962a325d3e1b919a2R17)
[[2]](diffhunk://#diff-25ae422c52600166452821f8cc42d670b6b530e5f32a1b3aae657b05adb74ed7R27)
[[3]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debR189)

#### Minor Documentation Formatting:
* Fixed formatting issues in `README.md` and other documentation files
to ensure consistency and readability.
[[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L29-R35)
[[2]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L116-R117)
[[3]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL73-R73)
[[4]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL102-R114)
[[5]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL153-R134)
[[6]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL251-R223)
[[7]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL285-R258)
  • Loading branch information
BenElferink authored Dec 29, 2024
1 parent 119b5e0 commit 23f2bfb
Show file tree
Hide file tree
Showing 10 changed files with 218 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ For more details, see our [quickstart guide](https://docs.odigos.io/intro).
| Causely || | |
| Chronosphere ||| |
| Coralogix ||||
| Dash0 ||||
| Datadog ||||
| Dynatrace ||||
| Gigapipe || | |
Expand Down
68 changes: 68 additions & 0 deletions common/config/dash0.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package config

import (
"errors"

"github.com/odigos-io/odigos/common"
)

const (
Dash0Endpoint = "DASH0_ENDPOINT"
)

var (
ErrorDash0EndpointMissing = errors.New("Dash0 is missing a required field (\"DASH0_ENDPOINT\"), Dash0 will not be configured")
)

type Dash0 struct{}

func (j *Dash0) DestType() common.DestinationType {
return common.Dash0DestinationType
}

func (j *Dash0) ModifyConfig(dest ExporterConfigurer, currentConfig *Config) error {
config := dest.GetConfig()
uniqueUri := "dash0-" + dest.GetID()

url, exists := config[Dash0Endpoint]
if !exists {
return ErrorDash0EndpointMissing
}
endpoint, err := parseOtlpGrpcUrl(url, true)
if err != nil {
return err
}

exporterName := "otlp/" + uniqueUri
exporterConfig := GenericMap{
"endpoint": endpoint,
"headers": GenericMap{
"Authorization": "Bearer ${DASH0_TOKEN}",
},
}

currentConfig.Exporters[exporterName] = exporterConfig

if isTracingEnabled(dest) {
pipeName := "traces/" + uniqueUri
currentConfig.Service.Pipelines[pipeName] = Pipeline{
Exporters: []string{exporterName},
}
}

if isMetricsEnabled(dest) {
pipeName := "metrics/" + uniqueUri
currentConfig.Service.Pipelines[pipeName] = Pipeline{
Exporters: []string{exporterName},
}
}

if isLoggingEnabled(dest) {
pipeName := "logs/" + uniqueUri
currentConfig.Service.Pipelines[pipeName] = Pipeline{
Exporters: []string{exporterName},
}
}

return nil
}
53 changes: 47 additions & 6 deletions common/config/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,53 @@ const (
)

var availableConfigers = []Configer{
&AppDynamics{}, &Axiom{}, &AWSS3{}, &AzureBlobStorage{}, &BetterStack{}, &Causely{}, &Chronosphere{}, &Clickhouse{}, &Coralogix{},
&Datadog{}, &Debug{}, &Dynatrace{}, &ElasticAPM{}, &Elasticsearch{}, &GenericOTLP{}, &GoogleCloud{},
&GoogleCloudStorage{}, &GrafanaCloudLoki{}, &GrafanaCloudPrometheus{}, &GrafanaCloudTempo{}, &Groundcover{},
&Honeycomb{}, &HyperDX{}, &Jaeger{}, &KloudMate{}, &Last9{}, &Lightstep{}, &Logzio{}, &Loki{}, &Lumigo{}, &Middleware{}, &Mock{}, &NewRelic{},
&Nop{}, &OpsVerse{}, &OTLPHttp{}, &Prometheus{}, &Qryn{}, &QrynOSS{}, &Quickwit{}, &Sentry{},
&Signoz{}, &Splunk{}, &SumoLogic{}, &Tempo{}, &Uptrace{},
&AppDynamics{},
&Axiom{},
&AWSS3{},
&AzureBlobStorage{},
&BetterStack{},
&Causely{},
&Chronosphere{},
&Clickhouse{},
&Coralogix{},
&Dash0{},
&Datadog{},
&Debug{},
&Dynatrace{},
&ElasticAPM{},
&Elasticsearch{},
&GenericOTLP{},
&GoogleCloud{},
&GoogleCloudStorage{},
&GrafanaCloudLoki{},
&GrafanaCloudPrometheus{},
&GrafanaCloudTempo{},
&Groundcover{},
&Honeycomb{},
&HyperDX{},
&Jaeger{},
&KloudMate{},
&Last9{},
&Lightstep{},
&Logzio{},
&Loki{},
&Lumigo{},
&Middleware{},
&Mock{},
&NewRelic{},
&Nop{},
&OpsVerse{},
&OTLPHttp{},
&Prometheus{},
&Qryn{},
&QrynOSS{},
&Quickwit{},
&Sentry{},
&Signoz{},
&Splunk{},
&SumoLogic{},
&Tempo{},
&Uptrace{},
}

type Configer interface {
Expand Down
1 change: 1 addition & 0 deletions common/dests.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const (
ChronosphereDestinationType DestinationType = "chronosphere"
ClickhouseDestinationType DestinationType = "clickhouse"
CoralogixDestinationType DestinationType = "coralogix"
Dash0DestinationType DestinationType = "dash0"
DatadogDestinationType DestinationType = "datadog"
DebugDestinationType DestinationType = "debug"
DynatraceDestinationType DestinationType = "dynatrace"
Expand Down
29 changes: 29 additions & 0 deletions destinations/data/dash0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
apiVersion: internal.odigos.io/v1beta1
kind: Destination
metadata:
type: dash0
displayName: Dash0
category: managed
spec:
image: dash0.svg
signals:
traces:
supported: true
metrics:
supported: true
logs:
supported: true
fields:
- name: DASH0_ENDPOINT
displayName: Dash0 OTLP gRPC Endpoint
componentType: input
componentProps:
type: text
required: true
- name: DASH0_TOKEN
displayName: Dash0 Bearer Token
componentType: input
secret: true
componentProps:
type: password
required: true
8 changes: 8 additions & 0 deletions destinations/logos/dash0.svg
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/backends-overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Odigos has destinations for many observability backends.
| Chronosphere | Managed ||| |
| ClickHouse | Self-Hosted ||||
| Coralogix | Managed ||||
| Dash0 | Managed ||||
| Datadog | Managed ||||
| Dynatrace | Managed ||||
| Elasticsearch | Self-Hosted || ||
Expand Down
61 changes: 61 additions & 0 deletions docs/backends/dash0.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
title: 'Dash0'
---

## Configuring Backend

- **DASH0_ENDPOINT** - OpenTelemetry gRPC Endpoint, the format is `host:port`.
- host is required, located in Dash0 UI - OpenTelemetry Collector.
- port is optional and defaults to the default OTLP gRPC port `4317`.
- **DASH0_TOKEN** - Dash0 Authorization Token, located in Dash0 UI - OpenTelemetry Collector.


## Adding a Destination to Odigos

Odigos makes it simple to add and configure destinations, allowing you to select the specific signals [traces/logs/metrics] that you want to send to each destination. There are two primary methods for configuring destinations in Odigos:

1. **Using the UI**

Use the [Odigos CLI](https://docs.odigos.io/cli/odigos_ui) to access the UI:

```bash
odigos ui
```

2. **Using kubernetes manifests**

Save the YAML below to a file (e.g., `destination.yaml`) and apply it using `kubectl`:

```bash
kubectl apply -f destination.yaml
```


```yaml
apiVersion: odigos.io/v1alpha1
kind: Destination
metadata:
name: dash0-example
namespace: odigos-system
spec:
data:
DASH0_ENDPOINT: <Dash0 OTLP gRPC Endpoint>
destinationName: dash0
secretRef:
name: dash0-secret
signals:
- TRACES
- METRICS
- LOGS
type: dash0

---
apiVersion: v1
data:
DASH0_TOKEN: <base64 Dash0 Bearer Token>
kind: Secret
metadata:
name: dash0-secret
namespace: odigos-system
type: Opaque
```
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
"backends/chronosphere",
"backends/clickhouse",
"backends/coralogix",
"backends/dash0",
"backends/datadog",
"backends/dynatrace",
"backends/elasticsearch",
Expand Down
1 change: 1 addition & 0 deletions docs/quickstart/next-steps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Select the relevant backend for your use case below to connect it to Odigos.
<Card title="Causely" href="/backends/causely" />
<Card title="Chronosphere" href="/backends/chronosphere" />
<Card title="Coralogix" href="/backends/coralogix" />
<Card title="Dash0" href="/backends/dash0" />
<Card title="Datadog" href="/backends/datadog" />
<Card title="Dynatrace" href="/backends/dynatrace" />
<Card title="Elasticsearch" href="/backends/elasticsearch" />
Expand Down

0 comments on commit 23f2bfb

Please sign in to comment.