-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-1953]: add Dash0 destination support and documentation (#2085)
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
1 parent
119b5e0
commit 23f2bfb
Showing
10 changed files
with
218 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters