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

[GEN-1962]: add KloudMate destination support and documentation #2086

Merged
merged 5 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ For more details, see our [quickstart guide](https://docs.odigos.io/intro).
| Google Cloud Storage | ✅ | | ✅ |
| Grafana Cloud | ✅ | ✅ | ✅ |
| Honeycomb | ✅ | ✅ | ✅ |
| KloudMate | ✅ | ✅ | ✅ |
| Last9 | ✅ | ✅ | |
| Lightstep | ✅ | | |
| Logz.io | ✅ | ✅ | ✅ |
Expand Down
69 changes: 69 additions & 0 deletions common/config/kloudmate.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package config

import (
"errors"

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

const (
KloudMateEndpoint = "KLOUDMATE_ENDPOINT"
)

var (
ErrorKloudMateEndpointMissing = errors.New("KloudMate is missing a required field (\"KLOUDMATE_ENDPOINT\"), KloudMate will not be configured")
)

type KloudMate struct{}

func (j *KloudMate) DestType() common.DestinationType {
return common.KloudMateDestinationType
}

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

url, exists := config[KloudMateEndpoint]
if !exists {
return ErrorKloudMateEndpointMissing
}

endpoint, err := parseOtlpHttpEndpoint(url)
BenElferink marked this conversation as resolved.
Show resolved Hide resolved
if err != nil {
return err
}

exporterName := "otlphttp/" + uniqueUri
exporterConfig := GenericMap{
"endpoint": endpoint,
"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
}
2 changes: 1 addition & 1 deletion common/config/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var availableConfigers = []Configer{
&AppDynamics{}, &Axiom{}, &AWSS3{}, &AzureBlobStorage{}, &Causely{}, &Chronosphere{}, &Clickhouse{}, &Coralogix{},
&Datadog{}, &Debug{}, &Dynatrace{}, &ElasticAPM{}, &Elasticsearch{}, &GenericOTLP{}, &GoogleCloud{},
&GoogleCloudStorage{}, &GrafanaCloudLoki{}, &GrafanaCloudPrometheus{}, &GrafanaCloudTempo{},
&Honeycomb{}, &Jaeger{}, &Last9{}, &Lightstep{}, &Logzio{}, &Loki{}, &Lumigo{}, &Middleware{}, &Mock{}, &NewRelic{},
&Honeycomb{}, &Jaeger{}, &KloudMate{}, &Last9{}, &Lightstep{}, &Logzio{}, &Loki{}, &Lumigo{}, &Middleware{}, &Mock{}, &NewRelic{},
&Nop{}, &OpsVerse{}, &OTLPHttp{}, &Prometheus{}, &Qryn{}, &QrynOSS{}, &Quickwit{}, &Sentry{},
&Signoz{}, &Splunk{}, &SumoLogic{}, &Tempo{}, &Uptrace{},
}
Expand Down
1 change: 1 addition & 0 deletions common/dests.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const (
GrafanaCloudTempoDestinationType DestinationType = "grafanacloudtempo"
HoneycombDestinationType DestinationType = "honeycomb"
JaegerDestinationType DestinationType = "jaeger"
KloudMateDestinationType DestinationType = "kloudmate"
Last9DestinationType DestinationType = "last9"
LightstepDestinationType DestinationType = "lightstep"
LogzioDestinationType DestinationType = "logzio"
Expand Down
30 changes: 30 additions & 0 deletions destinations/data/kloudmate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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_ENDPOINT
displayName: KloudMate OTLP HTTP Endpoint
componentType: input
initialValue: 'https://otel.kloudmate.com:4318'
componentProps:
type: text
required: true
- name: KLOUDMATE_API_KEY
displayName: KloudMate API Key
componentType: input
secret: true
componentProps:
type: password
required: true
8 changes: 8 additions & 0 deletions destinations/logos/kloudmate.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 @@ -23,6 +23,7 @@ Odigos has destinations for many observability backends.
| Grafana Cloud | Managed | ✅ | ✅ | ✅ |
| Honeycomb | Managed | ✅ | ✅ | ✅ |
| Jaeger | Self-Hosted | ✅ | | |
| KloudMate | Managed | ✅ | ✅ | ✅ |
| Last9 | Managed | ✅ | ✅ | |
| Lightstep | Managed | ✅ | | |
| Logz.io | Managed | ✅ | ✅ | ✅ |
Expand Down
60 changes: 60 additions & 0 deletions docs/backends/kloudmate.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: 'KloudMate'
---

## Configuring Backend

- **KLOUDMATE_ENDPOINT** - OpenTelemetry HTTP Endpoint, the format is `host:port`.
- host is required.
- port is required.
- **KLOUDMATE_API_KEY** - API Key, required.

## 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:
KLOUDMATE_ENDPOINT: <KloudMate OTLP HTTP Endpoint>
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
```
1 change: 1 addition & 0 deletions docs/mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@
"backends/grafanacloudtempo",
"backends/honeycomb",
"backends/jaeger",
"backends/kloudmate",
"backends/last9",
"backends/lightstep",
"backends/logzio",
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 @@ -35,6 +35,7 @@ Select the relevant backend for your use case below to connect it to Odigos.
<Card title="Grafana Cloud Tempo" href="/backends/grafanacloudtempo" />
<Card title="Honeycomb" href="/backends/honeycomb" />
<Card title="Jaeger" href="/backends/jaeger" />
<Card title="KloudMate" href="/backends/kloudmate" />
<Card title="Last9" href="/backends/last9" />
<Card title="Lightstep" href="/backends/lightstep" />
<Card title="Logz.io" href="/backends/logzio" />
Expand Down
Loading