Skip to content

Commit

Permalink
[8.x] [APM][Otel]Fix get_error_group_main_statistics making trace.id …
Browse files Browse the repository at this point in the history
…optional field (#196822) (#196967)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[APM][Otel]Fix get_error_group_main_statistics making trace.id
optional field (#196822)](#196822)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Carlos
Crespo","email":"crespocarlos@users.noreply.github.com"},"sourceCommit":{"committedDate":"2024-10-18T23:16:36Z","message":"[APM][Otel]Fix
get_error_group_main_statistics making trace.id optional field
(#196822)\n\nfixes
[196821](https://github.com/elastic/kibana/issues/196821)\r\n\r\n##
Summary\r\n\r\n`trace.id` should've been sent as an optional field to
the\r\n`get_error_group_main_statistics` query. This PR fixes
that\r\n\r\n<img width=\"700\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/20b63361-9645-418f-a611-2c0e29b385c7\">\r\n\r\n\r\n##
How to test \r\n\r\n- Run the opentelemetry
demo:\r\nhttps://github.com/elastic/opentelemetry-demo/tree/rca_ingress_obs\r\n-
Navigate to Application > Services\r\n- Open the service details for
loadgenerator","sha":"a36fa1151b4af7ecd1565bf2b67fad20835b8209","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-major","ci:project-deploy-observability","Team:obs-ux-infra_services"],"title":"[APM][Otel]Fix
get_error_group_main_statistics making trace.id optional
field","number":196822,"url":"https://github.com/elastic/kibana/pull/196822","mergeCommit":{"message":"[APM][Otel]Fix
get_error_group_main_statistics making trace.id optional field
(#196822)\n\nfixes
[196821](https://github.com/elastic/kibana/issues/196821)\r\n\r\n##
Summary\r\n\r\n`trace.id` should've been sent as an optional field to
the\r\n`get_error_group_main_statistics` query. This PR fixes
that\r\n\r\n<img width=\"700\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/20b63361-9645-418f-a611-2c0e29b385c7\">\r\n\r\n\r\n##
How to test \r\n\r\n- Run the opentelemetry
demo:\r\nhttps://github.com/elastic/opentelemetry-demo/tree/rca_ingress_obs\r\n-
Navigate to Application > Services\r\n- Open the service details for
loadgenerator","sha":"a36fa1151b4af7ecd1565bf2b67fad20835b8209"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/196822","number":196822,"mergeCommit":{"message":"[APM][Otel]Fix
get_error_group_main_statistics making trace.id optional field
(#196822)\n\nfixes
[196821](https://github.com/elastic/kibana/issues/196821)\r\n\r\n##
Summary\r\n\r\n`trace.id` should've been sent as an optional field to
the\r\n`get_error_group_main_statistics` query. This PR fixes
that\r\n\r\n<img width=\"700\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/20b63361-9645-418f-a611-2c0e29b385c7\">\r\n\r\n\r\n##
How to test \r\n\r\n- Run the opentelemetry
demo:\r\nhttps://github.com/elastic/opentelemetry-demo/tree/rca_ingress_obs\r\n-
Navigate to Application > Services\r\n- Open the service details for
loadgenerator","sha":"a36fa1151b4af7ecd1565bf2b67fad20835b8209"}}]}]
BACKPORT-->

Co-authored-by: Carlos Crespo <crespocarlos@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 21, 2024
1 parent 43135b2 commit 31123df
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,10 @@ export async function getErrorGroupMainStatistics({
]
: [];

const requiredFields = asMutableArray([
TRACE_ID,
AT_TIMESTAMP,
ERROR_GROUP_ID,
ERROR_ID,
] as const);
const requiredFields = asMutableArray([AT_TIMESTAMP, ERROR_GROUP_ID, ERROR_ID] as const);

const optionalFields = asMutableArray([
TRACE_ID,
ERROR_CULPRIT,
ERROR_LOG_MESSAGE,
ERROR_EXC_MESSAGE,
Expand Down

0 comments on commit 31123df

Please sign in to comment.