Skip to content

Commit b489fa8

Browse files
committed
Add both command-line and environment variable examples for AgentScope Studio
Change-Id: I2d54f077a3fdeafcf0c4e6d82fb3ebdb9f95a39b Co-developed-by: Cursor <[email protected]> Co-authored-by: ralf0131 <[email protected]>
1 parent 26f47cf commit b489fa8

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,16 +247,27 @@ AgentScope Studio will start and display the OTLP endpoint URL (typically `http:
247247

248248
Configure your AgentScope application to export telemetry data to AgentScope Studio using OTLP. Use the endpoint URL displayed by AgentScope Studio when it starts:
249249

250+
```shell
251+
loongsuite-instrument \
252+
--traces_exporter otlp \
253+
--metrics_exporter otlp \
254+
--exporter_otlp_protocol http/protobuf \
255+
--exporter_otlp_endpoint http://127.0.0.1:31415 \
256+
--service_name demo \
257+
python demo.py
258+
```
259+
260+
Alternatively, you can use environment variables:
261+
250262
```shell
251263
export OTEL_SERVICE_NAME=demo
252264
export OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
253-
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:31415 # Use the endpoint from AgentScope Studio
254-
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://127.0.0.1:31415 # Use the endpoint from AgentScope Studio
265+
export OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://127.0.0.1:31415
266+
export OTEL_EXPORTER_OTLP_METRICS_ENDPOINT=http://127.0.0.1:31415
255267

256268
loongsuite-instrument \
257269
--traces_exporter otlp \
258270
--metrics_exporter otlp \
259-
--service_name demo \
260271
python demo.py
261272
```
262273

0 commit comments

Comments
 (0)