-
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-1962]: add KloudMate destination support and documentation (#2086)
This pull request includes several changes to add support for KloudMate as a new managed destination in the Odigos project. The changes span multiple files, including documentation updates and configuration additions. ### New Destination Support: * **`common/config/kloudmate.go`**: Added new configuration file for KloudMate, including error handling and configuration modification functions. * **`common/config/root.go`**: Updated the list of available configurators to include KloudMate. * **`common/dests.go`**: Added KloudMate as a new destination type. * **`destinations/data/kloudmate.yaml`**: Added YAML configuration for KloudMate destination, specifying supported signals and required fields. ### Documentation Updates: * **`docs/backends/kloudmate.mdx`**: Created new documentation page for configuring KloudMate backend, including details on required fields and setup instructions using both UI and Kubernetes manifests. * **`docs/backends-overview.mdx`**: Updated the backends overview to include KloudMate. * **`docs/mint.json`**: Updated documentation structure to include KloudMate in various sections. [[1]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debR200) [[2]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL251-R223) * **`docs/quickstart/next-steps.mdx`**: Added KloudMate to the list of backends in the quickstart guide. ### Minor Fixes: * **`README.md`**: Fixed formatting issues in the key features and managed destinations sections. [[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L29-R35) [[2]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L88-R89) [[3]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R104) [[4]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L116-R117)
- Loading branch information
1 parent
e8fb532
commit 5dd320f
Showing
10 changed files
with
145 additions
and
1 deletion.
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,48 @@ | ||
package config | ||
|
||
import ( | ||
"github.com/odigos-io/odigos/common" | ||
) | ||
|
||
type KloudMate struct{} | ||
|
||
func (j *KloudMate) DestType() common.DestinationType { | ||
return common.KloudMateDestinationType | ||
} | ||
|
||
func (j *KloudMate) ModifyConfig(dest ExporterConfigurer, currentConfig *Config) error { | ||
uniqueUri := "kloudmate-" + dest.GetID() | ||
|
||
exporterName := "otlphttp/" + uniqueUri | ||
exporterConfig := GenericMap{ | ||
"endpoint": "https://otel.kloudmate.com:4318", | ||
"headers": GenericMap{ | ||
"Authorization": "${KLOUDMATE_API_KEY}", | ||
}, | ||
} | ||
|
||
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,23 @@ | ||
apiVersion: internal.odigos.io/v1beta1 | ||
kind: Destination | ||
metadata: | ||
type: kloudmate | ||
displayName: KloudMate | ||
category: managed | ||
spec: | ||
image: kloudmate.svg | ||
signals: | ||
traces: | ||
supported: true | ||
metrics: | ||
supported: true | ||
logs: | ||
supported: true | ||
fields: | ||
- name: KLOUDMATE_API_KEY | ||
displayName: KloudMate API Key | ||
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,60 @@ | ||
--- | ||
title: 'KloudMate' | ||
--- | ||
|
||
## Configuring Backend | ||
|
||
- **KLOUDMATE_API_KEY** - KloudMate API Key, required. | ||
|
||
**Note:** | ||
We handle the endpoint internally, so you don't need to provide it. | ||
- The endpoint is `https://otel.kloudmate.com:4318`. | ||
|
||
## 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: kloudmate-example | ||
namespace: odigos-system | ||
spec: | ||
data: {} | ||
destinationName: kloudmate | ||
secretRef: | ||
name: kloudmate-secret | ||
signals: | ||
- TRACES | ||
- METRICS | ||
- LOGS | ||
type: kloudmate | ||
|
||
--- | ||
apiVersion: v1 | ||
data: | ||
KLOUDMATE_API_KEY: <base64 KloudMate API Key> | ||
kind: Secret | ||
metadata: | ||
name: kloudmate-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