- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
Starting with Go 1.21, the Go compiler supports profile-guided optimization (PGO).
PGO enables additional optimizations on code identified as hot by CPU profiles of production workloads. This is compatible with Datadog Go Continuous Profiler and can be used for production builds.
Here are some key points about how PGO works:
default.pgo
and use it to produce a more optimized binary.For more information, see the Go PGO documentation.
PGO is a standard Go compiler option that you can use by manually downloading profiles from Datadog. Datadog built a tool, datadog-pgo
to help you enable PGO on all services, using the latest and most representative profiles.
To enable PGO using the datadog-pgo
tool:
Create a dedicated API key and an application key scoped to at least continuous_profiler_pgo_read
as described in API and Application Keys.
Set DD_API_KEY
, DD_APP_KEY
, and DD_SITE
with the environment secret mechanism of your CI provider.
Run datadog-pgo
before your build step.
For example, for a service foo
that runs in prod
and has its main package in ./cmd/foo
, you should add this step:
go run github.com/DataDog/datadog-pgo@latest "service:foo env:prod" ./cmd/foo/default.pgo
The Go toolchain automatically picks up any default.pgo
file in the main package, so you don’t need to modify your go build
step.
See the datadog-pgo GitHub repository for more details.
To check where PGO is enabled, search for Go profiles without pgo tag set to true.
The pgo
tag was implemented in dd-trace-go 1.61.0, so any profiles prior to this version will not have pgo:false
.
추가 유용한 문서, 링크 및 기사: