# Sending from Standalone Applications

## Intro and requirements

The recommend method for sending data from Standalone Hosts is by exporting the telemetry data from applications running on the host to the BYOC endpoint as described below.

You can get the guidelines for sending directly from an application either from the groundcover SaaS or set them manually, as listed below.

{% hint style="info" %}
Sending from an OTLP collector? See [sending-from-an-opentelemetry-collector](https://docs.groundcover.com/integrations/data-sources/opentelemetry/sending-from-an-opentelemetry-collector "mention")
{% endhint %}

{% hint style="warning" %}
groundcover does not instrument your services with OpenTelemetry for you. The following assumes the services have already been instrumented with OpenTelemetry.
{% endhint %}

## Configure from the SaaS

The recommended option is to navigate to the [Data Sources page](https://app.groundcover.com/data-sources) and select OpenTelemetry and then Standalone Applications.

The BYOC endpoint will be pre-filled for you. You will need to either create a dedicated ingestion key or re-use an existing one.

Once the ingestion key is set, a step by step guide will appear, detailing how to configure the pipeline and add attribute enrichment.

<figure><img src="https://2771001740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUHgqKYgCiRKdOpWQdi52%2Fuploads%2FWXQYfqX42wVNcUnkDCg9%2Fimage.png?alt=media&#x26;token=4883257a-7229-41d3-b9c2-4c690cdb7ed5" alt=""><figcaption></figcaption></figure>

## Manual Configuration

### Get your BYOC endpoint

Find your BYOC endpoint in the [ingestion keys tab](https://app.groundcover.com/settings?selectedTab=ingestion-keys).

### Create an Ingestion Key

See how in the [ingestion key docs](https://docs.groundcover.com/use-groundcover/remote-access-and-apis/ingestion-keys).

### Setting Up The Required Environment Variables

Apply the environment variables below to your services in order to make them ship data to groundcover's ingestion endpoint.

It is possible to enrich specific attributes using HTTP headers - read more [here](https://docs.groundcover.com/integrations/data-sources/enriching-3rd-party-data). See below for an example on adding `workload` and `env` via headers.

{% hint style="info" %}
Ingestion is supported for both OTLP/HTTP and OTLP/gRPC.\
Choose what your instrumentation is using - it's often part of the instrumentation itself.
{% endhint %}

#### OTLP/HTTP

```yaml
env:
  - name: OTEL_EXPORTER_OTLP_ENDPOINT
    value: "https://{BYOC_ENDPOINT}"
  - name: OTEL_EXPORTER_OTLP_PROTOCOL
    value: "http/protobuf"
  - name: OTEL_EXPORTER_OTLP_HEADERS
    value: "apikey={ingestion-key},x-groundcover-service-name=my-service,x-groundcover-env-name=my-env"
```

#### OTLP/gRPC

```yaml
env:
  - name: OTEL_EXPORTER_OTLP_ENDPOINT
    value: "https://{BYOC_ENDPOINT}"
  - name: OTEL_EXPORTER_OTLP_PROTOCOL
    value: "grpc"
  - name: OTEL_EXPORTER_OTLP_HEADERS
    value: "apikey={ingestion-key},x-groundcover-service-name=my-service,x-groundcover-env-name=my-env"
```

## Troubleshooting

#### Common Issues

**403 Forbidden / PERMISSION\_DENIED**

* Verify your Ingestion Key is valid and not revoked
* Ensure you're using a **Third Party** type Ingestion Key
* Check that the `token` header is correctly formatted

**Connection Refused / Timeout**

* Verify the BYOC endpoint URL
* Check network connectivity and firewall rules
* Ensure port 443 is accessible from your environment

**Data Not Appearing**

* Check application logs for OTLP exporter errors
* Verify the service name and resource attributes are set
* Allow 1-2 minutes for data to appear in groundcover UI
