Skip to content

fix(uptime): Refine new fields on the uptime-results schema #418

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

Merged
merged 1 commit into from
Jun 23, 2025

Conversation

wedamija
Copy link
Member

Due to how we defined some fields in the schema, the code wasn't generated correctly. Also taking the opportunity to skip allowing fields to nullable. Instead, if the field isn't available, it should just not be set, instead of being null. This aligns with sending data to EAP as well, since EAP doesn't support null attributes.

Due to how we defined some fields in the schema, the code wasn't generated correctly. Also taking the opportunity to skip allowing fields to nullable. Instead, if the field isn't available, it should just not be set, instead of being null. This aligns with sending data to EAP as well, since EAP doesn't support null attributes.
@wedamija wedamija requested a review from a team as a code owner June 23, 2025 22:58
Copy link

versions in use:

The following repositories use one of the schemas you are editing. It is recommended to roll out schema changes in small PRs, meaning that if those used versions lag behind the latest, it is probably best to update those services before rolling out your change.

latest version: 1.3.12

changes considered breaking

schemas/uptime-results.v1.schema.json

  • Restricted the type of .request_info_list.?.durations.dns_lookup, as string is no longer allowed

    {"path": ".request_info_list.?.durations.dns_lookup", "change": {"TypeRemove": {"removed": "string"}}}
    
  • Restricted the type of .request_info_list.?.durations.dns_lookup, as number is no longer allowed

    {"path": ".request_info_list.?.durations.dns_lookup", "change": {"TypeRemove": {"removed": "number"}}}
    
  • Restricted the type of .request_info_list.?.durations.dns_lookup, as integer is no longer allowed

    {"path": ".request_info_list.?.durations.dns_lookup", "change": {"TypeRemove": {"removed": "integer"}}}
    
  • Restricted the type of .request_info_list.?.durations.dns_lookup, as array is no longer allowed

    {"path": ".request_info_list.?.durations.dns_lookup", "change": {"TypeRemove": {"removed": "array"}}}
    
  • Restricted the type of .request_info_list.?.durations.dns_lookup, as boolean is no longer allowed

    {"path": ".request_info_list.?.durations.dns_lookup", "change": {"TypeRemove": {"removed": "boolean"}}}
    
  • Restricted the type of .request_info_list.?.durations.dns_lookup, as null is no longer allowed

    {"path": ".request_info_list.?.durations.dns_lookup", "change": {"TypeRemove": {"removed": "null"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.dns_lookup", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "duration_us"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.dns_lookup", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "start_us"}}}
    
  • {"path": ".request_info_list.?.durations.dns_lookup", "change": {"RequiredAdd": {"property": "duration_us"}}}
    
  • {"path": ".request_info_list.?.durations.dns_lookup", "change": {"RequiredAdd": {"property": "start_us"}}}
    
  • Restricted the type of .request_info_list.?.durations.receive_response, as string is no longer allowed

    {"path": ".request_info_list.?.durations.receive_response", "change": {"TypeRemove": {"removed": "string"}}}
    
  • Restricted the type of .request_info_list.?.durations.receive_response, as number is no longer allowed

    {"path": ".request_info_list.?.durations.receive_response", "change": {"TypeRemove": {"removed": "number"}}}
    
  • Restricted the type of .request_info_list.?.durations.receive_response, as integer is no longer allowed

    {"path": ".request_info_list.?.durations.receive_response", "change": {"TypeRemove": {"removed": "integer"}}}
    
  • Restricted the type of .request_info_list.?.durations.receive_response, as array is no longer allowed

    {"path": ".request_info_list.?.durations.receive_response", "change": {"TypeRemove": {"removed": "array"}}}
    
  • Restricted the type of .request_info_list.?.durations.receive_response, as boolean is no longer allowed

    {"path": ".request_info_list.?.durations.receive_response", "change": {"TypeRemove": {"removed": "boolean"}}}
    
  • Restricted the type of .request_info_list.?.durations.receive_response, as null is no longer allowed

    {"path": ".request_info_list.?.durations.receive_response", "change": {"TypeRemove": {"removed": "null"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.receive_response", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "duration_us"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.receive_response", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "start_us"}}}
    
  • {"path": ".request_info_list.?.durations.receive_response", "change": {"RequiredAdd": {"property": "duration_us"}}}
    
  • {"path": ".request_info_list.?.durations.receive_response", "change": {"RequiredAdd": {"property": "start_us"}}}
    
  • Restricted the type of .request_info_list.?.durations.send_request, as string is no longer allowed

    {"path": ".request_info_list.?.durations.send_request", "change": {"TypeRemove": {"removed": "string"}}}
    
  • Restricted the type of .request_info_list.?.durations.send_request, as number is no longer allowed

    {"path": ".request_info_list.?.durations.send_request", "change": {"TypeRemove": {"removed": "number"}}}
    
  • Restricted the type of .request_info_list.?.durations.send_request, as integer is no longer allowed

    {"path": ".request_info_list.?.durations.send_request", "change": {"TypeRemove": {"removed": "integer"}}}
    
  • Restricted the type of .request_info_list.?.durations.send_request, as array is no longer allowed

    {"path": ".request_info_list.?.durations.send_request", "change": {"TypeRemove": {"removed": "array"}}}
    
  • Restricted the type of .request_info_list.?.durations.send_request, as boolean is no longer allowed

    {"path": ".request_info_list.?.durations.send_request", "change": {"TypeRemove": {"removed": "boolean"}}}
    
  • Restricted the type of .request_info_list.?.durations.send_request, as null is no longer allowed

    {"path": ".request_info_list.?.durations.send_request", "change": {"TypeRemove": {"removed": "null"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.send_request", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "duration_us"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.send_request", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "start_us"}}}
    
  • {"path": ".request_info_list.?.durations.send_request", "change": {"RequiredAdd": {"property": "duration_us"}}}
    
  • {"path": ".request_info_list.?.durations.send_request", "change": {"RequiredAdd": {"property": "start_us"}}}
    
  • Restricted the type of .request_info_list.?.durations.tcp_connection, as string is no longer allowed

    {"path": ".request_info_list.?.durations.tcp_connection", "change": {"TypeRemove": {"removed": "string"}}}
    
  • Restricted the type of .request_info_list.?.durations.tcp_connection, as number is no longer allowed

    {"path": ".request_info_list.?.durations.tcp_connection", "change": {"TypeRemove": {"removed": "number"}}}
    
  • Restricted the type of .request_info_list.?.durations.tcp_connection, as integer is no longer allowed

    {"path": ".request_info_list.?.durations.tcp_connection", "change": {"TypeRemove": {"removed": "integer"}}}
    
  • Restricted the type of .request_info_list.?.durations.tcp_connection, as array is no longer allowed

    {"path": ".request_info_list.?.durations.tcp_connection", "change": {"TypeRemove": {"removed": "array"}}}
    
  • Restricted the type of .request_info_list.?.durations.tcp_connection, as boolean is no longer allowed

    {"path": ".request_info_list.?.durations.tcp_connection", "change": {"TypeRemove": {"removed": "boolean"}}}
    
  • Restricted the type of .request_info_list.?.durations.tcp_connection, as null is no longer allowed

    {"path": ".request_info_list.?.durations.tcp_connection", "change": {"TypeRemove": {"removed": "null"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.tcp_connection", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "duration_us"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.tcp_connection", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "start_us"}}}
    
  • {"path": ".request_info_list.?.durations.tcp_connection", "change": {"RequiredAdd": {"property": "duration_us"}}}
    
  • {"path": ".request_info_list.?.durations.tcp_connection", "change": {"RequiredAdd": {"property": "start_us"}}}
    
  • Restricted the type of .request_info_list.?.durations.time_to_first_byte, as string is no longer allowed

    {"path": ".request_info_list.?.durations.time_to_first_byte", "change": {"TypeRemove": {"removed": "string"}}}
    
  • Restricted the type of .request_info_list.?.durations.time_to_first_byte, as number is no longer allowed

    {"path": ".request_info_list.?.durations.time_to_first_byte", "change": {"TypeRemove": {"removed": "number"}}}
    
  • Restricted the type of .request_info_list.?.durations.time_to_first_byte, as integer is no longer allowed

    {"path": ".request_info_list.?.durations.time_to_first_byte", "change": {"TypeRemove": {"removed": "integer"}}}
    
  • Restricted the type of .request_info_list.?.durations.time_to_first_byte, as array is no longer allowed

    {"path": ".request_info_list.?.durations.time_to_first_byte", "change": {"TypeRemove": {"removed": "array"}}}
    
  • Restricted the type of .request_info_list.?.durations.time_to_first_byte, as boolean is no longer allowed

    {"path": ".request_info_list.?.durations.time_to_first_byte", "change": {"TypeRemove": {"removed": "boolean"}}}
    
  • Restricted the type of .request_info_list.?.durations.time_to_first_byte, as null is no longer allowed

    {"path": ".request_info_list.?.durations.time_to_first_byte", "change": {"TypeRemove": {"removed": "null"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.time_to_first_byte", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "duration_us"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.time_to_first_byte", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "start_us"}}}
    
  • {"path": ".request_info_list.?.durations.time_to_first_byte", "change": {"RequiredAdd": {"property": "duration_us"}}}
    
  • {"path": ".request_info_list.?.durations.time_to_first_byte", "change": {"RequiredAdd": {"property": "start_us"}}}
    
  • Restricted the type of .request_info_list.?.durations.tls_handshake, as string is no longer allowed

    {"path": ".request_info_list.?.durations.tls_handshake", "change": {"TypeRemove": {"removed": "string"}}}
    
  • Restricted the type of .request_info_list.?.durations.tls_handshake, as number is no longer allowed

    {"path": ".request_info_list.?.durations.tls_handshake", "change": {"TypeRemove": {"removed": "number"}}}
    
  • Restricted the type of .request_info_list.?.durations.tls_handshake, as integer is no longer allowed

    {"path": ".request_info_list.?.durations.tls_handshake", "change": {"TypeRemove": {"removed": "integer"}}}
    
  • Restricted the type of .request_info_list.?.durations.tls_handshake, as array is no longer allowed

    {"path": ".request_info_list.?.durations.tls_handshake", "change": {"TypeRemove": {"removed": "array"}}}
    
  • Restricted the type of .request_info_list.?.durations.tls_handshake, as boolean is no longer allowed

    {"path": ".request_info_list.?.durations.tls_handshake", "change": {"TypeRemove": {"removed": "boolean"}}}
    
  • Restricted the type of .request_info_list.?.durations.tls_handshake, as null is no longer allowed

    {"path": ".request_info_list.?.durations.tls_handshake", "change": {"TypeRemove": {"removed": "null"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.tls_handshake", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "duration_us"}}}
    
  • Added a new property, but the consumer has been ignoring additional properties so far. This is probably still fine, but please double-check that the producer does not already send this property with a different type in practice than you defined in this schema.

    {"path": ".request_info_list.?.durations.tls_handshake", "change": {"PropertyAdd": {"lhs_additional_properties": true, "added": "start_us"}}}
    
  • {"path": ".request_info_list.?.durations.tls_handshake", "change": {"RequiredAdd": {"property": "duration_us"}}}
    
  • {"path": ".request_info_list.?.durations.tls_handshake", "change": {"RequiredAdd": {"property": "start_us"}}}
    
  • Restricted the type of .request_info_list.?.request_body_size_bytes, as null is no longer allowed

    {"path": ".request_info_list.?.request_body_size_bytes", "change": {"TypeRemove": {"removed": "null"}}}
    
  • Restricted the type of .request_info_list.?.request_duration_us, as null is no longer allowed

    {"path": ".request_info_list.?.request_duration_us", "change": {"TypeRemove": {"removed": "null"}}}
    
  • Restricted the type of .request_info_list.?.response_body_size_bytes, as null is no longer allowed

    {"path": ".request_info_list.?.response_body_size_bytes", "change": {"TypeRemove": {"removed": "null"}}}
    
benign changes

schemas/uptime-results.v1.schema.json

  • {"path": ".request_info_list.?.durations", "change": {"RequiredRemove": {"property": "dns_lookup"}}}
    
  • {"path": ".request_info_list.?.durations", "change": {"RequiredRemove": {"property": "receive_response"}}}
    
  • {"path": ".request_info_list.?.durations", "change": {"RequiredRemove": {"property": "send_request"}}}
    
  • {"path": ".request_info_list.?.durations", "change": {"RequiredRemove": {"property": "tcp_connection"}}}
    
  • {"path": ".request_info_list.?.durations", "change": {"RequiredRemove": {"property": "time_to_first_byte"}}}
    
  • {"path": ".request_info_list.?.durations", "change": {"RequiredRemove": {"property": "tls_handshake"}}}
    

⚠️ This PR contains breaking changes. Normally you should avoid that and make
your consumer backwards-compatible (meaning that updated consumers can still
accept old messages). There are a few exceptions:

  • If consumers already require these invariants in practice, and you're
    just adjusting the JSON schema to reality, ignore this warning.

  • If you know what you are doing, this change could potentially be rolled out
    to producers first, but that's not a flow we support.

@wedamija
Copy link
Member Author

versions in use:

The following repositories use one of the schemas you are editing. It is recommended to roll out schema changes in small PRs, meaning that if those used versions lag behind the latest, it is probably best to update those services before rolling out your change.

latest version: 1.3.12

changes considered breaking
benign changes
⚠️ This PR contains breaking changes. Normally you should avoid that and make your consumer backwards-compatible (meaning that updated consumers can still accept old messages). There are a few exceptions:

  • If consumers already require these invariants in practice, and you're
    just adjusting the JSON schema to reality, ignore this warning.
  • If you know what you are doing, this change could potentially be rolled out
    to producers first, but that's not a flow we support.

These breaking changes can be ignored, we're not sending these fields

@wedamija wedamija merged commit 2e9e899 into main Jun 23, 2025
17 of 18 checks passed
@wedamija wedamija deleted the danf/uptime-refine-schema branch June 23, 2025 23:00
},
"send_request": {
"$ref": "#/definitions/Timing",
"description": "Time spent sending the request (per OTEL conventions)."
Copy link
Member

Choose a reason for hiding this comment

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

Should this also say per OTEL and drop the conventions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants