-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new destination: Sumo Logic (#787)
Resolves #783
- Loading branch information
Showing
7 changed files
with
80 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
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,43 @@ | ||
package config | ||
|
||
import ( | ||
odigosv1 "github.com/keyval-dev/odigos/api/odigos/v1alpha1" | ||
commonconf "github.com/keyval-dev/odigos/autoscaler/controllers/common" | ||
"github.com/keyval-dev/odigos/common" | ||
) | ||
|
||
type SumoLogic struct{} | ||
|
||
func (s *SumoLogic) DestType() common.DestinationType { | ||
return common.SumoLogicDestinationType | ||
} | ||
|
||
func (s *SumoLogic) ModifyConfig(dest *odigosv1.Destination, currentConfig *commonconf.Config) { | ||
currentConfig.Exporters["otlphttp/sumologic"] = commonconf.GenericMap{ | ||
"endpoint": "${SUMOLOGIC_COLLECTION_URL}", | ||
} | ||
|
||
if isTracingEnabled(dest) { | ||
currentConfig.Service.Pipelines["traces/sumologic"] = commonconf.Pipeline{ | ||
Receivers: []string{"otlp"}, | ||
Processors: []string{"batch"}, | ||
Exporters: []string{"otlphttp/sumologic"}, | ||
} | ||
} | ||
|
||
if isLoggingEnabled(dest) { | ||
currentConfig.Service.Pipelines["logs/sumologic"] = commonconf.Pipeline{ | ||
Receivers: []string{"otlp"}, | ||
Processors: []string{"batch"}, | ||
Exporters: []string{"otlphttp/sumologic"}, | ||
} | ||
} | ||
|
||
if isMetricsEnabled(dest) { | ||
currentConfig.Service.Pipelines["metrics/sumologic"] = commonconf.Pipeline{ | ||
Receivers: []string{"otlp"}, | ||
Processors: []string{"batch"}, | ||
Exporters: []string{"otlphttp/sumologic"}, | ||
} | ||
} | ||
} |
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,22 @@ | ||
apiVersion: internal.odigos.io/v1beta1 | ||
kind: Destination | ||
metadata: | ||
type: sumologic | ||
displayName: Sumo Logic | ||
category: managed | ||
spec: | ||
image: sumologic.svg | ||
signals: | ||
traces: | ||
supported: true | ||
metrics: | ||
supported: true | ||
logs: | ||
supported: true | ||
fields: | ||
- name: SUMOLOGIC_COLLECTION_URL | ||
displayName: Source URL | ||
componentType: input | ||
componentProps: | ||
type: password | ||
secret: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: "Sumo Logic" | ||
--- | ||
|
||
## Obtaining a OTLP/HTTP Source URL | ||
|
||
Follow the [following instructions](https://help.sumologic.com/docs/send-data/hosted-collectors/http-source/otlp/) to obtain a OTLP/HTTP Source URL. |