Skip to content

Commit 4e9971f

Browse files
committed
stackdriver1
1 parent c296680 commit 4e9971f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,13 @@ r.show()
318318

319319
---
320320

321-
# Python용 GCP Stackdriver Trace 설정
321+
# Python용 GCP Stackdriver Trace 설정 [![Sources](https://img.shields.io/badge/참고-Stackdriver-yellow)](https://cloud.google.com/trace/docs/setup/python?hl=ko)
322322

323323
- 추적을 수집하려면 Stackdriver 내보내기와 OpenCensus 추적기 패키지를 가져와야 한다. 또한 애플리케이션은 Stackdriver 내보내기와 추적기를 인스턴스화해야 한다.
324324
- Stackdriver 내보내기는 애플리케이션 기본 사용자 인증 정보를 통해 인증되며, 코드를 GCP(Google Cloud Platform)에서 실행한다면 프로젝트 ID는 생략해도 된다.
325-
- `GOOGLE_APPLICATION_CREDENTAILS` 환경 변수에 Service account 파일의 경로를 지정하고 google cloud의 어느 project에 있는 Stack Driver와 연결할지를 `PROJECT_ID` 환경 변수에 Project명을 지정해주면 된다.
325+
- google cloud의 어느 project에 있는 Stack Driver와 연결할지를 `PROJECT_ID` 환경 변수에 Project명을 지정해주면 된다.
326326

327327
```bash
328-
export GOOGLE_APPLICATION_CREDENTIALS="c:/zipkin-proxy-dc1792cd9893.json"
329328
export PROJECT_ID="zipkin-proxy"
330329
```
331330

@@ -334,8 +333,7 @@ export PROJECT_ID="zipkin-proxy"
334333
```
335334

336335
- Create the exporters in code
337-
- Run the code: `python main.py`
338-
- Running on http://127.0.0.1:5000/
336+
- Run the code: `python main_test.py` (Running on http://127.0.0.1:5000/)
339337
- Viewing your traces: `https://console.cloud.google.com/traces/traces`
340338

341339
[main.py]

0 commit comments

Comments
 (0)