Skip to content

Commit

Permalink
Protobuf update
Browse files Browse the repository at this point in the history
Make code changes to router to allow it to compile with the new protobuf.

This does not actually add the eventual functionality required to fill out the new fields, but does update the snapshots.
  • Loading branch information
bryn committed May 3, 2024
1 parent 624e545 commit c3bc8df
Show file tree
Hide file tree
Showing 29 changed files with 121 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,16 @@ expression: aggregated_metrics
"client_name": "client_1",
"client_version": "version_1",
"operation_type": "",
"operation_subtype": ""
"operation_subtype": "",
"result": ""
},
{
"context": {
"client_name": "client_1",
"client_version": "version_1",
"operation_type": "",
"operation_subtype": ""
"operation_subtype": "",
"result": ""
},
"query_latency_stats": {
"request_latencies": {
Expand Down
4 changes: 4 additions & 0 deletions apollo-router/src/plugins/telemetry/metrics/apollo/studio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,11 @@ impl From<ContextualizedStats>
.into_iter()
.map(|(k, v)| (k, v.into()))
.collect(),
local_per_type_stat: Default::default(),
limits_stats: None,
query_latency_stats: Some(stats.query_latency_stats.into()),
context: Some(stats.context),
operation_count: 0,
}
}
}
Expand Down Expand Up @@ -333,6 +336,7 @@ mod test {
client_version: client_version.to_string(),
operation_type: String::new(),
operation_subtype: String::new(),
result: String::new(),
},
query_latency_stats: SingleQueryLatencyStats {
latency: Duration::from_secs(1),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ expression: results
"client_name": "test_client",
"client_version": "1.0-test",
"operation_type": "subscription",
"operation_subtype": "subscription-request"
"operation_subtype": "subscription-request",
"result": ""
},
"query_latency_stats": {
"latency": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ expression: results
"client_name": "test_client",
"client_version": "1.0-test",
"operation_type": "subscription",
"operation_subtype": "subscription-request"
"operation_subtype": "subscription-request",
"result": ""
},
"query_latency_stats": {
"latency": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ expression: results
"client_name": "test_client",
"client_version": "1.0-test",
"operation_type": "query",
"operation_subtype": ""
"operation_subtype": "",
"result": ""
},
"query_latency_stats": {
"latency": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ expression: results
"client_name": "test_client",
"client_version": "1.0-test",
"operation_type": "query",
"operation_subtype": ""
"operation_subtype": "",
"result": ""
},
"query_latency_stats": {
"latency": {
Expand Down
1 change: 1 addition & 0 deletions apollo-router/src/plugins/telemetry/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1395,6 +1395,7 @@ impl Telemetry {
operation_subtype: operation_subtype
.map(|op| op.to_string())
.unwrap_or_default(),
result: "".to_string(),
},
query_latency_stats: SingleQueryLatencyStats {
latency: duration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -429,6 +430,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -536,6 +538,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand All @@ -549,6 +552,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
- start_time:
seconds: "[seconds]"
nanos: "[nanos]"
Expand Down Expand Up @@ -722,6 +726,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -965,6 +970,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -1072,6 +1078,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand All @@ -1085,6 +1092,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
stats_with_context: []
referenced_fields_by_type: {}
query_metadata: ~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -429,6 +430,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -536,6 +538,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand All @@ -549,6 +552,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
- start_time:
seconds: "[seconds]"
nanos: "[nanos]"
Expand Down Expand Up @@ -722,6 +726,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -965,6 +970,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -1072,6 +1078,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand All @@ -1085,6 +1092,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
stats_with_context: []
referenced_fields_by_type: {}
query_metadata: ~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -426,6 +427,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -533,6 +535,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand All @@ -546,6 +549,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
- start_time:
seconds: "[seconds]"
nanos: "[nanos]"
Expand Down Expand Up @@ -716,6 +720,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -959,6 +964,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -1066,6 +1072,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand All @@ -1079,6 +1086,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
stats_with_context: []
referenced_fields_by_type: {}
query_metadata: ~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -426,6 +427,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -533,6 +535,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand All @@ -546,6 +549,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
- start_time:
seconds: "[seconds]"
nanos: "[nanos]"
Expand Down Expand Up @@ -716,6 +720,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -959,6 +964,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -1066,6 +1072,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand All @@ -1079,6 +1086,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
stats_with_context: []
referenced_fields_by_type: {}
query_metadata: ~
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -426,6 +427,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand Down Expand Up @@ -533,6 +535,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
sent_time_offset: "[sent_time_offset]"
sent_time:
seconds: "[seconds]"
Expand All @@ -546,6 +549,7 @@ traces_per_query:
registered_operation: false
forbidden_operation: false
field_execution_weight: 1
limits: ~
stats_with_context: []
referenced_fields_by_type: {}
query_metadata: ~
Expand Down

0 comments on commit c3bc8df

Please sign in to comment.