Skip to content

Commit

Permalink
Comment out Nginx from os repo (to test)
Browse files Browse the repository at this point in the history
  • Loading branch information
yodigos committed Sep 8, 2024
1 parent 60692ab commit 7a07d86
Show file tree
Hide file tree
Showing 101 changed files with 3,154 additions and 271 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/backends-docs-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Backend Doc Change

on:
pull_request:
branches:
- main

jobs:
check-doc-change:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyyaml
- name: Run sync-dest-doc.py in docs directory
run: |
cd docs
python sync-dest-doc.py
- name: Check for changes in docs-backends
run: |
git diff --exit-code docs/backends || (
echo "Changes detected in docs/backends directory. You should update run cd docs ; python sync-dest-doc.py and commit the changes.";
git diff docs/backends;
exit 1;
)
4 changes: 3 additions & 1 deletion .github/workflows/helm-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ jobs:
- name: Install Helm
uses: azure/setup-helm@v4
- name: Lint Charts
run: helm lint helm/*
run: |
shopt -s extglob
helm lint helm/!(*.md)
1 change: 1 addition & 0 deletions api/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ require (

require (
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/sync v0.7.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions api/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af h1:kmjWCqn2qkEml422C2
github.com/google/pprof v0.0.0-20240525223248-4bfdf5a9a2af/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo=
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
Expand Down
9 changes: 9 additions & 0 deletions api/odigos/v1alpha1/instrumentatioconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,12 @@ type InstrumentationConfigList struct {
func init() {
SchemeBuilder.Register(&InstrumentationConfig{}, &InstrumentationConfigList{})
}

// Languages returns the set of languages that this configuration applies to
func (ic *InstrumentationConfig) Languages() map[common.ProgrammingLanguage]struct{} {
langs := make(map[common.ProgrammingLanguage]struct{})
for _, sdkConfig := range ic.Spec.SdkConfigs {
langs[sdkConfig.Language] = struct{}{}
}
return langs
}
Binary file modified assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions autoscaler/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ require (
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
Expand Down
2 changes: 2 additions & 0 deletions autoscaler/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0 h1:bkypFPDjIYGfCYD5mRBvpqxfYX1YCS1PXdKYWi8FsN0=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.20.0/go.mod h1:P+Lt/0by1T8bfcF3z737NnSbmxQAppXMRziHUxPOC8k=
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
Expand Down
3 changes: 1 addition & 2 deletions cli/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ func otelSdkConfigCommunity() map[common.ProgrammingLanguage]common.OtelSdk {
common.GoProgrammingLanguage: common.OtelSdkEbpfCommunity,
common.DotNetProgrammingLanguage: common.OtelSdkNativeCommunity,
common.JavascriptProgrammingLanguage: common.OtelSdkNativeCommunity,
common.NginxProgrammingLanguage: common.OtelSdkNativeCommunity,
}
}

Expand All @@ -195,7 +194,6 @@ func otelSdkConfigCloud() map[common.ProgrammingLanguage]common.OtelSdk {
common.GoProgrammingLanguage: common.OtelSdkEbpfEnterprise,
common.DotNetProgrammingLanguage: common.OtelSdkNativeCommunity,
common.JavascriptProgrammingLanguage: common.OtelSdkNativeCommunity,
common.NginxProgrammingLanguage: common.OtelSdkNativeCommunity,
}
}

Expand All @@ -207,6 +205,7 @@ func otelSdkConfigOnPrem() map[common.ProgrammingLanguage]common.OtelSdk {
common.DotNetProgrammingLanguage: common.OtelSdkNativeCommunity,
common.JavascriptProgrammingLanguage: common.OtelSdkEbpfEnterprise,
common.MySQLProgrammingLanguage: common.OtelSdkEbpfEnterprise,
common.NginxProgrammingLanguage: common.OtelSdkNativeCommunity,
}
}

Expand Down
2 changes: 2 additions & 0 deletions common/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,13 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fatih/color v1.10.0 // indirect
github.com/go-logr/logr v1.4.1
github.com/hashicorp/go-version v1.7.0
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect

)
2 changes: 2 additions & 0 deletions common/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ github.com/goccy/go-yaml v1.11.3 h1:B3W9IdWbvrUu2OYQGwvU1nZtvMQJPBKgBUuweJjLj6I=
github.com/goccy/go-yaml v1.11.3/go.mod h1:wKnAMd44+9JAAnGQpWVEgBzGt3YuTaQ4uXoHvE4m7WU=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
Expand Down
12 changes: 11 additions & 1 deletion common/lang_detection.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package common

import "github.com/hashicorp/go-version"

type ProgramLanguageDetails struct {
Language ProgrammingLanguage
RuntimeVersion string
RuntimeVersion *version.Version
}

// +kubebuilder:validation:Enum=java;python;go;dotnet;javascript;mysql;nginx;unknown;ignored
Expand All @@ -23,3 +25,11 @@ const (
// Ignored is used when the odigos is configured to ignore the process/container
IgnoredProgrammingLanguage ProgrammingLanguage = "ignored"
)

func GetVersion(versionString string) *version.Version {
runtimeVersion, err := version.NewVersion(versionString)
if err != nil {
return nil
}
return runtimeVersion
}
1 change: 1 addition & 0 deletions destinations/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ require (

require (
github.com/go-logr/logr v1.4.1 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/kr/text v0.2.0 // indirect
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
Expand Down
2 changes: 2 additions & 0 deletions destinations/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ=
github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKeRZfjY=
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
Expand Down
39 changes: 18 additions & 21 deletions docs/architecture.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ is responsible for:

## High Level Architecture

These tasks are performed by 4 microservices:
These tasks are performed by following components:

- Instrumentor
- Odiglet
- Autoscaler
- Scheduler
- UI

The different microservices communicate via Kubernetes API server (see
The different components communicate via Kubernetes API server (see
[Custom Resources](/custom-resources) for more details).

The following diagram shows the architecture of the Odigos observability system.
Expand All @@ -40,37 +41,33 @@ The following diagram shows the architecture of the Odigos observability system.

## Instrumentor

The instrumentor microservice is responsible for automatic detection of
applications in the cluster and instrumentation of them. Automatic
Instrumentor is responsible for automatic detection of
applications in the cluster and providing necessary setup for Odiglet to instrument them. Automatic
instrumentation is done according to the applications selected by the user in
the UI. The instrumentor may change the arguments passed to the instrumentation
the UI. Instrumentor may change the arguments passed to the instrumentation
SDK to reflect the following changes:

- A configuration change made by the user (for example changing the sampling
rate in the UI)
- Rescheduling done by the scheduler (when the collectors pipeline changes)

### Language Detection
### Odiglet

Odiglet does the heavy lifting of instrumenting the running application.

A key part of being able to automatically instrument every new application is to
be able to detect the language of the application. After the language is
detected Odigos will perform automatic instrumentation according to the
language. For runtime languages Odigos uses the appropriate OpenTelemetry
instrumentation. For compiled languages Odigos uses eBPF instrumentation. In
order to detect the language of the application Odigos deploys a lang detection
pod that analyzes one of the target application instances. This pod is deployed
on the same node as the target instance and is able to look into the target pod
filesystem.

The lang detection pod uses the following heuristics in order to detect the
language of the application:
instrumentation. For compiled languages Odigos uses eBPF instrumentation.

- process name
- environment variables
- dynamically loaded libraries
Following heuristics are used to detect the language and the suitable instrumentations
for the application:

The lang detection pod reports the detected language by leveraging the
`TerminationMessagePath` field of the Pod resource.
- process name,
- the command,
- environment variables,
- dynamically loaded libraries.

## Autoscaler

Expand All @@ -84,8 +81,8 @@ Deployment of collectors is done in two scenarios:

## Scheduler

The scheduler service assigns applications discovered by the instrumentor to the
collectors pipeline create by the autoscaler.
Scheduler service assigns applications discovered by Instrumentor to the
collectors pipeline created by the autoscaler.

## UI

Expand Down
46 changes: 45 additions & 1 deletion docs/backends/azureblob.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,48 @@ Data can be exported either in JSON format or in binary format (protobuf).
There are two required fields to configure Azure Blob Storage backend:

- **Account name**: Azure Storage account name
- **Container name**: Azure Storage container name
- **Container name**: Azure Storage container name


## 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 `Azure Blob Storage` 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: azureblob-example
namespace: odigos-system
spec:
data:
AZURE_BLOB_ACCOUNT_NAME: <Account Name>
AZURE_BLOB_CONTAINER_NAME: <Container Name>
destinationName: azureblob
signals:
- TRACES
- LOGS
type: azureblob
```
46 changes: 45 additions & 1 deletion docs/backends/causely.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,48 @@ The endpoint URL is the combined `<protocol>://<hostname>:<port>` to access your
- `namespace` is the k8s namespace where the Causely Mediator service is deployed
- Default port is `4317`; if no port is specified, it will be appended automatically

Example: `http://mediator.causely:4317`
Example: `http://mediator.causely:4317`


## 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 `Causely` 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: causely-example
namespace: odigos-system
spec:
data:
CAUSELY_URL: <Endpoint>
destinationName: causely
signals:
- TRACES
- METRICS
type: causely
```
Loading

0 comments on commit 7a07d86

Please sign in to comment.