Skip to content

Commit

Permalink
Add new destination: Sumo Logic (#787)
Browse files Browse the repository at this point in the history
Resolves #783
  • Loading branch information
edeNFed authored Nov 23, 2023
1 parent 2fb4fa8 commit c521dbd
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ For more details, see our [quickstart guide](https://docs.odigos.io/intro).
| Lightstep || | |
| Sentry || | |
| Axiom || ||
| Sumo Logic ||||

### Open Source

Expand Down
2 changes: 1 addition & 1 deletion autoscaler/controllers/gateway/config/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
var availableConfigers = []Configer{&Middleware{}, &Honeycomb{}, &Grafana{}, &Datadog{}, &NewRelic{}, &Logzio{}, &Prometheus{},
&Tempo{}, &Loki{}, &Jaeger{}, &GenericOTLP{}, &Elasticsearch{}, &Signoz{}, &Qryn{},
&OpsVerse{}, &Splunk{}, &Lightstep{}, &GoogleCloud{}, &GoogleCloudStorage{}, &Sentry{}, &AzureBlobStorage{},
&AWSS3{}, &Dynatrace{}, &Chronosphere{}, &ElasticAPM{}, &Axiom{}}
&AWSS3{}, &Dynatrace{}, &Chronosphere{}, &ElasticAPM{}, &Axiom{}, &SumoLogic{}}

type Configer interface {
DestType() common.DestinationType
Expand Down
43 changes: 43 additions & 0 deletions autoscaler/controllers/gateway/config/sumologic.go
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"},
}
}
}
1 change: 1 addition & 0 deletions common/dests.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ const (
ChronosphereDestinationType DestinationType = "chronosphere"
ElasticAPMDestinationType DestinationType = "elasticapm"
AxiomDestinationType DestinationType = "axiom"
SumoLogicDestinationType DestinationType = "sumologic"
)
22 changes: 22 additions & 0 deletions destinations/data/sumologic.yaml
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
5 changes: 5 additions & 0 deletions destinations/logos/sumologic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/backends/sumologic.mdx
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.

0 comments on commit c521dbd

Please sign in to comment.