Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Last9 as destination #1828

Merged
merged 11 commits into from
Dec 2, 2024
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,22 @@

### ✨ Language Agnostic Auto-instrumentation

Odigos supports any application written in Java, Python, .NET, Node.js, and **Go**.
Odigos supports any application written in Java, Python, .NET, Node.js, and **Go**.
Historically, compiled languages like Go have been difficult to instrument without code changes. Odigos solves this problem by uniquely leveraging [eBPF](https://ebpf.io).

![Works on any application](assets/choose_apps.png)


### 🤝 Keep your existing observability tools
Odigos currently supports all the popular managed and open-source destinations.
Odigos currently supports all the popular managed and open-source destinations.
By producing data in the [OpenTelemetry](https://opentelemetry.io) format, Odigos can be used with any observability tool that supports OTLP.

For a complete list of supported destinations, see [here](#supported-destinations).

![Works with any observability tool](assets/choose_dest.png)

### 🎛️ Collectors Management
Odigos automatically scales OpenTelemetry collectors based on observability data volume.
### 🎛️ Collectors Management
Odigos automatically scales OpenTelemetry collectors based on observability data volume.
Manage and configure collectors via a convenient web UI.

![Collectors Management](assets/overview_page.png)
Expand Down Expand Up @@ -82,6 +82,7 @@ For more details, see our [quickstart guide](https://docs.odigos.io/intro).
| Axiom | ✅ | | ✅ |
| Sumo Logic | ✅ | ✅ | ✅ |
| Coralogix | ✅ | ✅ | ✅ |
| Last9 | ✅ | ✅ | ✅ |

### Open Source

Expand Down
65 changes: 65 additions & 0 deletions common/config/last9.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package config

import (
"errors"

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

const (
l9OtlpEndpointKey = "LAST9_OTLP_ENDPOINT"
l9OtlpAuthHeaderKey = "LAST9_OTLP_BASIC_AUTH_HEADER"
)

type MyDest struct{}
prathamesh-sonpatki marked this conversation as resolved.
Show resolved Hide resolved

func (m *MyDest) DestType() common.DestinationType {
// DestinationType defined in common/dests.go
return common.Last9DestinationType
}

func (m *MyDest) ModifyConfig(dest ExporterConfigurer, currentConfig *Config) error {
config := dest.GetConfig()
l9OtlpEndpoint, exists := config[l9OtlpEndpointKey]
if !exists {
return errors.New("Last9 OpenTelemetry Endpoint key(\"LAST9_OTLP_ENDPOINT\") not specified, Last9 will not be configured")
}

l9OtlpAuthHeader, exists := config[l9OtlpAuthHeaderKey]
if !exists {
return errors.New("Last9 OpenTelemetry Basic Auth Header key(\"LAST9_OTLP_BASIC_AUTH_HEADER\") not specified, Last9 will not be configured")
}

// to make sure that the exporter name is unique, we'll ask a ID from destination
exporterName := "otlp/last9-" + dest.GetID()
currentConfig.Exporters["otlp/last9"] = GenericMap{
prathamesh-sonpatki marked this conversation as resolved.
Show resolved Hide resolved
"endpoint": l9OtlpEndpoint,
"headers": GenericMap{
"Authorization": l9OtlpAuthHeader,
},
}
prathamesh-sonpatki marked this conversation as resolved.
Show resolved Hide resolved

// Modify the config here
if isTracingEnabled(dest) {
tracesPipelineName := "traces/last9-" + dest.GetID()
currentConfig.Service.Pipelines[tracesPipelineName] = Pipeline{
Exporters: []string{exporterName},
}
}

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

if isLoggingEnabled(dest) {
logsPipelineName := "logs/last9-" + dest.GetID()
currentConfig.Service.Pipelines[logsPipelineName] = 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 @@ -15,7 +15,7 @@ const (

var availableConfigers = []Configer{
&Middleware{}, &Honeycomb{}, &GrafanaCloudPrometheus{}, &GrafanaCloudTempo{},
&GrafanaCloudLoki{}, &Datadog{}, &NewRelic{}, &Logzio{}, &Prometheus{},
&GrafanaCloudLoki{}, &Datadog{}, &NewRelic{}, &Logzio{}, &Last9{}, &Prometheus{},
&Tempo{}, &Loki{}, &Jaeger{}, &GenericOTLP{}, &OTLPHttp{}, &Elasticsearch{}, &Quickwit{}, &Signoz{}, &Qryn{},
&OpsVerse{}, &Splunk{}, &Lightstep{}, &GoogleCloud{}, &GoogleCloudStorage{}, &Sentry{}, &AzureBlobStorage{},
&AWSS3{}, &Dynatrace{}, &Chronosphere{}, &ElasticAPM{}, &Axiom{}, &SumoLogic{}, &Coralogix{}, &Clickhouse{},
Expand Down
1 change: 1 addition & 0 deletions common/dests.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const (
GrafanaCloudTempoDestinationType DestinationType = "grafanacloudtempo"
HoneycombDestinationType DestinationType = "honeycomb"
JaegerDestinationType DestinationType = "jaeger"
Last9DestinationType DestinationType = "last9"
LightstepDestinationType DestinationType = "lightstep"
LogzioDestinationType DestinationType = "logzio"
LokiDestinationType DestinationType = "loki"
Expand Down
30 changes: 30 additions & 0 deletions destinations/data/last9.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: internal.odigos.io/v1beta1
kind: Destination
metadata:
type: last9
displayName: Last9
category: managed
spec:
image: last9.svg
signals:
traces:
supported: true
metrics:
supported: true
logs:
supported: true
fields:
- name: LAST9_OTLP_ENDPOINT
displayName: Last9 OpenTelemetry Endpoint
componentType: input
componentProps:
type: text
required: true
tooltip: 'Last9 OpenTelemetry Endpoint. Can be found at https://app.last9.io/integrations?category=all&integration=OpenTelemetry'
- name: LAST9_OTLP_BASIC_AUTH_HEADER
displayName: Basic Auth Header
componentType: input
componentProps:
prathamesh-sonpatki marked this conversation as resolved.
Show resolved Hide resolved
type: password
required: true
placeholder: "Last9 Basic Auth Header"
prathamesh-sonpatki marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions destinations/logos/last9.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 72 additions & 0 deletions docs/backends/last9.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
prathamesh-sonpatki marked this conversation as resolved.
Show resolved Hide resolved
title: "Last9"
---

## Obtaining Last9 OpenTelemetry Endpoint and Basic Auth Header

[Click here](https://app.last9.io/integrations?category=all&integration=OpenTelemetry) to visit the Last9 OpenTelemetry integration page.

<Frame>
<img src="/backends/images/last9.png" alt="OpenTelemetry integration in Last9" />
</Frame>

## Configuring Last9 Backend

- **Endpoint** - Last9 OpenTelemetry Endpoint obtained in above step.
- **Authorization Header**: Last9 OpenTelemetry Basic Auth Header obtained in above step.

## 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**
To add a destination via the UI, follow these steps:
- Use the Odigos CLI to access the UI: [Odigos UI](https://docs.odigos.io/cli/odigos_ui)
```bash
odigos ui
```
- In the left sidebar, navigate to the `Destination` page.

- Click `Add New Destination`

- Select `Last9` and follow the on-screen instructions.



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: last9-example
namespace: odigos-system
spec:
data:
LAST9_OTLP_ENDPOINT: <Last9 OpenTelemetry Endpoint>
destinationName: last9
secretRef:
name: last9-secret
signals:
- TRACES
- METRICS
- LOGS
type: last9

---
apiVersion: v1
data:
LAST9_OTLP_BASIC_AUTH_HEADER: <Last9 Basic Auth Header>
kind: Secret
metadata:
name: last9-secret
namespace: odigos-system
type: Opaque
```
Binary file added docs/images/last9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading