-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GEN-2122]: add Lumigo destination support and documentation (#2079)
This pull request introduces a new destination, Lumigo, for the Odigos project. The most important changes include updates to the configuration files, documentation, and the addition of new files to support Lumigo as a destination. ### Lumigo Integration: * Added a new configuration file `common/config/lumigo.go` to handle Lumigo-specific settings and validations. * Updated `common/config/root.go` to include Lumigo in the list of available configurers. * Updated `common/dests.go` to define `LumigoDestinationType`. * Added a new destination configuration file `destinations/data/lumigo.yaml` to define the Lumigo destination properties. ### Documentation Updates: * Added a new documentation file `docs/backends/lumigo.mdx` to provide details on configuring Lumigo as a backend. * Updated `docs/backends-overview.mdx` to include Lumigo in the list of supported backends. * Updated `docs/mint.json` to include Lumigo in various sections for better navigation and reference. [[1]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debR204) [[2]](diffhunk://#diff-c91a604899dfef4b2494c317f4fd39a7f22b79986095f580399347293d534debL251-R223) ### Minor Fixes: * Modified `frontend/webapp/reuseable-components/condition-details/index.tsx` to provide a default value for the `conditions` prop. These changes collectively enhance the Odigos project by adding support for Lumigo as a new destination, updating the necessary configurations, and providing comprehensive documentation for users.
- Loading branch information
1 parent
df7f73a
commit a21ffaa
Showing
11 changed files
with
247 additions
and
104 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,69 @@ | ||
package config | ||
|
||
import ( | ||
"errors" | ||
|
||
"github.com/odigos-io/odigos/common" | ||
) | ||
|
||
const ( | ||
LumigoEndpoint = "LUMIGO_ENDPOINT" | ||
) | ||
|
||
var ( | ||
ErrorLumigoEndpointMissing = errors.New("Lumigo is missing a required field (\"LUMIGO_ENDPOINT\"), Lumigo will not be configured") | ||
) | ||
|
||
type Lumigo struct{} | ||
|
||
func (j *Lumigo) DestType() common.DestinationType { | ||
return common.LumigoDestinationType | ||
} | ||
|
||
func (j *Lumigo) ModifyConfig(dest ExporterConfigurer, cfg *Config) error { | ||
config := dest.GetConfig() | ||
uniqueUri := "lumigo-" + dest.GetID() | ||
|
||
url, exists := config[LumigoEndpoint] | ||
if !exists { | ||
return ErrorLumigoEndpointMissing | ||
} | ||
|
||
endpoint, err := parseOtlpHttpEndpoint(url) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
exporterName := "otlphttp/" + uniqueUri | ||
exporterConfig := GenericMap{ | ||
"endpoint": endpoint, | ||
"headers": GenericMap{ | ||
"Authorization": "LumigoToken ${LUMIGO_TOKEN}", | ||
}, | ||
} | ||
|
||
cfg.Exporters[exporterName] = exporterConfig | ||
|
||
if isTracingEnabled(dest) { | ||
pipeName := "traces/" + uniqueUri | ||
cfg.Service.Pipelines[pipeName] = Pipeline{ | ||
Exporters: []string{exporterName}, | ||
} | ||
} | ||
|
||
if isMetricsEnabled(dest) { | ||
pipeName := "metrics/" + uniqueUri | ||
cfg.Service.Pipelines[pipeName] = Pipeline{ | ||
Exporters: []string{exporterName}, | ||
} | ||
} | ||
|
||
if isLoggingEnabled(dest) { | ||
pipeName := "logs/" + uniqueUri | ||
cfg.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,30 @@ | ||
apiVersion: internal.odigos.io/v1beta1 | ||
kind: Destination | ||
metadata: | ||
type: lumigo | ||
displayName: Lumigo | ||
category: managed | ||
spec: | ||
image: lumigo.svg | ||
signals: | ||
traces: | ||
supported: true | ||
metrics: | ||
supported: true | ||
logs: | ||
supported: true | ||
fields: | ||
- name: LUMIGO_ENDPOINT | ||
displayName: Lumigo OTLP HTTP Endpoint | ||
componentType: input | ||
initialValue: 'https://ga-otlp.lumigo-tracer-edge.golumigo.com' | ||
componentProps: | ||
type: text | ||
required: true | ||
- name: LUMIGO_TOKEN | ||
displayName: Lumigo 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,58 @@ | ||
--- | ||
title: 'Lumigo' | ||
--- | ||
|
||
## Configuring Backend | ||
|
||
- **LUMIGO_ENDPOINT** - OpenTelemetry HTTP Endpoint, defaults to `https://ga-otlp.lumigo-tracer-edge.golumigo.com`. | ||
- **LUMIGO_TOKEN** - Lumigo Authorization Token. | ||
|
||
## 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: lumigo-example | ||
namespace: odigos-system | ||
spec: | ||
data: | ||
LUMIGO_ENDPOINT: <Lumigo OTLP HTTP Endpoint> | ||
destinationName: lumigo | ||
secretRef: | ||
name: lumigo-secret | ||
signals: | ||
- TRACES | ||
- METRICS | ||
- LOGS | ||
type: lumigo | ||
|
||
--- | ||
apiVersion: v1 | ||
data: | ||
LUMIGO_TOKEN: <base64 Lumigo Token> | ||
kind: Secret | ||
metadata: | ||
name: lumigo-secret | ||
namespace: odigos-system | ||
type: Opaque | ||
``` |
Oops, something went wrong.