syntax = "proto3"; package datadog.trace; option go_package = "pkg/proto/pbgo/trace"; // golang // protoc --gogofaster_out=. -I $GOPATH/src -I . stats.proto // StatsPayload is the payload used to send stats from the agent to the backend. message StatsPayload { string agentHostname = 1; string agentEnv = 2; // @gotags: json:"stats,omitempty" msg:"Stats,omitempty" repeated ClientStatsPayload stats = 3; string agentVersion = 4; bool clientComputed = 5; // splitPayload indicates if the payload is actually one of several payloads split out from a larger payload. // This field can be used in the backend to signal if re-aggregation is necessary. bool splitPayload = 6; } // ClientStatsPayload is the first layer of span stats aggregation. It is also // the payload sent by tracers to the agent when stats in tracer are enabled. message ClientStatsPayload { // Hostname is the tracer hostname. It's extracted from spans with "_dd.hostname" meta // or set by tracer stats payload when hostname reporting is enabled. string hostname = 1; string env = 2; // env tag set on spans or in the tracers, used for aggregation string version = 3; // version tag set on spans or in the tracers, used for aggregation // @gotags: json:"stats,omitempty" msg:"Stats,omitempty" repeated ClientStatsBucket stats = 4; string lang = 5; // informative field not used for aggregation string tracerVersion = 6; // informative field not used for aggregation string runtimeID = 7; // used on stats payloads sent by the tracer to identify uniquely a message uint64 sequence = 8; // used on stats payloads sent by the tracer to identify uniquely a message // AgentAggregation is set by the agent on tracer payloads modified by the agent aggregation layer // characterizes counts only and distributions only payloads string agentAggregation = 9; // Service is the main service of the tracer. // It is part of unified tagging: https://docs.datadoghq.com/getting_started/tagging/unified_service_tagging string service = 10; // ContainerID specifies the origin container ID. It is meant to be populated by the client and may // be enhanced by the agent to ensure it is unique. string containerID = 11; // Tags specifies a set of tags obtained from the orchestrator (where applicable) using the specified containerID. // This field should be left empty by the client. It only applies to some specific environment. repeated string tags = 12; // The git commit SHA is obtained from a trace, where it may be set through a tracer <-> source code integration. string git_commit_sha = 13; // The image tag is obtained from a container's set of tags. string image_tag = 14; // The process tags hash is used as a key for agent stats agregation. uint64 process_tags_hash = 15; // The process tags contains a list of tags that are specific to the process. string process_tags = 16; } // ClientStatsBucket is a time bucket containing aggregated stats. message ClientStatsBucket { uint64 start = 1; // bucket start in nanoseconds uint64 duration = 2; // bucket duration in nanoseconds // @gotags: json:"stats,omitempty" msg:"Stats,omitempty" repeated ClientGroupedStats stats = 3; // AgentTimeShift is the shift applied by the agent stats aggregator on bucket start // when the received bucket start is outside of the agent aggregation window int64 agentTimeShift = 4; } // Trilean is an expanded boolean type that is meant to differentiate between being unset and false. enum Trilean { NOT_SET = 0; TRUE = 1; FALSE = 2; } enum TraceRootFlag { DEPRECATED_NOT_SET = 0; DEPRECATED_TRUE = 1; DEPRECATED_FALSE = 2; } // ClientGroupedStats aggregate stats on spans grouped by service, name, resource, status_code, type message ClientGroupedStats { string service = 1; string name = 2; string resource = 3; uint32 HTTP_status_code = 4; string type = 5; string DB_type = 6; // db_type might be used in the future to help in the obfuscation step uint64 hits = 7; // count of all spans aggregated in the groupedstats uint64 errors = 8; // count of error spans aggregated in the groupedstats uint64 duration = 9; // total duration in nanoseconds of spans aggregated in the bucket bytes okSummary = 10; // ddsketch summary of ok spans latencies encoded in protobuf bytes errorSummary = 11; // ddsketch summary of error spans latencies encoded in protobuf bool synthetics = 12; // set to true on spans generated by synthetics traffic uint64 topLevelHits = 13; // count of top level spans aggregated in the groupedstats reserved 14; // peer_service has been deprecated string span_kind = 15; // value of the span.kind tag on the span // peer_tags are supplementary tags that further describe a peer entity // E.g., `grpc.target` to describe the name of a gRPC peer, or `db.hostname` to describe the name of peer DB repeated string peer_tags = 16; Trilean is_trace_root = 17; // this field's value is equal to span's ParentID == 0. string GRPC_status_code = 18; string HTTP_method = 19; // HTTP method of the request string HTTP_endpoint = 20; // Http route or quantized/simplified URL path string service_source = 21; // @inject_tag: msg:"srv_src" // used to identify service override origin // Deprecated: use additional_metric_tags (field 23) instead. repeated string span_derived_primary_tags = 22; // additional_metric_tags are tags sent by tracers to be used as additional dimensions for stats aggregation repeated string additional_metric_tags = 23; }