Skip to content

Commit

Permalink
update config
Browse files Browse the repository at this point in the history
  • Loading branch information
Varkeychan Jacob authored and Varkeychan Jacob committed Nov 21, 2024
1 parent 02cf043 commit e8c6763
Show file tree
Hide file tree
Showing 5 changed files with 457 additions and 278 deletions.
3 changes: 3 additions & 0 deletions ENV_VARS.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ Agents can be configured using environment variables:
| TA_METRICS_CONFIG_ENDPOINT_CONFIG_LOGGING_FREQUENCY | Set the frequency at which metrics should be printed. Examples are '1s', '2m', '3h'. Default value is 30m |
| TA_METRICS_CONFIG_LOGGING_ENABLED | Set this flag to print metrics in logs |
| TA_METRICS_CONFIG_LOGGING_FREQUENCY | Set the frequency at which metrics should be printed. Examples are '1s', '2m', '3h'. Default value is 30m |
| TA_METRICS_CONFIG_EXPORTER_ENABLED | When `true` metrics will be exported as spans from libtraceable |
| TA_METRICS_CONFIG_EXPORTER_EXPORT_INTERVAL_MS | Max interval for calls to TPA |
| TA_METRICS_CONFIG_EXPORTER_EXPORT_TIMEOUT_MS | Max timeout for calls to TPA |
| TA_ENVIRONMENT | Represents the environment name of agent |
| TA_SERVICE_NAME | From HT config |
| TA_REPORTING_ENDPOINT | Represents the endpoint for reporting the traces For ZIPKIN reporter type use http://api.traceable.ai:9411/api/v2/spans For OTLP reporter type use http://api.traceable.ai:4317 |
Expand Down
23 changes: 17 additions & 6 deletions gen/go/proto/v1/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,14 @@ message EndpointMetricsConfig {
}

message MetricsConfig {
// set this flag to enable metrics
google.protobuf.BoolValue enabled = 1;
// endpoint level configuration
EndpointMetricsConfig endpoint_config = 2;
// config for printing metrics in logs
MetricsLogConfig logging = 3;
// set this flag to enable metrics
google.protobuf.BoolValue enabled = 1;
// endpoint level configuration
EndpointMetricsConfig endpoint_config = 2;
// config for printing metrics in logs
MetricsLogConfig logging = 3;
// config for exporting metrics to Traceable Platform
MetricsExporterConfig exporter = 4;
}

enum SpanType {
Expand Down Expand Up @@ -377,3 +379,12 @@ message Telemetry {
// See https://github.com/open-telemetry/opentelemetry-go/tree/main/metric
google.protobuf.BoolValue metrics_enabled = 2;
}

message MetricsExporterConfig {
// when `true` metrics will be exported as spans from libtraceable
google.protobuf.BoolValue enabled = 1;
// max interval for calls to TPA
google.protobuf.Int32Value export_interval_ms = 2;
// max timeout for calls to TPA
google.protobuf.Int32Value export_timeout_ms = 3;
}
Loading

0 comments on commit e8c6763

Please sign in to comment.