-
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-1956]: add Groundcover inCloud destination support and documenta…
…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
1 parent
51bbb72
commit 709f273
Showing
10 changed files
with
173 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,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 | ||
} |
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,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 |
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: '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 | ||
``` |
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