์ ๋ Grafana์ ์ด๋ณด์์ด๋ฉฐ Grafana๋ฅผ ์ค์นํ๊ณ read me ํ์ผ์ ์๋ ๋ชจ๋ ์ง์นจ์ ์ํํ์ต๋๋ค. ์ง๊ธ์ Visual Code for go lang์ ์ฌ์ฉํ๊ณ ์์ต๋๋ค. ํ๋ก์ธ์ค๋ฅผ ์ดํดํ ์ ์๋๋ก Grafana ์ฝ๋๋ฅผ ๋๋ฒ๊ทธํ๊ณ ์ถ์ต๋๋ค.
์๋ฌด๋ ๋ด๊ฐํด์ผ ํ ์ผ์ ์ ์ ํ ์ ์์ต๋๊น? Delve๋ผ๋ ๋๋ฒ๊ฑฐ์ ๋ํด ๋ค์ด๋ณธ ์ ์ด ์์ต๋๋ค. ๋ด๊ฐ Delve๋ฅผ ์ฌ์ฉํ ๋ grafana ์๋ฒ์ ์ฐ๊ฒฐํ์ง ์๊ธฐ ๋๋ฌธ์ ์๋ฌด๋ ๊ทธ๊ฒ์ ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ์ ๋งํด ์ค ์ ์์ต๋๊น?
grafana-server๋ฅผ ์์ํ๋ ๋ฐฉ๋ฒ๊ณผ ์ฝ๋๋ฅผ ๋๋ฒ๊น
ํ๋ ๋ฐฉ๋ฒ. ์๋ฌด๋ ๋์์ฃผ์ธ์!!!
๋๋ ๋ค์ ๋งํฌ๋ฅผ ๋ฐ๋์ต๋๋ค: https://github.com/grafana/grafana , https://github.com/derekparker/delve
ํ์คํ์ง ์์ต๋๋ค. ์์ง golang์ ๋๋ฒ๊น ํ ํ์๊ฐ ์์์ต๋๋ค.
Google์์ ๊ฒ์ํ๊ฑฐ๋ Grafana ๋ฉ์ผ๋ง ๋ฆฌ์คํธ์ ์ง๋ฌธ์ ๊ฒ์ํ์ธ์.
๋๋ ๋ํ ๋ฌธ์ ์ ์ง๋ฉดํ๋ค.
.vscode/launch.json์ ํธ์งํ์ฌ ์๋ํ๋๋ก ํ์ต๋๋ค.
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/pkg/cmd/grafana-server/main.go",
"env": {},
"args": [
"--homepath", "${workspaceFolder}",
"--packaging", "dev"
]
}
]
}
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
.vscode/launch.json์ ํธ์งํ์ฌ ์๋ํ๋๋ก ํ์ต๋๋ค.