Repository navigation
Apply the internal limits to custom APM metrics and send the app start trace - #187
Open
turtledreams wants to merge 2 commits into
Open
turtledreams wants to merge 2 commits into
turtledreams wants to merge 2 commits into
Conversation
report_trace cut trace.app_metrics, while traces carry apm_metrics, so custom metrics were never limited. Custom metrics now keep to the key, value and segmentation limits, and the reserved metrics that the server reads, such as duration and response_time, are sent whole. A trace without metrics is still refused, and a refused bulk trace returns the bulk user for chaining.
report_app_start put the duration under app_metrics, so report_trace refused the trace and nothing was sent. Its start time was also the process uptime instead of a timestamp. It now sends the "app_start" trace from the process start until the call, as the APM guide names it.
CI report
Public API changes: Public API, No public API changeNo public API change. For a931672, updated 2026-11-17 10:02 UTC. Each check's run page has its full log. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Custom APM metrics now keep to the internal limits, and
report_app_startsends its trace.report_tracecuttrace.app_metrics, while traces carryapm_metrics, so the metrics were never limited, in the main SDK and for bulk users (since e68bcdd). Custom metrics now keep tomax_key_length,max_value_sizeandmax_segmentation_values. The reserved metrics that the server reads (duration,response_time,response_payload_size,response_code,request_payload_size,slow_rendering_frames,frozen_frames) are sent whole and do not count towards the segmentation limit, as the SDK development guide's APM rules say.apm_metricsis still refused, since the limits are applied after that check. A refused bulk trace now returns the bulk user, as its documentation says.report_app_starthas built its trace withapp_metricssince it was added in 9f0cbc5, soreport_tracerefused it and nothing was sent; its start time was also the process uptime instead of a timestamp. It now sends theapp_starttrace from the process start until the call.Tests for custom and reserved metrics and a trace without metrics in
test/tests_internal_limits.jsandtest/tests_bulk_fixes.js, and for the app start trace intest/tests_request_queue.js; each fails without its fix.npm testpasses locally (253 tests).#188 builds on this pull request.