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

feat: metrics enabled config #128

Merged
merged 1 commit into from
Jan 26, 2023
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
1 change: 1 addition & 0 deletions ENV_VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ Agents can be configured using environment variables:
| HT_ENABLED | When `false`, disables the agent |
| 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 |
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Before submitting a PR, make sure you run the linter & generate the go modules:
protolint config.proto
```
```bash
make generate-proto
make generate-proto generate-env-vars

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this is suddenly needed? I thought it always generates the corresponding env var for the config field

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make generate-proto does that but does not update ENV.md with the new env vars.

```

[ci-img]: https://github.com/hypertrace/agent-config/workflows/lint%20protobuf/badge.svg
Expand Down
90 changes: 53 additions & 37 deletions gen/go/v1/config.pb.go

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

10 changes: 10 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.

4 changes: 4 additions & 0 deletions proto/hypertrace/agent/config/v1/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,8 @@ message Telemetry {
// 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.
google.protobuf.BoolValue startup_span_enabled = 1;

// Whether to capture metrics or not. The metrics will be otel go metrics.
// See https://github.com/open-telemetry/opentelemetry-go/tree/main/metric
google.protobuf.BoolValue metrics_enabled = 2;
}