Skip to content

Commit

Permalink
feat: add goagent use_custom_bsp config value (#162)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-mwangi authored May 23, 2024
1 parent 0c1dbb4 commit 1259231
Show file tree
Hide file tree
Showing 9 changed files with 301 additions and 171 deletions.
1 change: 1 addition & 0 deletions ENV_VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ Agents can be configured using environment variables:
| HT_JAVAAGENT_FILTER_JAR_PATHS | Is the list of path to filter jars, separated by `,`. The values should be separated by `,`. |
| HT_TELEMETRY_STARTUP_SPAN_ENABLED | When `true`, an internal span is created and exported when the agent is initialized and started. It's useful to denote when the application the agent is in started. |
| HT_TELEMETRY_METRICS_ENABLED | Whether to capture metrics or not. The metrics will be otel go metrics. See https://github.com/open-telemetry/opentelemetry-go/tree/main/metric |
| HT_GOAGENT_USE_CUSTOM_BSP | Use the custom batch_span_processor adapted from the one in opentelemetry go and supports some additional metrics |
4 changes: 2 additions & 2 deletions gen/go/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ go 1.19

require (
github.com/ghodss/yaml v1.0.0
github.com/stretchr/testify v1.8.4
google.golang.org/protobuf v1.32.0
github.com/stretchr/testify v1.9.0
google.golang.org/protobuf v1.34.1
)

require (
Expand Down
8 changes: 4 additions & 4 deletions gen/go/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeME
github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg=
github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
google.golang.org/protobuf v1.32.0 h1:pPC6BG5ex8PDFnkbrGU3EixyhKcQ2aDuBS36lqK/C7I=
google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=
google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
Expand Down
408 changes: 245 additions & 163 deletions gen/go/v1/config.pb.go

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions gen/go/v1/config.pbloader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions gen/go/v1/loader.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions proto/hypertrace/agent/config/v1/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ message AgentConfig {

// telemetry
Telemetry telemetry = 8;

// Goagent specific config
GoAgent goagent = 9;
}

// Reporting covers the options related to the mechanics for sending data to the
Expand Down Expand Up @@ -176,6 +179,13 @@ message JavaAgent {
repeated google.protobuf.StringValue filter_jar_paths = 1;
}

// GoAgent has the configs specific to goagent
message GoAgent {
// use the custom batch_span_processor adapted from the one in opentelemetry go
// and supports some additional metrics
google.protobuf.BoolValue use_custom_bsp = 1;
}

// Telemetry has config for agent telemetry: traces and metrics on agent's
// performance and events.
message Telemetry {
Expand Down
2 changes: 1 addition & 1 deletion tools/env-vars-generator/protobuf
Submodule protobuf updated 3440 files
2 changes: 1 addition & 1 deletion tools/go-generator/cmd/generator/_protobuf
Submodule _protobuf updated 3440 files

0 comments on commit 1259231

Please sign in to comment.