Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PROF-10953] feat: Add GoPCLnTab support as SymbolSource #52

Merged
merged 17 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all build build-debug
.PHONY: all build extract_symbols

VERSION ?= v0.0.0
VERSION_LD_FLAGS := -X github.com/DataDog/dd-otel-host-profiler/version.version=$(VERSION)
Expand Down Expand Up @@ -37,3 +37,6 @@ docker-image:
profiler-in-docker: docker-image
docker run -v "$$PWD":/app -it --rm --user $(shell id -u):$(shell id -g) dd-otel-host-profiler \
bash -c "cd /app && make VERSION=$(VERSION)"

extract_symbols:
go build $(GO_FLAGS) ./tools/extract_symbols
9 changes: 9 additions & 0 deletions cli_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ type arguments struct {
environment string
uploadSymbols bool
uploadDynamicSymbols bool
uploadGoPCLnTab bool
uploadSymbolsDryRun bool
tags string
timeline bool
Expand Down Expand Up @@ -248,6 +249,14 @@ func parseArgs() (*arguments, error) {
Sources: cli.EnvVars("DD_HOST_PROFILING_EXPERIMENTAL_UPLOAD_DYNAMIC_SYMBOLS"),
Destination: &args.uploadDynamicSymbols,
},
&cli.BoolFlag{
Name: "upload-gopclntab",
Usage: "Enable gopcnltab upload.",
Value: false,
Hidden: true,
Sources: cli.EnvVars("DD_HOST_PROFILING_EXPERIMENTAL_UPLOAD_GOPCLNTAB"),
Destination: &args.uploadGoPCLnTab,
},
&cli.BoolFlag{
Name: "upload-symbols-dry-run",
Value: false,
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
DD_HOST_PROFILING_UPLOAD_PERIOD: ${DD_HOST_PROFILING_UPLOAD_PERIOD:-60s}
DD_HOST_PROFILING_EXPERIMENTAL_UPLOAD_SYMBOLS: ${DD_HOST_PROFILING_EXPERIMENTAL_UPLOAD_SYMBOLS:-false}
DD_HOST_PROFILING_EXPERIMENTAL_UPLOAD_DYNAMIC_SYMBOLS: ${DD_HOST_PROFILING_EXPERIMENTAL_UPLOAD_DYNAMIC_SYMBOLS:-true}
DD_HOST_PROFILING_EXPERIMENTAL_UPLOAD_GOPCLNTAB: ${DD_HOST_PROFILING_EXPERIMENTAL_UPLOAD_GOPCLNTAB:-false}
VERSION: ${VERSION:-local-dev}
volumes:
- .:/app
Expand Down
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ func mainWithExitCode() exitCode {
SymbolUploaderConfig: reporter.SymbolUploaderConfig{
Enabled: args.uploadSymbols,
UploadDynamicSymbols: args.uploadDynamicSymbols,
UploadGoPCLnTab: args.uploadGoPCLnTab,
DryRun: args.uploadSymbolsDryRun,
APIKey: args.apiKey,
APPKey: args.appKey,
Expand Down
Loading