Skip to content

Commit 6c0137e

Browse files
authored
docs: add serverless setup instruction to get started (#257)
* docs: add serverless setup instruction to get started * Better handling for serverless
1 parent d77482e commit 6c0137e

File tree

1 file changed

+27
-5
lines changed

1 file changed

+27
-5
lines changed

docs/get-started.md

+27-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This guide shows you how to use the Elastic Distribution of OpenTelemetry Python
1818
Before getting started, you'll need somewhere to send the gathered OpenTelemetry data, so it can be viewed and analyzed. EDOT Python supports sending data to any OpenTelemetry protocol (OTLP) endpoint, but this guide assumes you are sending data to an [Elastic Observability](https://www.elastic.co/observability) cloud deployment. You can use an existing one or set up a new one.
1919

2020
<details>
21-
<summary><strong>Expand for setup instructions</strong></summary>
21+
<summary><strong>Expand for Elastic Observability deployment setup instructions</strong></summary>
2222

2323
To create your first Elastic Observability deployment:
2424

@@ -28,6 +28,17 @@ To create your first Elastic Observability deployment:
2828
1. When the deployment is ready, click **Open** to visit your Kibana home page (for example, `https://{DEPLOYMENT_NAME}.kb.{REGION}.cloud.es.io/app/home#/getting_started`).
2929
</details>
3030

31+
<details>
32+
<summary><strong>Expand for Elastic Observability Serverless setup instructions</strong></summary>
33+
34+
To create your first Elastic Observability Serverless project:
35+
36+
1. Sign up for a [free Elastic Cloud trial](https://cloud.elastic.co/registration) or sign into an existing account.
37+
1. Go to <https://cloud.elastic.co/home>.
38+
1. Click **Create project**.
39+
1. When the project is ready, click **Open** to visit your Kibana home page (for example, `https://{DEPLOYMENT_NAME}.kb.{REGION}.cloud.es.io/app/home#/getting_started`).
40+
</details>
41+
3142
<!-- ✅ How to install EDOT Python -->
3243
## Install
3344

@@ -61,7 +72,7 @@ After installing EDOT Python, configure and initialize it to start sending data
6172
<!-- ✅ Provide _minimal_ configuration/setup -->
6273
### Configure EDOT Python
6374

64-
To configure EDOT Python, at a minimum you'll need your Elastic Observability cloud deployment's OTLP endpoint and
75+
To configure EDOT Python, at a minimum you'll need your Elastic Observability cloud OTLP endpoint and
6576
authorization data to set a few `OTLP_*` environment variables that will be available when running EDOT Python:
6677

6778
* `OTEL_RESOURCE_ATTRIBUTES`: Use this to add a service name that will make it easier to recognize your application when reviewing data sent to Elastic.
@@ -77,16 +88,16 @@ You can find the values of the endpoint and header variables in Kibana's APM tut
7788
1. Scroll down and select the **OpenTelemetry** option.
7889
1. The appropriate values for `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` are shown there.
7990

80-
Here's an example:
91+
Here's an example for sending data to an Elastic Cloud deployment:
8192

8293
```sh
83-
export OTEL_RESOURCE_ATTRIBUTES=service.name=<app-name>
94+
export OTEL_RESOURCE_ATTRIBUTES=service.name=<app-name>,service.version=<app-version>,deployment.environment=production
8495
export OTEL_EXPORTER_OTLP_ENDPOINT=https://my-deployment.apm.us-west1.gcp.cloud.es.io
8596
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer P....l"
8697
```
8798

8899
> [!NOTE]
89-
> Alternatively, you can use an [APM agent key](https://www.elastic.co/guide/en/observability/current/apm-api-key.html) to authorize requests to an Elastic Observability endpoint. APM agent keys are revocable, you can have more than one of them, and you can add or remove them without restarting APM Server.
100+
> Alternatively on deployments, you can use an [APM agent key](https://www.elastic.co/guide/en/observability/current/apm-api-key.html) to authorize requests to an Elastic Observability endpoint. APM agent keys are revocable, you can have more than one of them, and you can add or remove them without restarting APM Server.
90101
>
91102
> To create and manage APM Agent keys in Kibana:
92103
>
@@ -98,6 +109,17 @@ export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer P....l"
98109
> export OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey TkpXUkx...dVZGQQ=="
99110
> ```
100111
112+
And here's an example for sending data to an Elastic Cloud serverless project:
113+
114+
```sh
115+
export OTEL_RESOURCE_ATTRIBUTES=service.name=<app-name>,service.version=<app-version>,deployment.environment=production
116+
export OTEL_EXPORTER_OTLP_ENDPOINT=https://my-deployment.apm.us-west1.gcp.cloud.es.io
117+
export OTEL_EXPORTER_OTLP_HEADERS="Authorization=ApiKey B....="
118+
```
119+
120+
> [!NOTE]
121+
> You'll be prompted to create an API key during the Elastic Cloud serverless project onboarding. Refer to the [Api keys documentation](https://www.elastic.co/guide/en/serverless/current/api-keys.html) on how to manage them.
122+
101123
<!-- ✅ Start sending data to Elastic -->
102124
### Run EDOT Python
103125

0 commit comments

Comments
 (0)