Skip to content

Commit

Permalink
[GEN-1956]: add Groundcover inCloud destination support and documenta…
Browse files Browse the repository at this point in the history
…tion (#2068)

This pull request includes several changes to add support for
Groundcover as a new destination and to improve the documentation
structure. The most important changes include adding Groundcover
configuration, updating documentation to include Groundcover, and
refactoring the documentation structure for better readability.

### Groundcover Support:

*
[`common/config/groundcover.go`](diffhunk://#diff-862004cf677545d5aea954876d73338f4b4e052421d8d37ba79b8b9a0538e0ebR1-R71):
Added Groundcover configuration, including endpoint and API key
handling, and methods to modify the configuration.
*
[`common/config/root.go`](diffhunk://#diff-35f076c473aa76e7717e17ac33041f73ec6b16e26fe8a1ab50bf5963cb7fcd8eL18-R23):
Included Groundcover in the list of available configurers.
*
[`common/dests.go`](diffhunk://#diff-e0ef4d5cecfc896240ae7392424f227db50784f83d0ddc0c317db59066f8757bR25):
Added Groundcover as a destination type.
*
[`destinations/data/groundcover.yaml`](diffhunk://#diff-129bbaa520e64dde822316f5a43fbd5552e7161d85a913f3c54f633d951e1544R1-R60):
Created a YAML file for Groundcover destination configuration.

### Documentation Updates:

*
[`docs/backends-overview.mdx`](diffhunk://#diff-26115b197a8b9dd8ee351f05b2cade47da5acd788d74b9f962a325d3e1b919a2R24):
Added Groundcover to the list of managed destinations.
*
[`docs/backends/groundcover.mdx`](diffhunk://#diff-3bb06921493a19e9bc372f59d0b00e6c31558008c48a07831e6006f7ad5b6f98R1-R62):
Created a new documentation file for configuring Groundcover inCloud.
*
[`docs/mint.json`](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL73-R73):
Refactored the documentation structure for better readability and
included Groundcover in the list of backends.
[[1]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL73-R73)
[[2]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL102-R114)
[[3]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL153-R134)
[[4]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL192-R170)
[[5]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debR198)
[[6]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL251-R223)
[[7]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL285-R258)
*
[`docs/quickstart/next-steps.mdx`](diffhunk://#diff-25ae422c52600166452821f8cc42d670b6b530e5f32a1b3aae657b05adb74ed7R36):
Added a card for Groundcover inCloud in the quickstart guide.

### Minor Changes:

*
[`README.md`](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L29-R35):
Minor formatting adjustments for the key features and managed
destinations sections.
[[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L29-R35)
[[2]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L88-R89)
[[3]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R103)
[[4]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L116-R117)

---------

Co-authored-by: Amir Blum <amirgiraffe@gmail.com>
  • Loading branch information
BenElferink and blumamir authored Dec 29, 2024
1 parent 51bbb72 commit 709f273
Show file tree
Hide file tree
Showing 10 changed files with 173 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ For more details, see our [quickstart guide](https://docs.odigos.io/intro).
| Google Cloud Monitoring ||| |
| Google Cloud Storage || ||
| Grafana Cloud ||||
| Groundcover inCloud ||||
| Honeycomb ||||
| Last9 ||| |
| Lightstep || | |
Expand Down
71 changes: 71 additions & 0 deletions common/config/groundcover.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
package config

import (
"errors"

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

const (
GroundcoverEndpoint = "GROUNDCOVER_ENDPOINT"
GroundcoverApiKey = "GROUNDCOVER_API_KEY"
)

var (
ErrorGroundcoverEndpointMissing = errors.New("Groundcover is missing a required field (\"GROUNDCOVER_ENDPOINT\"), Groundcover will not be configured")
ErrorGroundcoverApiKeyMissing = errors.New("Groundcover is missing a required field (\"GROUNDCOVER_API_KEY\"), Groundcover will not be configured")
)

type Groundcover struct{}

func (j *Groundcover) DestType() common.DestinationType {
return common.GroundcoverDestinationType
}

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

url, exists := config[GroundcoverEndpoint]
if !exists {
return ErrorGroundcoverEndpointMissing
}

endpoint, err := parseOtlpGrpcUrl(url, true)
if err != nil {
return err
}

exporterName := "otlp/" + uniqueUri
exporterConfig := GenericMap{
"endpoint": endpoint,
"headers": GenericMap{
"apikey": "${GROUNDCOVER_API_KEY}",
},
}

currentConfig.Exporters[exporterName] = exporterConfig

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

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

if isLoggingEnabled(dest) {
tracesPipelineName := "logs/" + uniqueUri
currentConfig.Service.Pipelines[tracesPipelineName] = 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 @@ -17,7 +17,7 @@ const (
var availableConfigers = []Configer{
&AppDynamics{}, &Axiom{}, &AWSS3{}, &AzureBlobStorage{}, &Causely{}, &Chronosphere{}, &Clickhouse{}, &Coralogix{},
&Datadog{}, &Debug{}, &Dynatrace{}, &ElasticAPM{}, &Elasticsearch{}, &GenericOTLP{}, &GoogleCloud{},
&GoogleCloudStorage{}, &GrafanaCloudLoki{}, &GrafanaCloudPrometheus{}, &GrafanaCloudTempo{},
&GoogleCloudStorage{}, &GrafanaCloudLoki{}, &GrafanaCloudPrometheus{}, &GrafanaCloudTempo{}, &Groundcover{},
&Honeycomb{}, &Jaeger{}, &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 @@ -22,6 +22,7 @@ const (
GrafanaCloudLokiDestinationType DestinationType = "grafanacloudloki"
GrafanaCloudPrometheusDestinationType DestinationType = "grafanacloudprometheus"
GrafanaCloudTempoDestinationType DestinationType = "grafanacloudtempo"
GroundcoverDestinationType DestinationType = "groundcover"
HoneycombDestinationType DestinationType = "honeycomb"
JaegerDestinationType DestinationType = "jaeger"
Last9DestinationType DestinationType = "last9"
Expand Down
30 changes: 30 additions & 0 deletions destinations/data/groundcover.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: internal.odigos.io/v1beta1
kind: Destination
metadata:
type: groundcover
displayName: Groundcover inCloud
category: managed
spec:
image: groundcover.svg
signals:
traces:
supported: true
metrics:
supported: true
logs:
supported: true
fields:
- name: GROUNDCOVER_ENDPOINT
displayName: Groundcover inCloud Site
componentType: input
componentProps:
type: text
required: true
tooltip: 'Your inCloud Site is part of the configuration provided to you by groundcover when setting up the managed inCloud backend.'
- name: GROUNDCOVER_API_KEY
displayName: Groundcover API Key
componentType: input
secret: true
componentProps:
type: password
required: true
6 changes: 6 additions & 0 deletions destinations/logos/groundcover.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 @@ -21,6 +21,7 @@ Odigos has destinations for many observability backends.
| Google Cloud Monitoring | Managed ||| |
| Google Cloud Storage | Managed || ||
| Grafana Cloud | Managed ||||
| Groundcover inCloud | Managed ||||
| Honeycomb | Managed ||||
| Jaeger | Self-Hosted || | |
| Last9 | Managed ||| |
Expand Down
60 changes: 60 additions & 0 deletions docs/backends/groundcover.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
title: 'Groundcover inCloud'
---

## Configuring Backend

- **GROUNDCOVER_ENDPOINT** - Endpoint, the format is `host:port`.
- `host` is required, also known as your `inCloud_Site`, it is part of the configuration provided to you by Groundcover when setting up the [inCloud Managed](https://docs.groundcover.com/architecture/incloud-managed) backend.
- `port` is optional, and defaults to the default OpenTelemetry gRPC port `4317`.
- **GROUNDCOVER_API_KEY** - API Key provided by Groundcover, refer to [these docs](https://docs.groundcover.com/architecture/incloud-managed/ingestion-endpoints#fetching-the-api-key) for more info.

## 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: groundcover-example
namespace: odigos-system
spec:
data:
GROUNDCOVER_ENDPOINT: <Groundcover inCloud Site>
destinationName: groundcover
secretRef:
name: groundcover-secret
signals:
- TRACES
- METRICS
- LOGS
type: groundcover

---
apiVersion: v1
data:
GROUNDCOVER_API_KEY: <base64 Groundcover API Key>
kind: Secret
metadata:
name: groundcover-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 @@ -195,6 +195,7 @@
"backends/grafanacloudloki",
"backends/grafanacloudprometheus",
"backends/grafanacloudtempo",
"backends/groundcover",
"backends/honeycomb",
"backends/jaeger",
"backends/last9",
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 @@ -33,6 +33,7 @@ Select the relevant backend for your use case below to connect it to Odigos.
<Card title="Grafana Cloud Loki" href="/backends/grafanacloudloki" />
<Card title="Grafana Cloud Prometheus" href="/backends/grafanacloudprometheus" />
<Card title="Grafana Cloud Tempo" href="/backends/grafanacloudtempo" />
<Card title="Groundcover inCloud" href="/backends/groundcover" />
<Card title="Honeycomb" href="/backends/honeycomb" />
<Card title="Jaeger" href="/backends/jaeger" />
<Card title="Last9" href="/backends/last9" />
Expand Down

0 comments on commit 709f273

Please sign in to comment.