Spring actuator
Last updated
Last updated
์์๋ Production-ready Features ๋ผ๋ ์์ ๋ชฉ์ผ๋ก ํ๋ก๋์ ํ๊ฒฝ์์์ ์ดํ๋ฆฌ์ผ์ด์ ์ ๋ํ ๋ชจ๋ํฐ๋ง๊ณผ ๊ด๋ฆฌ ์ด์๋ฅผ ๋ค๋ฃจ๊ณ ์๋ค.
์คํ๋ง์์๋ ์ดํ๋ฆฌ์ผ์ด์ ์ ๋ชจ๋ํฐ๋ง ๋ฐ ๊ด๋ฆฌ๋ฅผ ์ํด์ ๋ช ๊ฐ์ง HTTP endpoint ๋ฅผ ๋ ธ์ถ์ํค๋๋ฐ, ์ด ๊ณผ์ ์ ์ฑ ์์ ธ ์ฃผ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์ด๋ค.
Actuator ์ ๋ํ ์ฌ์ ์ ์ ์๋ ์๋์ ๊ฐ๋ค.
Definition of Actuator
An actuator is a manufacturing term that refers to a mechanical device for moving or controlling something. Actuators can generate a large amount of motion from a small change.
mechanical device for moving or controlling ์ด ํต์ฌ์ธ ๊ฒ ๊ฐ๋ค. ๊ณต์ ๋ฌธ์๋ฅผ ๋ณด๋ฉด ์ฌ๋ฌ๊ฐ์ง endpoint๋ค์ ์ ๊ณตํ๊ณ ์์์ ์ ์ ์๊ณ , ๊ฐ endpoint ๋ง๋ค ๋ ธ์ถ๋๋ ์ ๋ณด๊ฐ ๋ค๋ฅด๋ค. properties ์ค์ ์ ํตํด์ ๋ ธ์ถ์ํฌ endpoint๋ค์ ๊ณ ๋ฅผ ์ ์๋ค.
Actuator์ prometheus ์ฐ๋์ ์ํด์๋ ์คํ๋ง ์ดํ๋ฆฌ์ผ์ด์ ์ ์ฌ๋ฌ ์ ๋ณด๋ค์ prometheous ๊ฐ ๊ฐ์ ธ๊ฐ ์ ์๋ ๋ฐฉ์์ผ๋ก ๋ ธ์ถ ์์ผ์ค์ผํ๋ค. ์์์ ์ผ๋ก prometheus๊ฐ ํต์ ํ๋ ์ธํฐํ์ด์ค๊ฐ ๋ฐ๋ก ์์ ๊ฒ์ด๊ธฐ์ ๊ฑฐ๊ธฐ์ ๋ง๊ฒ ์คํ ๋ง ์ดํ๋ฆฌ์ผ์ด์ ์ ๋ด๋ถ ๋ฐ์ดํฐ๋ฅผ ๋ณํํด์ค ํ์๊ฐ ์์ ๊ฒ์ด๋ค.
๊ณต์๋ฌธ์๋ฅผ ๋ณด๋ฉด prometheus ๋ผ๋ endpoint๊ฐ ์กด์ฌํจ์ ์ ์ ์๊ณ ์ค๋ช ์ ์๋์ ๊ฐ๋ค.
Exposes metrics in a format that can be scraped by a Prometheus server. Requires a dependency on micrometer-registry-prometheus.
์ค๋ช ์ ๋ณด๋ฉด micrometer-registry-prometheus๋ผ๋ ์ถ๊ฐ์ ์ธ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ํ์ํจ์ ์ ์ ์๋ค.
๊ฐ๋ณด๋ฉด ์๋์ ๊ฐ์ ์ค๋ช ์ด ์๋ค.
Micrometer provides a simple facade over the instrumentation clients for the most popular monitoring systems, allowing you to instrument your JVM-based application code without vendor lock-in. Think SLF4J, but for metrics.
์ฝ๊ฒ ๋งํด ์ฌ๋ฌ๊ฐ์ง ์ ๋ช ํ ๋ชจ๋ํฐ๋ง ์์คํ ๋ค์๊ฒ facade ํ๊ฒ ์ธํฐํ์ด์ค๋ฅผ ์ ๊ณตํด์ฃผ๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ด๋ค. ๊ทธ๋ฆผ์ผ๋ก ๋ณด๋ฉด ์๋์ ๊ฐ๋ค.
์ด๋ฏธ actuator ์ micrometer-core ๊ฐ ํฌํจ๋์ด ์๋ค. prometheus ์ฐ๋์ ์ํด์๋ micrometer-registry-prometheus๋ง ์ถ๊ฐ์ ์ผ๋ก runtime scope ์ผ๋ก ์์กด์ฑ ์ถ๊ฐ๋ฅผ ํด์ฃผ๋ฉด ๋๋ค.
์ฌ๊ธฐ๊น์ง Spring Application ์ prometheus ์ฐ๋์ ์ํ ์ค๋น๋จ๊ณ๋ก Actuator์ ๊ทธ ์ธ ํ์ํ ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ๋ํด์ ์ดํด๋ณธ ๋ด์ฉ์ด๋ค.