Skip to main content
In this guide, you will learn how to contribute a new destination to Odigos. We will create a new dummy destination called mydest. Creating a new destination involves these steps:
  1. Extending the UI for the new destination
  2. Adding the collector configuration for the new destination
  3. Generating the documentation for the new destination

User Interface

For our new destination to be visible in the UI, we need to define the destination metadata and fields in YAML format:
1

Add Logo

Go to destinations/logos/ directory and add your logo.
  • Must be in SVG format
  • Example: mydest.svg
mydest.svg
2

Add Destination Metadata

Go to destinations/data/ directory and create a new YAML file.
  • Example: mydest.yaml
mydest.yaml

Collector Configuration

Now that our new vendor can be persisted/loaded in the Kubernetes data store, we need to implement the collector configuration.
1

Add Destination Type

Go to common/dests.go and add your new destination to the DestinationType enum.
  • Make sure the value is the same as the type property in mydest.yaml
2

Add Collector Config

Go to common/config directory and create a new GO file.
  • Example: mydest.go
  • DestType - Returns the enum value of the destination added to common/dests.go in step 1.
  • ModifyConfig - Is called with the dest object which holds the data received from the UI and the currentConfig object. The currentConfig object contains the current configuration of the gateway collector. Modify this object to include the OpenTelemetry configuration needed by your destination. You can assume a basic configuration is already provided in the currentConfig object, for details see getBasicConfig method in common/config/root.go file.
    • Make sure to give any exporter or pipeline a unique name in order to avoid conflicts, use the conventions:
      • otlp/<dest-name>-<dest.GetID()> for OTel gRPC exporters
      • otlphttp/<dest-name>-<dest.GetID()> for OTel HTTP exporters
      • traces/<dest-name>-<dest.GetID()> for traces pipelines
      • metrics/<dest-name>-<dest.GetID()> for metrics pipelines
      • logs/<dest-name>-<dest.GetID()> for logs pipelines
    • You can use the utility methods isTracingEnabled, isMetricsEnabled and isLoggingEnabled to determine which signals are selected by the user for the destination, and configure the collector accordingly.
mydest.go
3

Add Available Config

Go to common/config/root.go and add the new destination to the availableConfigers list.
  • Example: &MyDest{}
common/config/root.go

Kubernetes-Specific Collector Configuration

If your destination configures Kubernetes settings, for example you have a config field that accepts a value that should be mounted in the Collector Pod, create a K8sConfiger object in destinations.k8sconfig. This interface provides an additional function, ModifyGatewayCollectorDeployment, which accepts a Destination and Collector Deployment. Your implementation can use this function to modify the Deployment as necessary based on the Destination config. Note: It is the responsibility of your implementation to check for the validity of this config, such as checking for conflicts or values that already exist. The K8sConfiger interface also requires a DestType() function, similar to common Destinations. This function returns the type of common Destination that this Kubernetes implementation relies on. This is used by the Autoscaler to conditionally apply the K8sConfiger only for the matching Destination. When it is implemented, add your K8sConfiger implementation to the availableConfigers list in destinations/k8sconfig/root.go

Generating Documentation

1

Install Python

Make sure you have Python installed on your system.
2

Generate Documentation

Go to docs directory, and run:
3

Edit Documentation

The documentation has been generated in the docs/backends directory. Feel free to add any additional content to the generated file.
  • Edit only between the !! START CUSTOM EDIT !! and !! END CUSTOM EDIT !! comments
  • Example: mydest.mdx
mydest.mdx
4

Update README.md

Go to README.md and add your new destination to the list of destinations.

That’s it! Now you can use your new destination in the UI and send data to it.

Please submit a PR to the odigos git repository.